SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Português/Portuguese

Reply
 
Thread Tools Display Modes
Old 05/04/2020, 03:50 PM   #1
Vict9r
Big Clucker
 
Vict9r's Avatar
 
Join Date: Sep 2019
Posts: 86
Reputation: 8
Default Base Concessionaria

Como o nome ja Diz queria um base de uma concessionaria em dialog não igual essas que tem no forum que é completa se alguem tiver me ajude.
Brigado para quem me ajudar +REP
__________________
<iframe src="http://www.game-state.com/iframe.php?ip=37.59.45.199&port=6909&bgcolor=36363 6&bordercolor=26A8FF&fieldcolor=ffffff&valuecolor= ededed&oddrowscolor=4D4D4D&showgraph=true&showplay ers=true&graphvalues=ededed&graphaxis=ffffff&width =220&graph_height=105&plist_height=101&font_size=9 " frameborder="0" scrolling="no" style="width: 220px; height: 371px"></iframe>
Vict9r is online now   Reply With Quote
Old 05/04/2020, 03:51 PM   #2
HelderPT
Gangsta
 
HelderPT's Avatar
 
Join Date: Jan 2018
Location: São Miguel, Portugal
Posts: 605
Reputation: 22
Default Re: Base Concessionaria

https://forum.sa-mp.com/showthread.php?t=409961

Estude esse e faça o seu
__________________
Nova Vida Social

Preciso de equipe !
Chama discord

Discord: HelderPT#0961
HelderPT is offline   Reply With Quote
Old 05/04/2020, 04:02 PM   #3
Vict9r
Big Clucker
 
Vict9r's Avatar
 
Join Date: Sep 2019
Posts: 86
Reputation: 8
Default Re: Base Concessionaria

esse não é aquele de entrar no carro? Helderpt
__________________
<iframe src="http://www.game-state.com/iframe.php?ip=37.59.45.199&port=6909&bgcolor=36363 6&bordercolor=26A8FF&fieldcolor=ffffff&valuecolor= ededed&oddrowscolor=4D4D4D&showgraph=true&showplay ers=true&graphvalues=ededed&graphaxis=ffffff&width =220&graph_height=105&plist_height=101&font_size=9 " frameborder="0" scrolling="no" style="width: 220px; height: 371px"></iframe>
Vict9r is online now   Reply With Quote
Old 05/04/2020, 04:05 PM   #4
HelderPT
Gangsta
 
HelderPT's Avatar
 
Join Date: Jan 2018
Location: São Miguel, Portugal
Posts: 605
Reputation: 22
Default Re: Base Concessionaria

Acho que não, você quer tipo /criarveiculo id preço

aí o player compra o veículo tals?
__________________
Nova Vida Social

Preciso de equipe !
Chama discord

Discord: HelderPT#0961
HelderPT is offline   Reply With Quote
Old 05/04/2020, 04:07 PM   #5
Vict9r
Big Clucker
 
Vict9r's Avatar
 
Join Date: Sep 2019
Posts: 86
Reputation: 8
Default Re: Base Concessionaria

queria tipo chego na conce e do /comprar e abrir um dialog com os carro a venda.
ZCMD
__________________
<iframe src="http://www.game-state.com/iframe.php?ip=37.59.45.199&port=6909&bgcolor=36363 6&bordercolor=26A8FF&fieldcolor=ffffff&valuecolor= ededed&oddrowscolor=4D4D4D&showgraph=true&showplay ers=true&graphvalues=ededed&graphaxis=ffffff&width =220&graph_height=105&plist_height=101&font_size=9 " frameborder="0" scrolling="no" style="width: 220px; height: 371px"></iframe>
Vict9r is online now   Reply With Quote
Old 05/04/2020, 07:10 PM   #6
Don_Speed
High-roller
 
Don_Speed's Avatar
 
Join Date: Sep 2011
Location: Curitiba / PR
Posts: 3,273
Reputation: 266
Default Re: Base Concessionaria

