[Ajuda] Arumar FS
#3

Ta ae:

PHP код:
// This is a comment
// uncomment the line below if you want to write a filterscript
#define FILTERSCRIPT
#define CARROS 1 //Coloque aqui a quantidade de carros no seu servidor +1
#define MAX_CARROS 10 //Aqui, coloque o limite de carros do FS.
#define SPAWN_X 2128.7856//Aqui, defina a posiзгo X de spawn dos carros recйm-comprados da concessionбria.
#define SPAWN_Y -1142.3700//Aqui, defina a posiзгo Y de spawn dos carros recйm-comprados da concessionбria.
#define SPAWN_Z 25.0067//Aqui, defina a posiзгo Z de spawn dos carros recйm-comprados da concessionбria.
#define ANGULO 359.1015//Aqui, defina o вngulo de spawn dos carros recйm-comprados da concessionбria.
#define Car_Infernus 30000
#define Car_Cheetah 30000
#define Car_Banshee 30000
#define Car_Hotknife 30000
#define Car_Turismo 30000
#define Car_ZR_350 30000
#define Car_Comet 30000
#define Car_Super_GT 30000
#define Car_Windsor 30000
#define Car_Feltzer 30000
#define Car_Euros 30000
#include <a_samp>
#include <core>
#include <float>
#include <time>
#include <file>
#pragma tabsize 0
new Text:Black0;
new 
Text:Black1;
new 
Text:Black2;
new 
Text:Black3;
new 
Text:LightBlack;
new 
Text:VHS[MAX_PLAYERS];
new 
bool:TextShow[MAX_PLAYERS];
new 
bool:VHSCreated[MAX_PLAYERS];
new 
Text3D:Placa[MAX_CARROS];
new 
gPlaca[MAX_PLAYERS][256];
stock strtok(const string[], &index)
{
    new 
length strlen(string);
    while ((
index length) && (string[index] <= ' '))
    {
        
index++;
    }
    new 
offset index;
    new 
result[20];
    while ((
index length) && (string[index] > ' ') && ((index offset) < (sizeof(result) - 1)))
    {
        
result[index offset] = string[index];
        
index++;
    }
    
result[index offset] = EOS;
    return 
result;
}
stock ReturnPlayerNameplayerid )
{
    new
    
NameStringMAX_PLAYER_NAME ],
    
stringPos;
    
GetPlayerNameplayeridNameStringMAX_PLAYER_NAME );
    
stringPos strfindNameString"_" );
    
NameStringstringPos ] = ' ';
    return 
NameString;
}
enum jInfo
{
    
jChaveDoCarro,
    
jPlaca[128],
}
new 
JogadorDataBase[MAX_PLAYERS][jInfo];
forward J_Salvar(playerid);
forward J_Carregar(playerid);
public 
J_Salvar(playerid)
{
    if(
IsPlayerConnected(playerid))
    {
        new 
string3[64];
        new 
playername3[MAX_PLAYER_NAME];
        
GetPlayerName(playeridplayername3sizeof(playername3));
        
format(string3sizeof(string3), "LeLeTe/%s.ini"playername3);
        new 
FilehFile fopen(string3io_write);
        if (
hFile)
        {
            new var[
256];
            
format(var, 64"jChaveDoCarro=%d\r\n"JogadorDataBase[playerid][jChaveDoCarro]);fwrite(hFile, var);
            
format(var, 64"jPlaca=%s\r\n"JogadorDataBase[playerid][jPlaca]);fwrite(hFile, var);
            
format(var, 255"gPlaca=%s\r\n"gPlaca[playerid]);fwrite(hFile, var);
            
fclose(hFile);
        }
    }
    return 
1;
}
public 
J_Carregar(playerid)
{
    new 
string2[64];
    new 
playername2[MAX_PLAYER_NAME];
    new 
playernamesplit[3][MAX_PLAYER_NAME];
    
GetPlayerName(playeridplayername2sizeof(playername2));
    
split(playername2playernamesplit'_');
    
format(string2sizeof(string2), "LeLeTe/%s.ini"playername2);
    new 
FileUserFile fopen(string2io_read);
    if ( 
UserFile )
    {
        new 
key[256], val256 ];
        new 
Data256 ];
        while ( 
freadUserFile Data sizeofData ) ) )
        {
            
key ini_GetValueData );
            if( 
strcmpkey "jChaveDoCarro" true ) == ) { val ini_GetValueData ); JogadorDataBase[playerid][jChaveDoCarro] = strvalval ); }
            if( 
strcmpkey "jPlaca" true ) == ) { val ini_GetValueData ); strmid(JogadorDataBase[playerid][jPlaca], val0strlen(val)-1255); }
            if( 
strcmpkey "gPlaca" true ) == ) { val ini_GetValueData ); strmid(gPlaca[playerid], val0strlen(val)-1255); }
        }
        
fclose(UserFile);
    }
    return 
1;
}
forward ini_GetKeyline[] );
forward ini_GetValueline[] );
stock ini_GetKeyline[] )
{
    new 
keyRes[256];
    
keyRes[0] = 0;
    if ( 
strfindline "=" true ) == -) return keyRes;
    
strmidkeyRes line strfindline "=" true ) , sizeofkeyRes) );
    return 
keyRes;
}
stock ini_GetValueline[] )
{
    new 
valRes[256];
    
valRes[0]=0;
    if ( 
strfindline "=" true ) == -) return valRes;
    
strmidvalRes line strfindline "=" true )+strlenline ) , sizeofvalRes ) );
    return 
valRes;
}
forward split(const strsrc[], strdest[][], delimiter);
public 
split(const strsrc[], strdest[][], delimiter)
{
    new 
ili;
    new 
aNum;
    new 
len;
    while(
<= strlen(strsrc)){
        if(
strsrc[i]==delimiter || i==strlen(strsrc)){
            
len strmid(strdest[aNum], strsrclii128);
            
strdest[aNum][len] = 0;
            
li i+1;
            
aNum++;
        }
        
i++;
    }
    return 
1;
}
enum Carros
{
    
cModelo,
    
Float:cx,
    
Float:cy,
    
Float:cz,
    
Float:cangulo,
    
cCor1,
    
cCor2,
    
cDono[MAX_PLAYER_NAME],
    
cNome[MAX_PLAYER_NAME],
    
cValor,
    
cArrayQualquer,
    
cRegistrado,
    
cComprado,
    
cTrava,
    
cPlaca[30],
};
new 
CarrosInfo[MAX_CARROS][Carros];
forward OnPlayerEnterVehicle(playeridvehicleidispassenger);
public 
OnPlayerEnterVehicle(playeridvehicleidispassenger)
{
    if(
CarrosInfo[vehicleid][cTrava] == && CarrosInfo[vehicleid][cComprado] == 1)
    {
        new 
Float:CxFloat:CyFloat:Cz;
        
GetPlayerPos(playeridCxCyCz);
        
SetPlayerPos(playeridCxCyCz);
    }
    new 
string[128];
    
format(string,sizeof(string),"|| Dono deste carro: %s ||",CarrosInfo[vehicleid][cDono]);
    
SendClientMessage(playerid0x1A1AFFAAstring);
    return 
1;
}
forward CarregarCarros();
public 
CarregarCarros()
{
    new 
arrCoords[14][64];
    new 
strFromFile2[256];
    new 
Filefile fopen("LeLeTe/Concessionaria_Carros.cfg"io_read);
    if (
file)
    {
        new 
idx CARROS;
        while (
idx sizeof(CarrosInfo))
        {
            
fread(filestrFromFile2);
            
split(strFromFile2arrCoords',');
            
CarrosInfo[idx][cModelo] = strval(arrCoords[0]);
            
CarrosInfo[idx][cx] = floatstr(arrCoords[1]);
            
CarrosInfo[idx][cy] = floatstr(arrCoords[2]);
            
CarrosInfo[idx][cz] = floatstr(arrCoords[3]);
            
CarrosInfo[idx][cangulo] = floatstr(arrCoords[4]);
            
CarrosInfo[idx][cCor1] = strval(arrCoords[5]);
            
CarrosInfo[idx][cCor2] = strval(arrCoords[6]);
            
strmid(CarrosInfo[idx][cDono], arrCoords[7], 0strlen(arrCoords[7]), 255);
            
strmid(CarrosInfo[idx][cNome], arrCoords[8], 0strlen(arrCoords[8]), 255);
            
CarrosInfo[idx][cValor] = strval(arrCoords[9]);
            
CarrosInfo[idx][cRegistrado] = strval(arrCoords[10]);
            
CarrosInfo[idx][cComprado] = strval(arrCoords[11]);
            
CarrosInfo[idx][cTrava] = strval(arrCoords[12]);
            
strmid(CarrosInfo[idx][cPlaca], arrCoords[13], 0strlen(arrCoords[13]), 30);
            
printf("Nome do Carro: %d Dono:%s Placa %s",idx,CarrosInfo[idx][cDono],CarrosInfo[idx][cPlaca]);
            
idx++;
        }
    }
    return 
1;
}
forward SalvarCarros();
public 
SalvarCarros()
{
    new 
Filefile2;
    new 
idx CARROS;
    while (
idx sizeof(CarrosInfo))
    {
        new 
coordsstring[256];
        
format(coordsstringsizeof(coordsstring), "%d,%f,%f,%f,%f,%d,%d,%s,%s,%d,%d,%d,%d,%s\r\n",
        
CarrosInfo[idx][cModelo],//
        
CarrosInfo[idx][cx],//
        
CarrosInfo[idx][cy],//
        
CarrosInfo[idx][cz],//
        
CarrosInfo[idx][cangulo],//
        
CarrosInfo[idx][cCor1],//
        
CarrosInfo[idx][cCor1],//
        
CarrosInfo[idx][cDono],//
        
CarrosInfo[idx][cNome],//
        
CarrosInfo[idx][cValor],//
        
CarrosInfo[idx][cRegistrado],//
        
CarrosInfo[idx][cComprado],//
        
CarrosInfo[idx][cTrava],
        
CarrosInfo[idx][cPlaca]);
        if(
idx == CARROS)
        {
            
file2 fopen("LeLeTe/Concessionaria_Carros.cfg"io_write);
        }
        else
        {
            
file2 fopen("LeLeTe/Concessionaria_Carros.cfg"io_append);
        }
        
fwrite(file2coordsstring);
        
idx++;
        
fclose(file2);
    }
    return 
1;
}
stock CheckPlayerDistanceToVehicle(Float:radiplayeridvehicleid)
{
    if(
IsPlayerConnected(playerid))
    {
        new 
Float:PX,Float:PY,Float:PZ,Float:X,Float:Y,Float:Z;
        
GetPlayerPos(playerid,PX,PY,PZ);
        
GetVehiclePos(vehicleidX,Y,Z);
        new 
Float:Distance = (X-PX)*(X-PX)+(Y-PY)*(Y-PY)+(Z-PZ)*(Z-PZ);
        if(
Distance <= radi*radi)
        {
            return 
1;
        }
    }
    return 
0;
}
stock Concessionaria(playeridnomedocarro[MAX_PLAYER_NAME], precomodeloFloat:posXFloat:posYFloat:posZFloat:angulo)
{
    if(
GetPlayerMoney(playerid) >= preco )
    {
        new 
colorOne random(255);
        new 
colorTwo random(255);
        new 
idcar AddStaticVehicleEx(modelo,posX,posY,posZ,angulo,colorOne,colorTwo,60000);
        new 
sendername[MAX_PLAYER_NAME];
        
sendername ReturnPlayerName(playerid);
        
strmid(CarrosInfo[idcar][cDono], sendername0strlen(sendername), 999);
        new 
result[128];
        
format(resultsizeof(result), "[Por:LeLeTe]\n[|%s|]"nomedocarro);
        
Placa[idcar] = Create3DTextLabel(result0xFFFFFFFF0.00.00.050.0, -10);
        
Attach3DTextLabelToVehicle(Placa[idcar],idcar0.0, -2.90.0);
        
GivePlayerMoney(playerid,-preco);
        
SendClientMessage(playerid0xFFFFFFFF"Parabйns pelo seu carro!");
        
JogadorDataBase[playerid][jChaveDoCarro] = idcar;
        
CarrosInfo[idcar][cModelo] = modelo;
        
CarrosInfo[idcar][cx] = posX;
        
CarrosInfo[idcar][cy] = posY;
        
CarrosInfo[idcar][cz] = posZ;
        
CarrosInfo[idcar][cangulo] = angulo;
        
CarrosInfo[idcar][cCor1] = colorOne;
        
CarrosInfo[idcar][cCor2] = colorTwo;
        
CarrosInfo[idcar][cValor] = preco;
        
CarrosInfo[idcar][cNome] = nomedocarro;
        
SalvarCarros();
        
J_Salvar(playerid);
    }
}
public 
OnFilterScriptInit()
{
    
CarregarCarros();
    print(
"\n--------------------------------------");
    print(
" Sistema de Concessionбrias por: LeLeTe v1.5");
    print(
"--------------------------------------\n");
    for(new 
CARROSsizeof(CarrosInfo); h++)
    {
        
AddStaticVehicleEx(CarrosInfo[h][cModelo],CarrosInfo[h][cx],CarrosInfo[h][cy],CarrosInfo[h][cz]+1.0,CarrosInfo[h][cangulo],CarrosInfo[h][cCor1],CarrosInfo[h][cCor2],60000);
        new 
result[200];
        
format(resultsizeof(result), "[Placa]\n[|%s|]"CarrosInfo[h][cPlaca]);
        
Placa[h] = Create3DTextLabel(result0xFFFFFFFF0.00.00.050.0, -10);
        
Attach3DTextLabelToVehicle(Placa[h], h0.0, -2.90.0);
    }
    
// TextDraws do Velocнmetro
    
Black0 TextDrawCreate(537.000000,133.000000," ");
    
Black1 TextDrawCreate(537.000000,133.000000," ");
    
Black2 TextDrawCreate(537.000000,170.000000," ");
    
Black3 TextDrawCreate(593.000000,133.000000," ");
    
LightBlack TextDrawCreate(541.000000,136.000000," ");
    
TextDrawUseBox(Black0,1);
    
TextDrawBoxColor(Black0,0x000000ff);
    
TextDrawTextSize(Black0,593.000000,0.000000);
    
TextDrawUseBox(Black1,1);
    
TextDrawBoxColor(Black1,0x000000ff);
    
TextDrawTextSize(Black1,537.000000,0.000000);
    
TextDrawUseBox(Black2,1);
    
TextDrawBoxColor(Black2,0x000000ff);
    
TextDrawTextSize(Black2,593.000000,0.000000);
    
TextDrawUseBox(Black3,1);
    
TextDrawBoxColor(Black3,0x000000ff);
    
TextDrawTextSize(Black3,593.000000,0.000000);
    
TextDrawUseBox(LightBlack,1);
    
TextDrawBoxColor(LightBlack,0x00000033);
    
TextDrawTextSize(LightBlack,589.000000,0.000000);
    
TextDrawAlignment(Black0,0);
    
TextDrawAlignment(Black1,0);
    
TextDrawAlignment(Black2,0);
    
TextDrawAlignment(Black3,0);
    
TextDrawAlignment(LightBlack,0);
    
TextDrawBackgroundColor(Black0,0x000000ff);
    
TextDrawBackgroundColor(Black1,0x000000ff);
    
TextDrawBackgroundColor(Black2,0x000000ff);
    
TextDrawBackgroundColor(Black3,0x000000ff);
    
TextDrawBackgroundColor(LightBlack,0x000000ff);
    
TextDrawFont(Black0,3);
    
TextDrawLetterSize(Black0,1.000000,-0.000000);
    
TextDrawFont(Black1,3);
    
TextDrawLetterSize(Black1,1.300000,4.000000);
    
TextDrawFont(Black2,3);
    
TextDrawLetterSize(Black2,11.100000,-0.000000);
    
TextDrawFont(Black3,3);
    
TextDrawLetterSize(Black3,1.000000,4.099998);
    
TextDrawFont(LightBlack,3);
    
TextDrawLetterSize(LightBlack,1.000000,3.399999);
    
TextDrawColor(Black0,0xffffffff);
    
TextDrawColor(Black1,0xffffffff);
    
TextDrawColor(Black2,0xffffffff);
    
TextDrawColor(Black3,0xffffffff);
    
TextDrawColor(LightBlack,0xffffffff);
    
TextDrawSetOutline(Black0,1);
    
TextDrawSetOutline(Black1,1);
    
TextDrawSetOutline(Black2,1);
    
TextDrawSetOutline(Black3,1);
    
TextDrawSetOutline(LightBlack,1);
    
TextDrawSetProportional(Black0,1);
    
TextDrawSetProportional(Black1,1);
    
TextDrawSetProportional(Black2,1);
    
TextDrawSetProportional(Black3,1);
    
TextDrawSetProportional(LightBlack,1);
    
TextDrawSetShadow(Black0,1);
    
TextDrawSetShadow(Black1,1);
    
TextDrawSetShadow(Black2,1);
    
TextDrawSetShadow(Black3,1);
    
TextDrawSetShadow(LightBlack,1);
    
SetTimer("DashBoard"501);
    return 
0;
}
public 
OnPlayerConnect(playerid)
{
   
J_Carregar(playerid);
   return 
1;
}
forward DashBoard();
public 
DashBoard()
{
    for(new 
i=0i<MAX_PLAYERSi++)
    {
        if(
IsPlayerConnected(i))
        {
            if(
IsPlayerInAnyVehicle(i))
            {
                if(
TextShow[i] == false)
                {
                    
TextDrawShowForPlayer(iText:Black0);
                    
TextDrawShowForPlayer(iText:Black1);
                    
TextDrawShowForPlayer(iText:Black2);
                    
TextDrawShowForPlayer(iText:Black3);
                    
TextDrawShowForPlayer(iText:LightBlack);
                    
TextShow[i] = true;
                }
                new 
String[128];
                new 
Float:XFloat:YFloat:ZFloat:Speed;
                
GetVehicleVelocity(GetPlayerVehicleID(i), XYZ);
                
Speed floatmul(floatmul(floatsqroot(floatadd(floatadd(floatpower(X2), floatpower(Y2)),  floatpower(Z2))), 100.0), 1.5);
                
format(String,sizeof(String),"~b~Velocimetro~n~~r~Velocidade~n~~r~KM/H: ~w~%i"floatround(Speedfloatround_floor));
                if(
VHSCreated[i] == true)
                {
                    
TextDrawDestroy(VHS[i]);
                }
                
VHS[i] = TextDrawCreate(541.000000,137.000000,String);
                
TextDrawAlignment(VHS[i],0);
                
TextDrawBackgroundColor(VHS[i],0x000000ff);
                
TextDrawFont(VHS[i],1);
                
TextDrawLetterSize(VHS[i],0.299999,1.000000);
                
TextDrawColor(VHS[i],0xffffffff);
                
TextDrawSetOutline(VHS[i],1);
                
TextDrawSetProportional(VHS[i],1);
                
TextDrawSetShadow(VHS[i],1);
                
TextDrawShowForPlayer(iVHS[i]);
                
VHSCreated[i] = true;
            }
            else
            {
                if(
TextShow[i] == true)
                {
                    
TextDrawHideForPlayer(iText:Black0);
                    
TextDrawHideForPlayer(iText:Black1);
                    
TextDrawHideForPlayer(iText:Black2);
                    
TextDrawHideForPlayer(iText:Black3);
                    
TextDrawHideForPlayer(iText:LightBlack);
                    
TextDrawHideForPlayer(iText:VHS[i]);
                    
TextShow[i] = false;
                }
            }
        }
    }
}
public 
OnFilterScriptExit()
{
    
SalvarCarros();
    for(new 
0sizeof(CarrosInfo); h++)
    {
        
DestroyVehicle(h);
        
Delete3DTextLabel(Placa[h]);
    }
    return 
1;
}
public 
OnPlayerCommandText(playeridcmdtext[])
{
    new 
cmd[128], nome[MAX_PLAYER_NAME], preco[128], modelo[128], idx;
    
cmd strtok(cmdtextidx);
    if(
strcmp(cmdtext"/meucarro"true) == 0)
    {
        if(
GetPlayerVehicleID(playerid) == JogadorDataBase[playerid][jChaveDoCarro])
        {
            
ShowPlayerDialog(playerid100DIALOG_STYLE_LIST"Meu Carro""Placa\nEstacionar\nTrancar""Acessar""Cancelar");
            return 
1;
        }
        else
        {
            
SendClientMessage(playerid0xFFFFFFFF"Vocк nгo tem um carro, ou nгo estб nele!");
            return 
1;
        }
    }
    if(
strcmp(cmd"/carros"true) == 0)
    {
        
nome strtok(cmdtextidx);
        if(!
strlen(nome)) return SendClientMessage(playerid0xFFFFFF"Uso: /carros [nome] [preзo] [modelo]");
        
preco strtok(cmdtextidx);
        if(!
strlen(preco)) return SendClientMessage(playerid0xFFFFFF"Uso: /carros [nome] [preзo] [modelo]");
        new 
price strval(preco);
        
modelo strtok(cmdtextidx);
        if(!
strlen(modelo)) return SendClientMessage(playerid0xFFFFFF"Uso: /carros [nome] [preзo] [modelo]");
        new 
model strval(modelo);
        
Concessionaria(playeridnomepricemodelSPAWN_XSPAWN_YSPAWN_ZANGULO);
    }
    if(
strcmp(cmdtext"/concessionaria"true) == 0)
    {
        
ShowPlayerDialog(playerid10DIALOG_STYLE_LIST"Concessionбria""Suvs & Vans\nSedans & Compactos\nSedans de Luxo\nMuscle Cars\nCarros de Rua\nCarros Esporte\nCaminhхes, Utilitбrios e Picapes\nLowriders\nBicicletas e Motocicletas""Acessar""Cancelar");
        return 
1;
    }
    if(
strcmp(cmdtext"/irconcessionaria"true) == 0)
    {
        
SetPlayerPos(playeridSPAWN_XSPAWN_YSPAWN_Z);
        return 
1;
    }
    return 
0;
}
public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    new 
playername[MAX_PLAYER_NAME];
    if(
IsPlayerConnected(playerid))
    {
        if(
dialogid == 100)
        {
            if(
response)
            {
                if(
listitem == 0)
                {
                    
ShowPlayerDialog(playerid101,DIALOG_STYLE_INPUT"Minha Placa""Digite aqui o texto de sua placa!""Aceitar""Cancelar");
                    return 
1;
                }
                if(
listitem == 1)
                {
                    new 
Float:x,Float:y,Float:z;
                    new 
Float:a;
                    new 
carid;
                    new 
getcarid;
                    
carid JogadorDataBase[playerid][jChaveDoCarro];
                    
getcarid GetPlayerVehicleID(playerid);
                    
GetPlayerName(playeridplayernamesizeof(playername));
                    
GetVehiclePos(caridxyz);
                    
GetVehicleZAngle(carida);
                    if(
IsPlayerInVehicle(playerid,carid) && CarrosInfo[carid][cComprado] == 1)
                    {
                        if(
carid != getcarid)
                        {
                            
SendClientMessage(playerid0xFFFFFFFF"Vocк nгo tem um carro, ou nгo estб nele!");
                            return 
1;
                        }
                        if(
getcarid == carid)
                        {
                            
CarrosInfo[carid][cx] = x;
                            
CarrosInfo[carid][cy] = y;
                            
CarrosInfo[carid][cz] = z;
                            
CarrosInfo[carid][cangulo] = a;
                            
GameTextForPlayer(playerid"Voce acaba de estacionar seu carro nessa posicao!"10003);
                            
SalvarCarros();
                            
DestroyVehicle(carid);
                            
CreateVehicle(CarrosInfo[carid][cModelo],CarrosInfo[carid][cx],CarrosInfo[carid][cy],CarrosInfo[carid][cz]+1.0,CarrosInfo[carid][cangulo],CarrosInfo[carid][cCor1],CarrosInfo[carid][cCor2],60000);
                            
TogglePlayerControllable(playerid1);
                            return 
1;
                        }
                    }
                }
                if(
listitem == 2)
                {
                    new 
CarKey JogadorDataBase[playerid][jChaveDoCarro];
                    if(
CarKey == CarrosInfo[CarKey][cRegistrado])
                    {
                        if(
CarrosInfo[CarKey][cTrava] == 1)
                        {
                           for(new 
0MAX_PLAYERSi++)
                           {
                                if (
IsPlayerConnected(i))
                                {
                                    
SetVehicleParamsForPlayer(CarKey,i,0,0);
                                }
                           }
                           
GameTextForPlayer(playerid"~w~Carro~n~~g~Destrancado"40003);
                           
CarrosInfo[CarKey][cTrava] = 0;
                           
SalvarCarros();
                           return 
1;
                       }
                       else if(
CarrosInfo[CarKey][cTrava] == 0)
                       {
                           for(new 
0MAX_PLAYERSi++)
                           {
                               if (
IsPlayerConnected(i))
                               {
                                    
SetVehicleParamsForPlayer(CarKey,i,0,1);
                               }
                           }
                           
GameTextForPlayer(playerid"~w~Carro~n~~r~trancado"40003);
                           
CarrosInfo[CarKey][cTrava] = 1;
                           
SalvarCarros();
                           return 
1;
                        }
                        else
                        {
                            
SendClientMessage(playerid0xFFFFFFFF" Vocк nгo estб perto de seu carro, ou nгo tem um carro!");
                            return 
1;
                        }
                   }
                }
            }
        }
        if(
dialogid == 101)
        {
            if(
response)
            {
                new 
plate[128], inputtext0[255];
                new 
carid GetPlayerVehicleID(playerid);
                
format(inputtext0sizeof(inputtext0), "%s"inputtext);
                
strmid(gPlaca[playerid], inputtext00254255);
                
strmid(JogadorDataBase[playerid][jPlaca], inputtext0127);
                
strmid(CarrosInfo[carid][cPlaca], inputtext029);
                
J_Salvar(playerid);
                
SalvarCarros();
                
format(platesizeof(plate), "Vocк digitou o texto: %s"inputtext);
                
SendClientMessage(playerid0xFFFFFFFFplate);
                
Placa[carid] = Create3DTextLabel(inputtext0xFFFFFFFF0.00.00.060, -10);
                
Attach3DTextLabelToVehicle(Placa[carid], carid0.0, -2.90.0);
                
ShowPlayerDialog(playerid102DIALOG_STYLE_LIST,"Cores de Placa""Marrom\nPreto\nAzul\nVerde\nBranco\nVermelho\nAmarelo\nAzul Claro\nVerde Escuro""Selecionar""Sair");
            }
            return 
1;
        }
        if(
dialogid == 102)
        {
            if(
response)
            {
                new 
carid GetPlayerVehicleID(playerid);
                new 
result[200];
                
format(resultsizeof(result), "[Placa]\n[|%s|]"gPlaca[playerid]);
                if(
listitem == 0)
                {
                    
Update3DTextLabelText(Placa[carid], 0x6D3636FFresult);
                }
                if(
listitem == 1)
                {
                    
Update3DTextLabelText(Placa[carid], 0x000000FFresult);
                }
                if(
listitem == 2)
                {
                    
Update3DTextLabelText(Placa[carid], 0x2828FFFFresult);
                }
                if(
listitem == 3)
                {
                    
Update3DTextLabelText(Placa[carid], 0x00C10AFFresult);
                }
                if(
listitem == 4)
                {
                    
Update3DTextLabelText(Placa[carid], 0xFFFFFFFFresult);
                }
                if(
listitem == 5)
                {
                    
Update3DTextLabelText(Placa[carid], 0xFF0006FFresult);
                }
                if(
listitem == 6)
                {
                    
Update3DTextLabelText(Placa[carid], 0xFFFF00FFresult);
                }
                if(
listitem == 7)
                {
                    
Update3DTextLabelText(Placa[carid], 0x00FFFFFFresult);
                }
                if(
listitem == 8)
                {
                    
Update3DTextLabelText(Placa[carid], 0x008000FFresult);
                }
                
Attach3DTextLabelToVehicle(Placa[GetPlayerVehicleID(playerid)], carid0.0,-2.9,0.0);
                
SendClientMessage(playerid0xFFFFFFFF"PARABЙNS! Sua placa estб completa e instalada!");
            }
            return 
1;
        }
        if(
dialogid == 10)
        {
            if(
response)
            {
                if (
listitem == 0)
                {
                    
Concessionaria(playerid"Infernus"Car_Infernus411SPAWN_XSPAWN_YSPAWN_ZANGULO);
                }
                if(
listitem == 1)
                {
                    
Concessionaria(playerid"Cheetah"Car_Cheetah415SPAWN_XSPAWN_YSPAWN_ZANGULO);
                }
                if(
listitem == 2)
                {
                    
Concessionaria(playerid"Banshee"Car_Banshee429SPAWN_XSPAWN_YSPAWN_ZANGULO);
                }
                if(
listitem == 3)
                {
                    
Concessionaria(playerid"Hotknife"Car_Hotknife434SPAWN_XSPAWN_YSPAWN_ZANGULO);
                }
                if(
listitem == 4)
                {
                    
Concessionaria(playerid"Turismo"Car_Turismo451SPAWN_XSPAWN_YSPAWN_ZANGULO);
                }
                if(
listitem == 5)
                {
                    
Concessionaria(playerid"ZR 350"Car_ZR_350477SPAWN_XSPAWN_YSPAWN_ZANGULO);
                }
                if(
listitem == 6)
                {
                    
Concessionaria(playerid"Comet"Car_Comet480SPAWN_XSPAWN_YSPAWN_ZANGULO);
                }
                if (
listitem == 7)
                {
                    
Concessionaria(playerid"Super GT"Car_Super_GT506SPAWN_XSPAWN_YSPAWN_ZANGULO);
                }
                if (
listitem == 8)
                {
                    
Concessionaria(playerid"Windsor"Car_Windsor555SPAWN_XSPAWN_YSPAWN_ZANGULO);
                }
                if (
listitem == 9)
                {
                    
Concessionaria(playerid"Feltzer"Car_Feltzer533SPAWN_XSPAWN_YSPAWN_ZANGULO);
                }
                if (
listitem == 10)
                {
                    
Concessionaria(playerid"Euros"Car_Euros587SPAWN_XSPAWN_YSPAWN_ZANGULO);
                }
            }
        }
    }
    else
    {
       return 
0;
    }
    return 
1;

Reply


Messages In This Thread
Arumar FS - by RNT - 12.08.2012, 02:32
Re: Arumar FS - by .FuneraL. - 12.08.2012, 02:39
Re: Arumar FS - by Jonas_Alves - 12.08.2012, 02:44
Respuesta: Arumar FS - by RNT - 12.08.2012, 02:52
Respuesta: Arumar FS - by RNT - 12.08.2012, 03:35
Respuesta: Arumar FS - by AnonymouSs - 12.08.2012, 03:42
Re: Arumar FS - by .FuneraL. - 12.08.2012, 03:45
Respuesta: Arumar FS - by RNT - 12.08.2012, 03:45
Re: Arumar FS - by .FuneraL. - 12.08.2012, 03:50
Re: Respuesta: Arumar FS - by Tony_Rodrigues - 12.08.2012, 05:01

Forum Jump:


Users browsing this thread: 7 Guest(s)