Quote:
Originally Posted by Don_Speed View Post
Fiz essa base para implantar em meu gamemode de trucking .
PHP Code:
#include  a_samp
#include  DOF2

#define   MAX_CARROS 2000
#define   LOCALCARROS    "ServerData/Carros/%d"

new EmGeral[50];

enum TVehicleData
{
    
veiculo,
    
Owner[24],
    
Model,
    
Fuel,
    
Color,
    
bool:Radio,
    
bool:Alarme,
    
bool:Venda,
    
Valor,
    
    
Float:Lata,
    
    
Float:SpawnX,
    
Float:SpawnY,
    
Float:SpawnZ,
    
Float:SpawnRot,

    
bool:MafiaLoad,
    
bool:Clamped
}
new 
AVehicleData[MAX_CARROS][TVehicleData];
public 
OnFilterScriptInit()
{
    
CarregarCarros();
    return 
1;
}
public 
OnFilterScriptExit() { DOF2_Exit();return true;}
public 
OnPlayerConnect(playerid)
{
    return 
1;
}
public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    return 
1;
}
stock ComprarCarro(playeridmodelxyzrotcor)
{
    new 
Meugame[24];
    
GetPlayerName(playeridMeugamesizeof MeuGame)
    for(new 
1i<MAX_CARROSi++)
    {
        
format(EmGeralsizeof(EmGeral), LOCALCARROS i);
        if(!
DOF2_FileExists(EmGeral))
        {
            
DOF2_CreateFile(EmGeral);
            
            
format(AVehicleData[i][Owner], 24,Meugame);
            
AVehicleData[i][Model] = model;
            
AVehicleData[i][Fuel] = 500;
            
AVehicleData[i][Color] = cor;
            
AVehicleData[i][Radio] = false;
            
AVehicleData[i][Alarme] = false;
            
AVehicleData[i][Venda] = false;
            
AVehicleData[i][Valor] = 0;
            
AVehicleData[i][Lata] = 100;
            
AVehicleData[i][SpawnX] = x;
            
AVehicleData[i][SpawnY] = y;
            
AVehicleData[i][SpawnZ] = z;
            
AVehicleData[i][SpawnRot] = rot;
            
AVehicleData[i][MafiaLoad] = false;
            
AVehicleData[i][Clamped] = false;
            
            
//AVehicleData[i][veiculo]
            //new Text3D:vehicle3Dtext[MAX_VEHICLES]
            //Create3DTextLabel("I'm at the coordinates:\n30.0, 40.0, 50.0", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0, 0);
            //vehicle3Dtext[ vehicle_id ] = Create3DTextLabel( "Example Text", 0xFF0000AA, 0.0, 0.0, 0.0, 50.0, 0, 1 );
             
            
DOF2_SetString(EmGeral"Dono"AVehicleData[i][Owner]);
            
DOF2_SetInt(EmGeral"Modelo"AVehicleData[i][Model]);
            
DOF2_SetInt(EmGeral"Gas"AVehicleData[i][Fuel]);
            
DOF2_SetInt(EmGeral"Cor"AVehicleData[i][Color]);
            
DOF2_SetBool(EmGeral"Radio"AVehicleData[i][Radio]);
            
DOF2_SetBool(EmGeral"Alarme"AVehicleData[i][Alarme]);
            
DOF2_SetBool(EmGeral"Venda"AVehicleData[i][Venda]);
            
DOF2_SetInt(EmGeral"Valor"AVehicleData[i][Valor]);
            
DOF2_SetFloat(EmGeral"Lataria"AVehicleData[i][Lata]);
            
DOF2_SetFloat(EmGeral"X"AVehicleData[i][SpawnX]);
            
DOF2_SetFloat(EmGeral"Y"AVehicleData[i][SpawnY]);
            
DOF2_SetFloat(EmGeral"Z"AVehicleData[i][SpawnZ]);
            
DOF2_SetFloat(EmGeral"Rot"AVehicleData[i][SpawnRot]);
            
DOF2_SetBool(EmGeral"Preso"AVehicleData[i][Clamped]);
            
            
            
DOF2_SaveFiles();
        }
        else
        {
           if(
== MAX_CARROS)return SendClientMessage(playerid, -1"Erro: servidor sem slot de carro.");
           
        }
    }
    return 
true;
}
stock CarregarCarros()
{
    for(new 
1i<MAX_CARROSi++)
    {
        
format(EmGeralsizeof(EmGeral), LOCALCARROS i);
        if(
DOF2_FileExists(EmGeral))
        {
            
format(AVehicleData[i][Owner], 24DOF2_GetString(EmGeral"Dono"));
            
AVehicleData[i][Model] =           DOF2_GetInt(EmGeral"Modelo");
            
AVehicleData[i][Fuel] =            DOF2_GetInt(EmGeral"Gas");
            
AVehicleData[i][Color] =           DOF2_GetInt(EmGeral"Cor");
            
AVehicleData[i][Radio] =           DOF2_GetBool(EmGeral"Radio");
            
AVehicleData[i][Alarme] =          DOF2_GetBool(EmGeral"Alarme");
            
AVehicleData[i][Venda] =           DOF2_GetBool(EmGeral"Venda");
            
AVehicleData[i][Valor] =           DOF2_GetInt(EmGeral"Valor");
            
AVehicleData[i][Lata] =            DOF2_GetFloat(EmGeral"Lataria");
            
AVehicleData[i][SpawnX] =          DOF2_GetFloat(EmGeral"X");
            
AVehicleData[i][SpawnY] =          DOF2_GetFloat(EmGeral"Y");
            
AVehicleData[i][SpawnZ] =          DOF2_GetFloat(EmGeral"Z");
            
AVehicleData[i][SpawnRot] =        DOF2_GetFloat(EmGeral"Rot");
            
AVehicleData[i][Clamped] =         DOF2_GetBool(EmGeral"Preso");
                        
//AVehicleData[i][veiculo]
            //new Text3D:vehicle3Dtext[MAX_VEHICLES]
            //Create3DTextLabel("I'm at the coordinates:\n30.0, 40.0, 50.0", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0, 0);
            //vehicle3Dtext[ vehicle_id ] = Create3DTextLabel( "Example Text", 0xFF0000AA, 0.0, 0.0, 0.0, 50.0, 0, 1 );
       
}
    }
    return 
true;
}
stock SalvarCarros()
{
    for(new 
1i<MAX_CARROSi++)
    {
        
format(EmGeralsizeof(EmGeral), LOCALCARROS i);
        if(
DOF2_FileExists(EmGeral))
        {
            
DOF2_SetString(EmGeral"Dono"AVehicleData[i][Owner]);
            
DOF2_SetInt(EmGeral"Modelo"AVehicleData[i][Model]);
            
DOF2_SetInt(EmGeral"Gas"AVehicleData[i][Fuel]);
            
DOF2_SetInt(EmGeral"Cor"AVehicleData[i][Color]);
            
DOF2_SetBool(EmGeral"Radio"AVehicleData[i][Radio]);
            
DOF2_SetBool(EmGeral"Alarme"AVehicleData[i][Alarme]);
            
DOF2_SetBool(EmGeral"Venda"AVehicleData[i][Venda]);
            
DOF2_SetInt(EmGeral"Valor"AVehicleData[i][Valor]);
            
DOF2_SetFloat(EmGeral"Lataria"AVehicleData[i][Lata]);
            
DOF2_SetFloat(EmGeral"X"AVehicleData[i][SpawnX]);
            
DOF2_SetFloat(EmGeral"Y"AVehicleData[i][SpawnY]);
            
DOF2_SetFloat(EmGeral"Z"AVehicleData[i][SpawnZ]);
            
DOF2_SetFloat(EmGeral"Rot"AVehicleData[i][SpawnRot]);
            
DOF2_SetBool(EmGeral"Preso"AVehicleData[i][Clamped]);
        }
    }
    return 
true;


E muito base eu parti deste codigo para colocar mais coisas .
base
__________________
Youtubar
Discord : Don_Speed#6282
Don_Speed is offline   Reply With Quote
Old 05/04/2020, 09:28 PM   #7
Vict9r
Big Clucker
 
Vict9r's Avatar
 
Join Date: Sep 2019
Posts: 86
Reputation: 8
Default Re: Base Concessionaria

Consegui fazer brigado a todos!
__________________
<iframe src="http://www.game-state.com/iframe.php?ip=37.59.45.199&port=6909&bgcolor=36363 6&bordercolor=26A8FF&fieldcolor=ffffff&valuecolor= ededed&oddrowscolor=4D4D4D&showgraph=true&showplay ers=true&graphvalues=ededed&graphaxis=ffffff&width =220&graph_height=105&plist_height=101&font_size=9 " frameborder="0" scrolling="no" style="width: 220px; height: 371px"></iframe>
Vict9r is online now   Reply With Quote
Old 06/04/2020, 09:13 PM   #8
Andinho
Huge Clucker
 
Andinho's Avatar
 
Join Date: Apr 2016
Location: Bezerros PE
Posts: 341
Reputation: 14
Default Re: Base Concessionaria

Cria alguns veiculos, e verifica quando o player entrar no veiculo, e faz um dialog pra ele comprar

pawn Code:
//  sistema concecionaria //
new veiculosconce;
enum conce
{
    Text3D:conce3D,
    conceCarro,
    conceNivel,
    conceModelo,
    conceValor,
    Float:conceX,
    Float:conceY,
    Float:conceZ,
    Float:conceA
};

new Concecionaria[][conce] =
{
    {STREAMER_TAG_3D_TEXT_LABEL:-1, -1, 1, 521, 15000,899.6930,-1347.5095,12.4183,54.8880},
    {STREAMER_TAG_3D_TEXT_LABEL:-1, -1, 1, 462, 5000,892.4880,-1346.0265,12.4186,236.1920},
    {STREAMER_TAG_3D_TEXT_LABEL:-1, -1, 1, 463, 9500,900.0922,-1352.0725,12.3862,58.0637},
    {STREAMER_TAG_3D_TEXT_LABEL:-1, -1, 1, 468, 20000,892.0239,-1350.6099,12.4183,225.4647},
    {STREAMER_TAG_3D_TEXT_LABEL:-1, -1, 1, 522, 35000,899.6825,-1356.1012,12.4164,57.3486},
    {STREAMER_TAG_3D_TEXT_LABEL:-1, -1, 1, 451, 120000,886.0143,-1346.0388,17.4910,136.8799},
    {STREAMER_TAG_3D_TEXT_LABEL:-1, -1, 1, 411, 110000,873.9745,-1345.1873,17.5019,133.3766},
    {STREAMER_TAG_3D_TEXT_LABEL:-1, -1, 1, 415, 135000,864.3724,-1345.9646,17.5065,135.2292},
    {STREAMER_TAG_3D_TEXT_LABEL:-1, -1, 1, 439, 50000,853.7173,-1346.4479,17.5026,135.9941},
    {STREAMER_TAG_3D_TEXT_LABEL:-1, -1, 1, 477, 40000,848.4840,-1362.7944,17.5206,323.0633},
    {STREAMER_TAG_3D_TEXT_LABEL:-1, -1, 1, 496, 30000,858.6512,-1362.3864,17.5238,323.5267},
    {STREAMER_TAG_3D_TEXT_LABEL:-1, -1, 1, 560, 65000,867.3914,-1363.1047,17.5206,318.6466},
    {STREAMER_TAG_3D_TEXT_LABEL:-1, -1, 1, 487, 250000,857.4289,-1375.0242,12.5732,89.7654},
    {STREAMER_TAG_3D_TEXT_LABEL:-1, -1, 1, 403, 90000,818.3640,-1373.9258,12.5732,1.8382},
    {STREAMER_TAG_3D_TEXT_LABEL:-1, -1, 1, 578, 100000,830.6194,-1375.7682,12.5732,358.5132},
    {STREAMER_TAG_3D_TEXT_LABEL:-1, -1, 1, 494, 200000,817.5997,-1360.4602,12.5732,269.1145},
    {STREAMER_TAG_3D_TEXT_LABEL:-1, -1, 1, 502, 200000,817.6871,-1351.9370,12.5732,269.3698},
    {STREAMER_TAG_3D_TEXT_LABEL:-1, -1, 1, 556, 180000,831.5051,-1345.6849,12.5732,179.3994}
};


//em ongamemodeint

new stere[300];
    for(new co; co<sizeof Concecionaria; co++)
    {
        Concecionaria[co][conceCarro] = CreateVehicle(Concecionaria[co][conceModelo], Concecionaria[co][conceX],Concecionaria[co][conceY],Concecionaria[co][conceZ],Concecionaria[co][conceA], co, co+10, 60000, 0);
        if(!IsValidDynamic3DTextLabel(Concecionaria[co][conce3D])) Concecionaria[co][conce3D] = CreateDynamic3DTextLabel( "_", 0xffffff99, 0, 0, 0, 15, INVALID_PLAYER_ID, Concecionaria[co][conceCarro], 1, -1, -1, -1, STREAMER_3D_TEXT_LABEL_SD, -1, 0 );
        format(stere, 300, "{00ffff}%s\n{ffffff}Nivel: {ffff00}%d\n{ffffff}Valor {00ff00}R$ %s\n\n{ffffff}Entre no {00ffff}veiculo {ffffff}para\ncomprar um modelo igual", NomeVeiculos[Concecionaria[co][conceModelo]-400], Concecionaria[co][conceNivel], ConvertMoney(Concecionaria[co][conceValor]) );
        UpdateDynamic3DTextLabelText(Concecionaria[co][conce3D], 0xffffff99, stere);
    }



// no fim da GM


stock ConvertMoney(amount)
{
    new strl[50], lenl = sizeof strl;
    if(amount == cellmin)
    {
        strl[0] = EOS;
        strcat(strl, "-2.147.483.648", lenl);
        return strl;
    }

    format(strl, lenl, "%d", amount);

    for(new i = strlen(strl), end = amount >= 0 ? 0 : 1; (i -= 3) > end;)
    strins(strl, ".", i, lenl);
    return strl;
}


Eu fiz esse pra minha GM acho bem melhor sabe, você vai precisar mudar essas posicões do veiculo, pq ta no local de minha conce tbm.

vc faz o resto, pra quando ele entrar em um veiculo, verifica se é algum veiculo da concecionaria, e salva o id em uma SetPVarInt, cria o dialog, e se ele comprar cria o veiculo em algum lugar.
__________________
Battle royale vai ficar pra dps.

[ RPG em desenvolvimento ]
Andinho is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Pedido] Base Concessionaria Vict9r Português/Portuguese 4 19/03/2020 02:23 PM
[Pedido] Base de Concessionária iAplle Português/Portuguese 4 07/03/2019 11:30 AM
uma base pra concessionaria com salvamento ? GuiKommander Português/Portuguese 1 07/01/2017 02:59 AM
[Map] Concessionária Grotti - Base ThuuGLif3 Lançamentos/Releases 7 23/02/2015 10:38 PM
[Pedido] Concessionaria Base MichelScripter Português/Portuguese 2 15/06/2014 12:45 AM


All times are GMT. The time now is 08:45 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.