[Ajuda] Arumar FS
#1

Тla pessoal baixei um FS e lee veio repleto de erros, como pouco sei vin aqui pedir jauda de vc's..
cod:
pawn Код:
// 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 ReturnPlayerName( playerid )
{
    new
    NameString[ MAX_PLAYER_NAME ],
    stringPos;
    GetPlayerName( playerid, NameString, MAX_PLAYER_NAME );
    stringPos = strfind( NameString, "_" );
    NameString[ stringPos ] = ' ';
    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(playerid, playername3, sizeof(playername3));
        format(string3, sizeof(string3), "LeLeTe/%s.ini", playername3);
        new File: hFile = fopen(string3, io_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(playerid, playername2, sizeof(playername2));
    split(playername2, playernamesplit, '_');
    format(string2, sizeof(string2), "LeLeTe/%s.ini", playername2);
    new File: UserFile = fopen(string2, io_read);
    if ( UserFile )
    {
        new key[256], val[ 256 ];
        new Data[ 256 ];
        while ( fread( UserFile , Data , sizeof( Data ) ) )
        {
            key = ini_GetValue( Data );
            if( strcmp( key , "jChaveDoCarro" , true ) == 0 ) { val = ini_GetValue( Data ); JogadorDataBase[playerid][jChaveDoCarro] = strval( val ); }
            if( strcmp( key , "jPlaca" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(JogadorDataBase[playerid][jPlaca], val, 0, strlen(val)-1, 255); }
            if( strcmp( key , "gPlaca" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(gPlaca[playerid], val, 0, strlen(val)-1, 255); }
        }
        fclose(UserFile);
    }
    return 1;
}

forward ini_GetKey( line[] )
forward ini_GetValue( line[] )
stock ini_GetKey( line[] )
{
    new keyRes[256];
    keyRes[0] = 0;
    if ( strfind( line , "=" , true ) == -1 ) return keyRes;
    strmid( keyRes , line , 0 , strfind( line , "=" , true ) , sizeof( keyRes) );
    return keyRes;
}

stock ini_GetValue( line[] )
{
    new valRes[256];
    valRes[0]=0;
    if ( strfind( line , "=" , true ) == -1 ) return valRes;
    strmid( valRes , line , strfind( line , "=" , true )+1 , strlen( line ) , sizeof( valRes ) );
    return valRes;
}

forward split(const strsrc[], strdest[][], delimiter);
public split(const strsrc[], strdest[][], delimiter)
{
    new i, li;
    new aNum;
    new len;
    while(i <= strlen(strsrc)){
        if(strsrc[i]==delimiter || i==strlen(strsrc)){
            len = strmid(strdest[aNum], strsrc, li, i, 128);
            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(playerid, vehicleid, ispassenger);
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(CarrosInfo[vehicleid][cTrava] == 1 && CarrosInfo[vehicleid][cComprado] == 1)
    {
        new Float:Cx, Float:Cy, Float:Cz;
        GetPlayerPos(playerid, Cx, Cy, Cz);
        SetPlayerPos(playerid, Cx, Cy, Cz);
    }
    new string[128];
    format(string,sizeof(string),"|| Dono deste carro: %s ||",CarrosInfo[vehicleid][cDono]);
    SendClientMessage(playerid, 0x1A1AFFAA, string);
    return 1;
}

forward CarregarCarros();
public CarregarCarros()
{
    new arrCoords[14][64];
    new strFromFile2[256];
    new File: file = fopen("LeLeTe/Concessionaria_Carros.cfg", io_read);
    if (file)
    {
        new idx = CARROS;
        while (idx < sizeof(CarrosInfo))
        {
            fread(file, strFromFile2);
            split(strFromFile2, arrCoords, ',');
            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], 0, strlen(arrCoords[7]), 255);
            strmid(CarrosInfo[idx][cNome], arrCoords[8], 0, strlen(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], 0, strlen(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 File: file2;
    new idx = CARROS;
    while (idx < sizeof(CarrosInfo))
    {
        new coordsstring[256];
        format(coordsstring, sizeof(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(file2, coordsstring);
        idx++;
        fclose(file2);
    }
    return 1;
}

stock CheckPlayerDistanceToVehicle(Float:radi, playerid, vehicleid)
{
    if(IsPlayerConnected(playerid))
    {
        new Float:PX,Float:PY,Float:PZ,Float:X,Float:Y,Float:Z;
        GetPlayerPos(playerid,PX,PY,PZ);
        GetVehiclePos(vehicleid, X,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(playerid, nomedocarro[MAX_PLAYER_NAME], preco, modelo, Float:posX, Float:posY, Float:posZ, Float:angulo)
{
    if(GetPlayerMoney(playerid) >= preco )
    {
        new colorOne = 0 + random(255);
        new colorTwo = 0 + 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], sendername, 0, strlen(sendername), 999);
        new result[128];
        format(result, sizeof(result), "[Por:LeLeTe]\n[|%s|]", nomedocarro);
        Placa[idcar] = Create3DTextLabel(result, 0xFFFFFFFF, 0.0, 0.0, 0.0, 50.0, -1, 0);
        Attach3DTextLabelToVehicle(Placa[idcar],idcar, 0.0, -2.9, 0.0);
        GivePlayerMoney(playerid,-preco);
        SendClientMessage(playerid, 0xFFFFFFFF, "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 h = CARROS; h < sizeof(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(result, sizeof(result), "[Placa]\n[|%s|]", CarrosInfo[h][cPlaca]);
        Placa[h] = Create3DTextLabel(result, 0xFFFFFFFF, 0.0, 0.0, 0.0, 50.0, -1, 0);
        Attach3DTextLabelToVehicle(Placa[h], h, 0.0, -2.9, 0.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", 50, 1);
    return 0;
}

public OnPlayerConnect(playerid)
{
   J_Carregar(playerid);
   return 1;
}

forward DashBoard();
public DashBoard()
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(IsPlayerInAnyVehicle(i))
            {
                if(TextShow[i] == false)
                {
                    TextDrawShowForPlayer(i, Text:Black0);
                    TextDrawShowForPlayer(i, Text:Black1);
                    TextDrawShowForPlayer(i, Text:Black2);
                    TextDrawShowForPlayer(i, Text:Black3);
                    TextDrawShowForPlayer(i, Text:LightBlack);
                    TextShow[i] = true;
                }
                new String[128];
                new Float:X, Float:Y, Float:Z, Float:Speed;
                GetVehicleVelocity(GetPlayerVehicleID(i), X, Y, Z);
                Speed = floatmul(floatmul(floatsqroot(floatadd(floatadd(floatpower(X, 2), floatpower(Y, 2)),  floatpower(Z, 2))), 100.0), 1.5);
                format(String,sizeof(String),"~b~Velocimetro~n~~r~Velocidade~n~~r~KM/H: ~w~%i", floatround(Speed, floatround_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(i, VHS[i]);
                VHSCreated[i] = true;

            }
            else
            {
                if(TextShow[i] == true)
                {
                    TextDrawHideForPlayer(i, Text:Black0);
                    TextDrawHideForPlayer(i, Text:Black1);
                    TextDrawHideForPlayer(i, Text:Black2);
                    TextDrawHideForPlayer(i, Text:Black3);
                    TextDrawHideForPlayer(i, Text:LightBlack);
                    TextDrawHideForPlayer(i, Text:VHS[i]);
                    TextShow[i] = false;
                }
            }
        }
    }
}

public OnFilterScriptExit()
{
    SalvarCarros();
    for(new h = 0; h < sizeof(CarrosInfo); h++)
    {
        DestroyVehicle(h);
        Delete3DTextLabel(Placa[h]);
    }
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    new cmd[128], nome[MAX_PLAYER_NAME], preco[128], modelo[128], idx;
    cmd = strtok(cmdtext, idx);
    if(strcmp(cmdtext, "/meucarro", true) == 0)
    {
        if(GetPlayerVehicleID(playerid) == JogadorDataBase[playerid][jChaveDoCarro])
        {
            ShowPlayerDialog(playerid, 100, DIALOG_STYLE_LIST, "Meu Carro", "Placa\nEstacionar\nTrancar", "Acessar", "Cancelar");
            return 1;
        }
        else
        {
            SendClientMessage(playerid, 0xFFFFFFFF, "Vocк nгo tem um carro, ou nгo estб nele!");
            return 1;
        }
    }
    if(strcmp(cmd, "/carros", true) == 0)
    {
        nome = strtok(cmdtext, idx);
        if(!strlen(nome)) return SendClientMessage(playerid, 0xFFFFFF, "Uso: /carros [nome] [preзo] [modelo]");
        preco = strtok(cmdtext, idx);
        if(!strlen(preco)) return SendClientMessage(playerid, 0xFFFFFF, "Uso: /carros [nome] [preзo] [modelo]");
        new price = strval(preco);
        modelo = strtok(cmdtext, idx);
        if(!strlen(modelo)) return SendClientMessage(playerid, 0xFFFFFF, "Uso: /carros [nome] [preзo] [modelo]");
        new model = strval(modelo);
        Concessionaria(playerid, nome, price, model, SPAWN_X, SPAWN_Y, SPAWN_Z, ANGULO)
    }
    if(strcmp(cmdtext, "/concessionaria", true) == 0)
    {
        ShowPlayerDialog(playerid, 10, DIALOG_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(playerid, SPAWN_X, SPAWN_Y, SPAWN_Z);
        return 1;
    }
    return 0;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    new playername[MAX_PLAYER_NAME];
    if(IsPlayerConnected(playerid))
    {
        if(dialogid == 100)
        {
            if(response)
            {
                if(listitem == 0)
                {
                    ShowPlayerDialog(playerid, 101,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(playerid, playername, sizeof(playername));
                    GetVehiclePos(carid, x, y, z);
                    GetVehicleZAngle(carid, a);
                    if(IsPlayerInVehicle(playerid,carid) && CarrosInfo[carid][cComprado] == 1)
                    {
                        if(carid != getcarid)
                        {
                            SendClientMessage(playerid, 0xFFFFFFFF, "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!", 1000, 3);
                            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(playerid, 1);
                            return 1;
                        }
                    }
                }
                if(listitem == 2)
                {
                    new CarKey = JogadorDataBase[playerid][jChaveDoCarro];
                    if(CarKey == CarrosInfo[CarKey][cRegistrado])
                    {
                        if(CarrosInfo[CarKey][cTrava] == 1)
                        {
                           for(new i = 0; i < MAX_PLAYERS; i++)
                           {
                                if (IsPlayerConnected(i))
                                {
                                    SetVehicleParamsForPlayer(CarKey,i,0,0);
                                }
                           }
                           GameTextForPlayer(playerid, "~w~Carro~n~~g~Destrancado", 4000, 3);
                           CarrosInfo[CarKey][cTrava] = 0;
                           SalvarCarros();
                           return 1;
                       }
                       else if(CarrosInfo[CarKey][cTrava] == 0)
                       {
                           for(new i = 0; i < MAX_PLAYERS; i++)
                           {
                               if (IsPlayerConnected(i))
                               {
                                    SetVehicleParamsForPlayer(CarKey,i,0,1);
                               }
                           }
                           GameTextForPlayer(playerid, "~w~Carro~n~~r~trancado", 4000, 3);
                           CarrosInfo[CarKey][cTrava] = 1;
                           SalvarCarros();
                           return 1;
                        }
                        else
                        {
                            SendClientMessage(playerid, 0xFFFFFFFF, " 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(inputtext0, sizeof(inputtext0), "%s", inputtext);
                strmid(gPlaca[playerid], inputtext0, 0, 254, 255);
                strmid(JogadorDataBase[playerid][jPlaca], inputtext, 0, 127);
                strmid(CarrosInfo[carid][cPlaca], inputtext, 0, 29);
                J_Salvar(playerid);
                SalvarCarros();
                format(plate, sizeof(plate), "Vocк digitou o texto: %s", inputtext);
                SendClientMessage(playerid, 0xFFFFFFFF, plate);
                Placa[carid] = Create3DTextLabel(inputtext, 0xFFFFFFFF, 0.0, 0.0, 0.0, 60, -1, 0);
                Attach3DTextLabelToVehicle(Placa[carid], carid, 0.0, -2.9, 0.0);
                ShowPlayerDialog(playerid, 102, DIALOG_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(result, sizeof(result), "[Placa]\n[|%s|]", gPlaca[playerid]);
                if(listitem == 0)
                {
                    Update3DTextLabelText(Placa[carid], 0x6D3636FF, result);
                }
                if(listitem == 1)
                {
                    Update3DTextLabelText(Placa[carid], 0x000000FF, result);
                }
                if(listitem == 2)
                {
                    Update3DTextLabelText(Placa[carid], 0x2828FFFF, result);
                }
                if(listitem == 3)
                {
                    Update3DTextLabelText(Placa[carid], 0x00C10AFF, result);
                }
                if(listitem == 4)
                {
                    Update3DTextLabelText(Placa[carid], 0xFFFFFFFF, result);
                }
                if(listitem == 5)
                {
                    Update3DTextLabelText(Placa[carid], 0xFF0006FF, result);
                }
                if(listitem == 6)
                {
                    Update3DTextLabelText(Placa[carid], 0xFFFF00FF, result);
                }
                if(listitem == 7)
                {
                    Update3DTextLabelText(Placa[carid], 0x00FFFFFF, result);
                }
                if(listitem == 8)
                {
                    Update3DTextLabelText(Placa[carid], 0x008000FF, result);
                }
                Attach3DTextLabelToVehicle(Placa[GetPlayerVehicleID(playerid)], carid, 0.0,-2.9,0.0);
                SendClientMessage(playerid, 0xFFFFFFFF, "PARABЙNS! Sua placa estб completa e instalada!");
            }
            return 1;
        }
        if(dialogid == 10)
        {
            if(response)
            {
                if (listitem == 0)
                {
                    Concessionaria(playerid, "Infernus", Car_Infernus, 411, SPAWN_X, SPAWN_Y, SPAWN_Z, ANGULO);
                }
                if(listitem == 1)
                {
                    Concessionaria(playerid, "Cheetah", Car_Cheetah, 415, SPAWN_X, SPAWN_Y, SPAWN_Z, ANGULO);
                }
                if(listitem == 2)
                {
                    Concessionaria(playerid, "Banshee", Car_Banshee, 429, SPAWN_X, SPAWN_Y, SPAWN_Z, ANGULO);
                }
                if(listitem == 3)
                {
                    Concessionaria(playerid, "Hotknife", Car_Hotknife, 434, SPAWN_X, SPAWN_Y, SPAWN_Z, ANGULO);
                }
                if(listitem == 4)
                {
                    Concessionaria(playerid, "Turismo", Car_Turismo, 451, SPAWN_X, SPAWN_Y, SPAWN_Z, ANGULO);
                }
                if(listitem == 5)
                {
                    Concessionaria(playerid, "ZR 350", Car_ZR_350, 477, SPAWN_X, SPAWN_Y, SPAWN_Z, ANGULO);
                }
                if(listitem == 6)
                {
                    Concessionaria(playerid, "Comet", Car_Comet, 480, SPAWN_X, SPAWN_Y, SPAWN_Z, ANGULO);
                }
                if (listitem == 7)
                {
                    Concessionaria(playerid, "Super GT", Car_Super_GT, 506, SPAWN_X, SPAWN_Y, SPAWN_Z, ANGULO);
                }
                if (listitem == 8)
                {
                    Concessionaria(playerid, "Windsor", Car_Windsor, 555, SPAWN_X, SPAWN_Y, SPAWN_Z, ANGULO);
                }
                if (listitem == 9)
                {
                    Concessionaria(playerid, "Feltzer", Car_Feltzer, 533, SPAWN_X, SPAWN_Y, SPAWN_Z, ANGULO);
                }
                if (listitem == 10)
                {
                    Concessionaria(playerid, "Euros", Car_Euros, 587, SPAWN_X, SPAWN_Y, SPAWN_Z, ANGULO);
                }
            }
        }
    }
    else
    {
       return 0;
    }
    return 1;
}
Erro:
pawn Код:
[/PAWNC:\Users\User\Desktop\conce.pwn(129) : error 001: expected token: ";", but found "forward"
C:\Users\User\Desktop\conce.pwn(130) : error 001: expected token: ";", but found "stock"
C:\Users\User\Desktop\conce.pwn(298) : error 001: expected token: ";", but found "-identifier-"
C:\Users\User\Desktop\conce.pwn(502) : error 001: expected token: ";", but found "}"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
Dai so consegui arumar um erro , o da stock que ta faltando lб em cima... emfim espero que me ajuden..
@ Obs. desculpa pelos erros de ortografia, й pq algumas teclas aqui tгo ''FAIL''...
Reply
#2

pawn Код:
forward ini_GetKey( line[] );
forward ini_GetValue( line[] );
Que eu achei era isso, depois poste as linhas + erros se houver mais, para facilitar a visгo
Reply
#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
#4

Jonas_Alves , deve saber muito PAWN , tirou os erros muito rapido...
@edit , vou ver se funcionou bacana !
Reply
#5

@duple post
* aproveitando aqui man da uma ajuda aqui nisso tbem Pf..
olha sу
pawn Код:
/*
>>>>>>>>>>>>>>>>>>>>>>>>>>>> Crйditos :
                            []BlackGangsta[] - Idealizador e Criador
                            Josma_CMD - Ajudante - Ajudou em varias coisas no FilterScript


*/

#include < a_samp >
#include < Dini >
enum iCarro
{
    s_Dono[ 24 ],
    s_Modelo,
    Float:s_PosX,
    Float:s_PosY,
    Float:s_PosZ,
    Float:s_PosA,
    s_Cor1,
    s_Cor2,
    s_Respawn
};
new
    InfoCarro [ MAX_PLAYERS ] [ iCarro ] ,
    CarroJogador [ MAX_PLAYERS ] ,
    String [ 128 ] ,
    Checkpoint [ MAX_PLAYERS ] ,
    NomeCarro [ MAX_PLAYERS ] ,
    CarroJogadorEntrar [ MAX_PLAYERS ]
    ;

new NomeVeiculos[212][] =
{
    "400 - Landstalker",        "401 - Bravura",            "402 - Buffalo",    "403 - Linerunner",         "404 - Pereniel",       "405 - Sentinel",       "406 - Dumper",             "407 - Firetruck",      "408 - Trashmaster",    "409 - Stretch",
    "410 - Manana",             "411 - Infernus",           "412 - Voodoo",     "413 - Pony",               "414 - Mule",           "415 - Cheetah",        "416 - Ambulance",          "417 - Leviathan",      "418 - Moonbeam",       "419 - Esperanto",          "420 - Taxi",
    "421 - Washington",         "422 - Bobcat",             "423 - Mr Whoopee", "424 - BF Injection",       "425 - Hunter",         "426 - Premier",        "427 - Enforcer",           "428 - Securicar",      "429 - Banshee",        "430 - Predator",
    "431 - Bus",                "432 - Rhino",              "433 - Barracks",   "434 - Hotknife",           "435 - Trailer",        "436 - Previon",        "437 - Coach",              "438 - Cabbie",         "439 - Stallion",       "440 - Rumpo",              "441 - RC Bandit",      "442 - Romero",
    "443 - Packer",             "444 - Monster",            "445 - Admiral",    "446 - Squalo",             "447 - Seasparrow",     "448 - Pizzaboy",       "449 - Tram",               "450 - Trailer",        "451 - Turismo",        "452 - Speeder",            "453 - Reefer",         "454 - Tropic",         "455 - Flatbed",
    "456 - Yankee",             "457 - Caddy",              "458 - Solair",     "459 - Berkley's RC Van",   "460 - Skimmer",        "461 - PCJ-600",        "462 - Faggio",             "463 - Freeway",        "464 - RC Baron",       "465 - RC Raider",
    "466 - Glendale",           "467 - Oceanic",            "468 - Sanchez",    "469 - Sparrow",            "470 - Patriot",        "471 - Quad",           "472 - Coastguard",         "473 - Dinghy",         "474 - Hermes",         "475 - Sabre",              "476 - Rustler",
    "477 - ZR350",              "478 - Walton",             "479 - Regina",     "480 - Comet",              "481 - BMX",            "482 - Burrito",        "483 - Camper",             "484 - Marquis",        "485 - Baggage",        "486 - Dozer",              "487 - Maverick",       "488 - News Chopper",
    "489 - Rancher",            "490 - FBI Rancher",        "491 - Virgo",      "492 - Greenwood",          "493 - Jetmax",         "494 - Hotring",        "495 - Sandking",           "496 - Blista Compact", "497 - Police Maverick",
    "498 - Boxville",           "499 - Benson",             "500 - Mesa",       "501 - RC Goblin",          "502 - Hotring Racer",  "503 - Hotring Racer",  "504 - Bloodring Banger",   "505 - Rancher",        "506 - Super GT",
    "507 - Elegant",            "508 - Journey",            "509 - Bike",       "510 - Mountain Bike",      "511 - Beagle",         "512 - Cropdust",       "513 - Stunt",              "514 - Tanker",         "515 - RoadTrain",      "516 - Nebula",             "517 - Majestic",
    "518 - Buccaneer",          "519 - Shamal",             "520 - Hydra",      "521 - FCR-900",            "522 - NRG-500",        "523 - HPV1000",        "524 - Cement Truck",       "525 - Tow Truck",      "526 - Fortune",        "527 - Cadrona",            "528 - FBI Truck",
    "529 - Willard",            "530 - Forklift",           "531 - Tractor",    "532 - Combine",            "533 - Feltzer",        "534 - Remington",      "535 - Slamvan",            "536 - Blade",          "537 - Freight",        "538 - Streak",             "539 - Vortex",         "540 - Vincent",
    "541 - Bullet",             "542 - Clover",             "543 - Sadler",     "544 - Firetruck",          "545 - Hustler",        "546 - Intruder",       "547 - Primo",              "548 - Cargobob",       "549 - Tampa",          "550 - Sunrise",            "551 - Merit",          "552 - Utility",
    "553 - Nevada",             "554 - Yosemite",           "555 - Windsor",    "556 - Monster",            "557 - Monster",        "558 - Uranus",         "559 - Jester",             "560 - Sultan",         "561 - Stratum",        "562 - Elegy",              "563 - Raindance",      "564 - RC Tiger",
    "565 - Flash",              "566 - Tahoma",             "567 - Savanna",    "568 - Bandito",            "569 - Freight",        "570 - Trailer",        "571 - Kart",               "572 - Mower",          "573 - Duneride",       "574 - Sweeper",            "575 - Broadway",
    "576 - Tornado",            "577 - AT-400",             "578 - DFT-30",     "579 - Huntley",            "580 - Stafford",       "581 - BF-400",         "582 - Newsvan",            "583 - Tug",            "584 - Trailer",        "585 - Emperor",            "586 - Wayfarer",
    "587 - Euros",              "588 - Hotdog",             "589 - Club",       "590 - Trailer",            "591 - Trailer",        "592 - Andromada",      "593 - Dodo",               "594 - RC Cam",         "595 - Launch",         "596 - Police Car (LSPD)",   "597 - Police Car (SFPD)",
    "598 - Police Car (LVPD)",   "599 - Police Ranger",     "600 - Picador",    "601 - S.W.A.T. Van",       "602 - Alpha",          "603 - Phoenix",        "604 - Glendale",           "605 - Sadler",         "606 - Luggage Trailer A",
    "607 - Luggage Trailer B",   "608 - Stair Trailer",     "609 - Boxville",   "610 - Farm Plow",          "611 - Utility Trailer"
};

enum iVenda {ModeloCarro,PrecoCarro};

new
    InfoVenda[103][iVenda] =
{
    {400 , 50000} ,
    {401 , 35000} ,
    {402 , 100000} ,
    {403 , 120000} ,
    {404 , 20000} ,
    {405 , 35000} ,
    {409 , 150000} ,
    {410 , 15000} ,
    {411 , 400000} ,
    {412 , 25000} ,
    {415 , 200000} ,
    {418 , 20000} ,
    {419 , 20000} ,
    {421 , 25000} ,
    {422 , 15000} ,
    {424 , 10000} ,
    {426 , 30000} ,
    {429 , 200000} ,
    {434 , 25000} ,
    {436 , 12000} ,
    {439 , 12000} ,
    {445 , 18000} ,
    {451 , 450000} ,
    {457 , 10000} ,
    {458 , 18000} ,
    {461 , 8000} ,
    {462 , 5000} ,
    {463 , 13000} ,
    {466 , 15000} ,
    {467 , 18000} ,
    {468 , 15000} ,
    {471 , 10000} ,
    {474 , 25000} ,
    {475 , 30000} ,
    {477 , 40000} ,
    {478 , 8000} ,
    {479 , 14000} ,
    {480 , 50000} ,
    {481 , 500} ,
    {483 , 16000} ,
    {489 , 27000} ,
    {491 , 17000} ,
    {492 , 19000} ,
    {495 , 32000} ,
    {496 , 25000} ,
    {500 , 29000} ,
    {502 , 500000} ,
    {505 , 27000} ,
    {506 , 80000} ,
    {507 , 22000} ,
    {508 , 30000} ,
    {509 , 500} ,
    {510 , 13000} ,
    {514 , 60000} ,
    {515 , 60000} ,
    {516 , 20000} ,
    {517 , 15000} ,
    {518 , 17500} ,
    {521 , 70000} ,
    {522 , 100000} ,
    {526 , 20000} ,
    {527 , 20000} ,
    {529 , 22000} ,
    {533 , 23500} ,
    {534 , 32000} ,
    {535 , 35000} ,
    {536 , 35000} ,
    {540 , 32700} ,
    {541 , 350000} ,
    {542 , 28000} ,
    {543 , 20000} ,
    {545 , 20000} ,
    {546 , 28000} ,
    {547 , 27000} ,
    {549 , 22000} ,
    {550 , 35000} ,
    {551 , 32000} ,
    {554 , 25000} ,
    {555 , 20000} ,
    {558 , 75000} ,
    {559 , 80000} ,
    {560 , 100000} ,
    {561 , 65000} ,
    {562 , 60000} ,
    {565 , 50000} ,
    {566 , 30000} ,
    {567 , 35000} ,
    {571 , 5000} ,
    {572 , 5000} ,
    {575 , 13000} ,
    {576 , 35000} ,
    {579 , 40000} ,
    {580 , 30000} ,
    {581 , 38000} ,
    {585 , 23500} ,
    {586 , 15000} ,
    {587 , 37000} ,
    {589 , 30000} ,
    {600 , 12000} ,
    {602 , 37000} ,
    {603 , 45000} ,
    {604 , 7000} ,
    {605 , 8000}
};

public
    OnVehicleSpawn ( vehicleid )
{
    for(new i ; i < MAX_PLAYERS ; ++i)
    {
            format ( String , 30 , "GMNovo/CarrosProprios/%s.ini" , PlayerName ( i ) ) ;
            if ( fexist ( String ) )
            {
                if ( dini_Int ( String , "Estacionado" ) == 10 )
                {
                    SetVehiclePos ( vehicleid , dini_Int ( String , "PosX" ) , dini_Int ( String , "PosY" ) , dini_Int ( String , "PosZ" ) ) ;
                }
            }
        }
    return true ;
}


public
    OnGameModeExit ( )
    {
    SetTimer ( "GameModeExitFunc" , 2000 , 0 ) ;
    return true ;
}

public
    OnPlayerConnect ( playerid )
    {

        format ( String , sizeof ( String ) , "GMNovo/CarrosProprios/%s.ini" , PlayerName ( playerid ) ) ;
        if ( dini_Exists ( String ) )
        {
            InfoCarro[ playerid ] [ s_Dono ] = dini_Int ( String , "DonoCarro" ) ;
            InfoVenda[ playerid ] [ ModeloCarro ] = dini_Int ( String , "Modelo" ) ;
            InfoCarro[ playerid ] [ s_PosX ] = dini_Float ( String , "PosX" ) ;
            InfoCarro[ playerid ] [ s_PosY ] = dini_Float ( String , "PosY" ) ;
            InfoCarro[ playerid ] [ s_PosZ ] = dini_Float ( String , "PosZ" ) ;
            InfoCarro[ playerid ] [ s_PosA ] = dini_Float ( String , "Angulo" ) ;
            InfoCarro[ playerid ] [ s_Cor1 ] = dini_Int ( String , "Cor1" ) ;
            InfoCarro[ playerid ] [ s_Cor2 ] = dini_Int ( String , "Cor2" ) ;
            InfoCarro[ playerid ] [ s_Respawn ] = dini_Int ( String , "Respawn" ) ;
            CarroJogador [ playerid ] = CreateVehicle ( InfoVenda[ playerid ] [ ModeloCarro ] , InfoCarro[ playerid ] [ s_PosX ] , InfoCarro[ playerid ] [ s_PosY ] , InfoCarro[ playerid ] [ s_PosZ ] , InfoCarro[ playerid ] [ s_PosA ] , InfoCarro[ playerid ] [ s_Cor1 ] , InfoCarro[ playerid ] [ s_Cor2 ] , InfoCarro[ playerid ] [ s_Respawn ] ) ;
        }
        return true ;
}

public
    OnPlayerSpawn ( playerid )
        return SetPlayerPos ( playerid , 1691.1439 , 1430.6595 , 10.7658 ) ;

public
    OnPlayerDisconnect ( playerid , reason )
    {
        format ( String , sizeof ( String ) , "GMNovo/CarrosProprios/%s.ini" , PlayerName ( playerid ) ) ;
        if ( dini_Exists ( String ) )
        {
            dini_IntSet ( String , "Preзo" , InfoVenda [ playerid ] [ PrecoCarro ] ) ;
            dini_IntSet ( String , "Modelo" , InfoVenda [ playerid ] [ ModeloCarro ] ) ;
            dini_FloatSet ( String , "PosX" , InfoCarro [ playerid ] [ s_PosX ] ) ;
            dini_FloatSet ( String , "PosY" , InfoCarro [ playerid ] [ s_PosY ] ) ;
            dini_FloatSet ( String , "PosZ" , InfoCarro [ playerid ] [ s_PosZ ] ) ;
            dini_FloatSet ( String , "Angulo" , InfoCarro [ playerid ] [ s_PosA ] ) ;
            dini_IntSet ( String , "Cor1" , 1 ) ;
            dini_IntSet ( String , "Cor2" , 1 ) ;
            dini_IntSet ( String , "Respawn" , -1 ) ;
            DestroyVehicle ( CarroJogador [ playerid ] ) ;
        }
        return true ;
}

public
    OnPlayerEnterCheckpoint ( playerid )
{
    if ( Checkpoint [ playerid ] == 1 )
    {
        PlayerPlaySound ( playerid , 1149 , 0.0 , 0.0 , 0.0 ) ;
        SendClientMessage ( playerid , -1 , "Seja Bem Vindo ao seu veiculo !" ) ;
        DisablePlayerCheckpoint ( playerid ) ;
        return true;
    }
    return true;
}

public
    OnPlayerCommandText ( playerid , cmdtext[] )
{
    new
        cmd [ 128 ] ,
        tmp [ 128 ] ,
        tmp2 ,
        idx,
        msg [ 128 ]
    ;

    cmd = strtok ( cmdtext , idx ) ;
    tmp = strtok ( cmdtext , idx ) ;
    tmp2 = strval ( tmp ) ;

    format ( String , sizeof ( String ) , "GMNovo/CarrosProprios/%s.ini" , PlayerName ( playerid ) ) ;

    if ( strcmp ( "/comprarcarro" , cmdtext ) == 0 )
    {
        if ( dini_Exists ( String ) )
            return SendClientMessage ( playerid , -1 , "Vocк jб possui um veiculo !" ) ;

        ShowPlayerDialog ( playerid , 120+119, DIALOG_STYLE_INPUT, "Carros","Escreva o nome do veiculo que vocк deseja.","Certo","Cancelar");

        return true;
    }

    if ( strcmp ("/vendercarro" , cmdtext ) == 0 )
    {
        if (! dini_Exists ( String ) )
            return SendClientMessage ( playerid , -1 , "Vocк nгo possui um veiculo !" ) ;

        if ( ! IsPlayerInVehicle ( playerid , CarroJogador [ playerid ] ) )
            return SendClientMessage ( playerid , 0xFFFFFFAA , "Vocк nгo estб em seu veiculo." ) ;


        format(msg, sizeof(msg), "Vocк vendeu seu carro por um valor 50 por cento, para $ %i.",  InfoVenda [ playerid ] [ PrecoCarro ] / 2 ) ;
        GivePlayerMoney ( playerid ,  InfoVenda [ playerid ] [ PrecoCarro ] / 2 ) ;
        DestroyVehicle ( CarroJogador [ playerid ] ) ;
        dini_Remove ( String ) ;
        CarroJogador [ playerid ] = 0 ;
        InfoVenda [ playerid ] [ ModeloCarro ] = 0 ;
        InfoVenda [ playerid ] [ PrecoCarro ] = 0 ;
        InfoCarro [ playerid ] [ s_PosX ] = 0 ;
        InfoCarro [ playerid ] [ s_PosY ] = 0 ;
        InfoCarro [ playerid ] [ s_PosZ ] = 0 ;
        InfoCarro [ playerid ] [ s_PosA ] = 0 ;
        SendClientMessage ( playerid , 0xFFFF00FF , msg ) ;
        return 1;
    }

    if ( strcmp ( "/estacionar" , cmdtext ) == 0 )
    {
        if ( ! IsPlayerInVehicle ( playerid , CarroJogador [ playerid ] ) )
                return  SendClientMessage ( playerid , 0xFFFFFFAA , "Vocк nгo estб no seu veiculo." ) ;

        AtualizarPos ( ) ;

        InfoVenda [ playerid ] [ ModeloCarro ] = GetVehicleModel ( GetPlayerVehicleID ( playerid ) ) ;
        InfoCarro [ playerid ] [ s_PosX ] = GetPVarFloat ( playerid , "PosX" ) ;
        InfoCarro [ playerid ] [ s_PosY ] = GetPVarFloat ( playerid , "PosY" ) ;
        InfoCarro [ playerid ] [ s_PosZ ] = GetPVarFloat ( playerid , "PosZ" ) ;
        InfoCarro [ playerid ] [ s_PosA ] = GetPVarFloat ( playerid , "PosA" ) ;

        printf ( "PosX: %f, PosY: %f, PosZ: %f, PosA: %f" , GetPVarFloat ( playerid , "PosX" ) , GetPVarFloat ( playerid , "PosY" ) , GetPVarFloat ( playerid , "PosZ" ) , GetPVarFloat ( playerid , "PosA" ) ) ;


        SendClientMessage ( playerid , 0xFFFF00FF , "Carro estacionado com sucesso !" ) ;
        return true;
    }

    if ( strcmp ( "/localizarcarro" , cmdtext ) == 0 )
    {
        new
            Float:vx ,
            Float:vy ,
            Float:vz
        ;

        GetVehiclePos ( CarroJogador [ playerid ] , vx , vy , vz ) ;
        SetPlayerCheckpoint ( playerid , vx , vy , vz , 10.0 ) ;
        Checkpoint [ playerid ] = 1 ;
        SendClientMessage ( playerid , 0xFFFFFFAA , "Vб ate o Checkpoint para Localizar o seu carro !" ) ;
        return true;
    }

    if ( strcmp ( cmd , "/pintar" , true ) == 0 )
    {
            if ( ! dini_Exists ( String ) )
                return SendClientMessage ( playerid , -1 , "Vocк nгo possui um veiculo !" ) ;

            if ( ! IsPlayerInVehicle ( playerid , CarroJogador [ playerid ] ) )
                return  SendClientMessage ( playerid , 0xFFFFFFAA , "Vocк nгo estб no seu veiculo." ) ;

            if ( ! strlen ( tmp ) )
                return SendClientMessage ( playerid , -1 , "Use /pintar [ Cor ]" ) ;

            ChangeVehicleColor ( GetPlayerVehicleID ( playerid ) , tmp2 , tmp2 ) ;
            format ( String , sizeof ( String ) , "Voce Mudou a Cor do seu veiculo para : %i" , tmp2 ) ;
            SendClientMessage ( playerid , -1 , String ) ;
            return 1;
    }

    if ( strcmp ( "/ajudacarro" , cmdtext ) == 0 )
    {
        SendClientMessage ( playerid , 0xCBCCCEFF, "*** CARRO *** /estacionar /vendercarro /localizarcarro /pintar");
        return true;
    }

    if ( strcmp ( cmdtext , "/testarpos" , true ) == 0 )
    {
        AtualizarPos ( ) ;
        printf ( "PosX: %f, PosY: %f, PosZ: %f, PosA: %f" , GetPVarFloat ( playerid , "PosX" ) , GetPVarFloat ( playerid , "PosY" ) , GetPVarFloat ( playerid , "PosZ" ) , GetPVarFloat ( playerid , "PosA" ) ) ;
        return true ;
    }

    return false;
}

public
    OnPlayerStateChange(playerid, newstate, oldstate)
{
    if ( newstate == PLAYER_STATE_DRIVER )
        {
        if ( CarroJogador [ playerid ] == GetPlayerVehicleID ( playerid ) )
            {
            new
                owner [ MAX_PLAYER_NAME ]
            ;
            GetPlayerName ( InfoCarro [ playerid ] [ s_Dono ] , owner , sizeof ( owner ) ) ;
            format ( String , sizeof ( String ) , "Este(a) \"%s\" pertence a %s." , GetVehicleNameFromID ( GetPlayerVehicleID ( playerid ) ) , owner ) ;
            SendClientMessage ( playerid , 0xFFFFFFAA , String ) ;
            }
        }
        else if ( newstate == PLAYER_STATE_DRIVER )
        {
            if ( CarroJogador [ playerid ] != GetPlayerVehicleID ( playerid ) )
            {
                format ( String, sizeof ( String ) , "Veнculo de %s somente ele(a) pode dirigi-lo!" , InfoCarro[ playerid ] [ s_Dono ] ) ;
                SendClientMessage ( playerid , -1 , String ) ;
                PlayerPlaySound ( playerid , 1147 , 0.0 , 0.0 , 0.0) ;
                RemovePlayerFromVehicle ( playerid ) ;
            }
    }
    return true;
}

public
    OnDialogResponse ( playerid , dialogid , response , listitem , inputtext[] )
{
    if ( dialogid == 120+119 )
    {
        if ( response )
        {

            new
                Float:X ,
                Float:Y ,
                Float:Z
            ;

            NomeCarro [ playerid ] = GetarNomeCarros ( inputtext ) ;

            GetPlayerPos ( playerid , X , Y , Z ) ;
            CarroJogadorEntrar [ playerid ] = CreateVehicle ( NomeCarro [ playerid ]  , X , Y , Z , 180 , -1 , -1 , -1 ) ;
            PutPlayerInVehicle ( playerid , CarroJogadorEntrar [ playerid ] , 0 ) ;

            if(!GetVehicleBuy(CarroJogadorEntrar[playerid]))
                return SendClientMessage ( playerid, -1 , "[ERRO] Veiculo Invalido !" ) , DestroyVehicle ( CarroJogadorEntrar [ playerid ] ) ;

            new
                stringdois [ 128 ]
            ;
            format(stringdois, sizeof(stringdois), "Vocк deseja comprar um %s por %d ?", GetVehicleNameFromID(GetPlayerVehicleID(playerid)), RetornarCarro ( playerid ) );
            ShowPlayerDialog ( playerid , 120+121 , DIALOG_STYLE_MSGBOX , "Compra de Veiculo" , stringdois , "Sim" , "Nгo" ) ;
            }
        return true;
    }

    if ( dialogid == 120+121 )
    {
        if(response)
        {
        if ( GetPlayerMoney ( playerid ) < InfoVenda [ playerid ] [ PrecoCarro ] )
                    return SendClientMessage ( playerid , -1 , "Vocк nгo tem dinheiro suficiente !" ) ,DestroyVehicle ( CarroJogadorEntrar [ playerid ] ) , TogglePlayerControllable ( playerid , true ) ;
        SetPlayerPos ( playerid , 1699.2 , 1435.1 , 10.7 ) ;

        new
            Float:x_set ,
            Float:y_set ,
            Float:z_set ,
            Float:a_set
        ;

        GetPlayerPos( playerid, x_set, y_set, z_set ) ;
        GetPlayerFacingAngle( playerid, a_set ) ;

        format( String , sizeof ( String ) , "GMNovo/CarrosProprios/%s.ini" , PlayerName ( playerid ) ) ;

        DestroyVehicle ( CarroJogadorEntrar [ playerid ] ) ;

        if(! dini_Create ( String ) ) return dini_Create ( String ) ;
        CarroJogador [ playerid ]   = CreateVehicle ( NomeCarro [ playerid ] , 1699.2 , 1435.1 , 10.7 , a_set , 1 , 1, -1 ) ;

        PutPlayerInVehicle ( playerid , CarroJogador [ playerid ] , 0 ) ;
        dini_Set ( String , "DonoCarro" , PlayerName ( playerid ) ) ;
        dini_IntSet ( String , "Preзo" , InfoVenda [ playerid ] [ PrecoCarro ] ) ;
        dini_IntSet ( String , "Modelo" , GetVehicleModel ( CarroJogador [ playerid ] ) ) ;
        dini_FloatSet ( String , "PosX" , x_set ) ;
        dini_FloatSet ( String , "PosY" , y_set ) ;
        dini_FloatSet ( String , "PosZ" , z_set ) ;
        dini_FloatSet ( String , "Angulo" , a_set ) ;
        dini_IntSet ( String , "Cor1" , 1 ) ;
        dini_IntSet ( String , "Cor2" , 1 ) ;
        dini_IntSet ( String , "Respawn" , -1 ) ;

        format( InfoCarro[ GetPlayerVehicleID ( playerid ) ][ s_Dono ], 24, dini_Get( String, "DonoCarro" ));

        InfoCarro[ playerid ] [ s_Dono ] = dini_Int ( String , "DonoCarro" ) ;
        InfoVenda[ playerid ] [ ModeloCarro ] = dini_Int ( String , "Modelo" ) ;
        InfoCarro[ playerid ] [ s_PosX ] = dini_Float ( String , "PosX" ) ;
        InfoCarro[ playerid ] [ s_PosY ] = dini_Float ( String , "PosY" ) ;
        InfoCarro[ playerid ] [ s_PosZ ] = dini_Float ( String , "PosZ" ) ;
        InfoCarro[ playerid ] [ s_PosA ] = dini_Float ( String , "Angulo" ) ;
        InfoCarro[ playerid ] [ s_Cor1 ] = dini_Int ( String , "Cor1" ) ;
        InfoCarro[ playerid ] [ s_Cor2 ] = dini_Int ( String , "Cor2" ) ;
        InfoCarro[ playerid ] [ s_Respawn ] = dini_Int ( String , "Respawn" ) ;
        RemovePlayerFromVehicle ( playerid ) ;
        TogglePlayerControllable ( playerid , true ) ;
        }
        else
        {
        DestroyVehicle ( CarroJogadorEntrar [ playerid ] ) ;
        TogglePlayerControllable ( playerid , true ) ;
        }
    }
    return true;
}

forward RetornarCarro ( playerid ) ;
public
    RetornarCarro ( playerid )
{
    switch ( GetVehicleModel ( GetPlayerVehicleID ( playerid ) ) )
    {
    case 400: InfoVenda [ playerid ] [ PrecoCarro ] =  50000;
    case 401: InfoVenda [ playerid ] [ PrecoCarro ] =  35000;
    case 402: InfoVenda [ playerid ] [ PrecoCarro ] =  100000;
    case 403: InfoVenda [ playerid ] [ PrecoCarro ] =  120000;
    case 404: InfoVenda [ playerid ] [ PrecoCarro ] =  20000;
    case 405: InfoVenda [ playerid ] [ PrecoCarro ] =  35000;
    case 409: InfoVenda [ playerid ] [ PrecoCarro ] =  150000;
    case 410: InfoVenda [ playerid ] [ PrecoCarro ] =  15000;
    case 411: InfoVenda [ playerid ] [ PrecoCarro ] =  400000;
    case 412: InfoVenda [ playerid ] [ PrecoCarro ] =  25000;
    case 415: InfoVenda [ playerid ] [ PrecoCarro ] =  200000;
    case 418: InfoVenda [ playerid ] [ PrecoCarro ] =  20000;
    case 419: InfoVenda [ playerid ] [ PrecoCarro ] =  20000;
    case 421: InfoVenda [ playerid ] [ PrecoCarro ] =  25000;
    case 422: InfoVenda [ playerid ] [ PrecoCarro ] =  15000;
    case 424: InfoVenda [ playerid ] [ PrecoCarro ] =  10000;
    case 426: InfoVenda [ playerid ] [ PrecoCarro ] =  30000;
    case 429: InfoVenda [ playerid ] [ PrecoCarro ] =  200000;
    case 434: InfoVenda [ playerid ] [ PrecoCarro ] =  25000;
    case 436: InfoVenda [ playerid ] [ PrecoCarro ] =  12000;
    case 439: InfoVenda [ playerid ] [ PrecoCarro ] =  12000;
    case 445: InfoVenda [ playerid ] [ PrecoCarro ] =  18000;
    case 451: InfoVenda [ playerid ] [ PrecoCarro ] =  450000;
    case 457: InfoVenda [ playerid ] [ PrecoCarro ] =  10000;
    case 458: InfoVenda [ playerid ] [ PrecoCarro ] =  18000;
    case 461: InfoVenda [ playerid ] [ PrecoCarro ] =  8000;
    case 462: InfoVenda [ playerid ] [ PrecoCarro ] =  5000;
    case 463: InfoVenda [ playerid ] [ PrecoCarro ] =  13000;
    case 466: InfoVenda [ playerid ] [ PrecoCarro ] =  15000;
    case 467: InfoVenda [ playerid ] [ PrecoCarro ] =  18000;
    case 468: InfoVenda [ playerid ] [ PrecoCarro ] =  15000;
    case 471: InfoVenda [ playerid ] [ PrecoCarro ] =  10000;
    case 474: InfoVenda [ playerid ] [ PrecoCarro ] =  25000;
    case 475: InfoVenda [ playerid ] [ PrecoCarro ] =  30000;
    case 477: InfoVenda [ playerid ] [ PrecoCarro ] =  40000;
    case 478: InfoVenda [ playerid ] [ PrecoCarro ] =  8000;
    case 479: InfoVenda [ playerid ] [ PrecoCarro ] =  14000;
    case 480: InfoVenda [ playerid ] [ PrecoCarro ] =  50000;
    case 481: InfoVenda [ playerid ] [ PrecoCarro ] =  500;
    case 483: InfoVenda [ playerid ] [ PrecoCarro ] =  16000;
    case 489: InfoVenda [ playerid ] [ PrecoCarro ] =  27000;
    case 491: InfoVenda [ playerid ] [ PrecoCarro ] =  17000;
    case 492: InfoVenda [ playerid ] [ PrecoCarro ] =  19000;
    case 495: InfoVenda [ playerid ] [ PrecoCarro ] =  32000;
    case 496: InfoVenda [ playerid ] [ PrecoCarro ] =  25000;
    case 500: InfoVenda [ playerid ] [ PrecoCarro ] =  29000;
    case 502: InfoVenda [ playerid ] [ PrecoCarro ] =  500000;
    case 505: InfoVenda [ playerid ] [ PrecoCarro ] =  27000;
    case 506: InfoVenda [ playerid ] [ PrecoCarro ] =  80000;
    case 507: InfoVenda [ playerid ] [ PrecoCarro ] =  22000;
    case 508: InfoVenda [ playerid ] [ PrecoCarro ] =  30000;
    case 509: InfoVenda [ playerid ] [ PrecoCarro ] =  500;
    case 510: InfoVenda [ playerid ] [ PrecoCarro ] =  13000;
    case 514: InfoVenda [ playerid ] [ PrecoCarro ] =  60000;
    case 515: InfoVenda [ playerid ] [ PrecoCarro ] =  60000;
    case 516: InfoVenda [ playerid ] [ PrecoCarro ] =  20000;
    case 517: InfoVenda [ playerid ] [ PrecoCarro ] =  15000;
    case 518: InfoVenda [ playerid ] [ PrecoCarro ] =  17500;
    case 521: InfoVenda [ playerid ] [ PrecoCarro ] =  70000;
    case 522: InfoVenda [ playerid ] [ PrecoCarro ] =  100000;
    case 526: InfoVenda [ playerid ] [ PrecoCarro ] =  20000;
    case 527: InfoVenda [ playerid ] [ PrecoCarro ] =  20000;
    case 529: InfoVenda [ playerid ] [ PrecoCarro ] =  22000;
    case 533: InfoVenda [ playerid ] [ PrecoCarro ] =  23500;
    case 534: InfoVenda [ playerid ] [ PrecoCarro ] =  32000;
    case 535: InfoVenda [ playerid ] [ PrecoCarro ] =  35000;
    case 536: InfoVenda [ playerid ] [ PrecoCarro ] =  35000;
    case 540: InfoVenda [ playerid ] [ PrecoCarro ] =  32700;
    case 541: InfoVenda [ playerid ] [ PrecoCarro ] =  350000;
    case 542: InfoVenda [ playerid ] [ PrecoCarro ] =  28000;
    case 543: InfoVenda [ playerid ] [ PrecoCarro ] =  20000;
    case 545: InfoVenda [ playerid ] [ PrecoCarro ] =  20000;
    case 546: InfoVenda [ playerid ] [ PrecoCarro ] =  28000;
    case 547: InfoVenda [ playerid ] [ PrecoCarro ] =  27000;
    case 549: InfoVenda [ playerid ] [ PrecoCarro ] =  22000;
    case 550: InfoVenda [ playerid ] [ PrecoCarro ] =  35000;
    case 551: InfoVenda [ playerid ] [ PrecoCarro ] =  32000;
    case 554: InfoVenda [ playerid ] [ PrecoCarro ] =  25000;
    case 555: InfoVenda [ playerid ] [ PrecoCarro ] =  20000;
    case 558: InfoVenda [ playerid ] [ PrecoCarro ] =  75000;
    case 559: InfoVenda [ playerid ] [ PrecoCarro ] =  80000;
    case 560: InfoVenda [ playerid ] [ PrecoCarro ] =  100000;
    case 561: InfoVenda [ playerid ] [ PrecoCarro ] =  65000;
    case 562: InfoVenda [ playerid ] [ PrecoCarro ] =  60000;
    case 565: InfoVenda [ playerid ] [ PrecoCarro ] =  50000;
    case 566: InfoVenda [ playerid ] [ PrecoCarro ] =  30000;
    case 567: InfoVenda [ playerid ] [ PrecoCarro ] =  35000;
    case 571: InfoVenda [ playerid ] [ PrecoCarro ] =  5000;
    case 572: InfoVenda [ playerid ] [ PrecoCarro ] =  5000;
    case 575: InfoVenda [ playerid ] [ PrecoCarro ] =  13000;
    case 576: InfoVenda [ playerid ] [ PrecoCarro ] =  35000;
    case 579: InfoVenda [ playerid ] [ PrecoCarro ] =  40000;
    case 580: InfoVenda [ playerid ] [ PrecoCarro ] =  30000;
    case 581: InfoVenda [ playerid ] [ PrecoCarro ] =  38000;
    case 585: InfoVenda [ playerid ] [ PrecoCarro ] =  23500;
    case 586: InfoVenda [ playerid ] [ PrecoCarro ] =  15000;
    case 587: InfoVenda [ playerid ] [ PrecoCarro ] =  37000;
    case 589: InfoVenda [ playerid ] [ PrecoCarro ] =  30000;
    case 600: InfoVenda [ playerid ] [ PrecoCarro ] =  12000;
    case 602: InfoVenda [ playerid ] [ PrecoCarro ] =  37000;
    case 603: InfoVenda [ playerid ] [ PrecoCarro ] =  45000;
    case 604: InfoVenda [ playerid ] [ PrecoCarro ] =  7000;
    case 605: InfoVenda [ playerid ] [ PrecoCarro ] =  8000;
    }
    return InfoVenda [ playerid ] [ PrecoCarro ];
}

forward AtualizarPos ( ) ;
public
    AtualizarPos ( )
{
    for ( new i ; i < MAX_PLAYERS ; i ++ )
    {
        if ( ! IsPlayerConnected ( i ) ) continue ;
        new
            Float:JK [ 4 ]
        ;
        GetPlayerPos ( i , JK [ 0 ] , JK [ 1 ] , JK [ 2 ] ) ;
        GetPlayerFacingAngle ( i , JK [ 3 ] ) ;
        SetPVarFloat ( i , "PosX" , JK [ 0 ] ) ;
        SetPVarFloat ( i , "PosY" , JK [ 1 ] ) ;
        SetPVarFloat ( i , "PosZ" , JK [ 2 ] ) ;
        SetPVarFloat ( i , "PosA" , JK [ 3 ] ) ;
    }
    return true ;
}

forward GameModeExitFunc ( playerid ) ;
public
    GameModeExitFunc ( playerid )
{
    format ( String , sizeof ( String ) , "GMNovo/CarrosProprios/%s.ini" , PlayerName ( playerid ) ) ;
    if ( dini_Exists ( String ) )
    {
        dini_IntSet ( String , "Preзo" , InfoVenda [ playerid ] [ PrecoCarro ] ) ;
        dini_IntSet ( String , "Modelo" , InfoVenda [ playerid ] [ ModeloCarro ] ) ;
        dini_FloatSet ( String , "PosX" , InfoCarro [ playerid ] [ s_PosX ] ) ;
        dini_FloatSet ( String , "PosY" , InfoCarro [ playerid ] [ s_PosY ] ) ;
        dini_FloatSet ( String , "PosZ" , InfoCarro [ playerid ] [ s_PosZ ] ) ;
        dini_FloatSet ( String , "Angulo" , InfoCarro [ playerid ] [ s_PosA ] ) ;
        dini_IntSet ( String , "Cor1" , InfoCarro [ playerid ] [ s_Cor1 ] ) ;
        dini_IntSet ( String , "Cor2" , InfoCarro [ playerid ] [ s_Cor2 ] ) ;
        dini_IntSet ( String , "Respawn" , InfoCarro [ playerid ] [ s_Respawn ] ) ;
        DestroyVehicle ( CarroJogador [ playerid ] ) ;
    }
    return true;
}

stock
    PlayerName ( playerid )
    {
    new Nome [ MAX_PLAYER_NAME ] ;
    GetPlayerName ( playerid , Nome , sizeof ( Nome ) ) ;
    return Nome;
}

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
    GetVehicleNameFromID(vehicleid)
{
    static const scVehicleNames [ ] [ 18 ] = {
        "Landstalker",
        "Bravura",
        "Buffalo",
        "Linerunner",
        "Perrenial",
        "Sentinel",
        "Dumper",
        "Firetruck",
        "Trashmaster",
        "Stretch",
        "Manana",
        "Infernus",
        "Voodoo",
        "Pony",
        "Mule",
        "Cheetah",
        "Ambulance",
        "Leviathan",
        "Moonbeam",
        "Esperanto",
        "Taxi",
        "Washington",
        "Bobcat",
        "Mr Whoopee",
        "BF Injection",
        "Hunter",
        "Premier",
        "Enforcer",
        "Securicar",
        "Banshee",
        "Predator",
        "Bus",
        "Rhino",
        "Barracks",
        "Hotknife",
        "Trailer 1",
        "Previon",
        "Coach",
        "Cabbie",
        "Stallion",
        "Rumpo",
        "RC Bandit",
        "Romero",
        "Packer",
        "Monster",
        "Admiral",
        "Squalo",
        "Seasparrow",
        "Pizzaboy",
        "Tram",
        "Trailer 2",
        "Turismo",
        "Speeder",
        "Reefer",
        "Tropic",
        "Flatbed",
        "Yankee",
        "Caddy",
        "Solair",
        "Berkley's RC Van",
        "Skimmer",
        "PCJ-600",
        "Faggio",
        "Freeway",
        "RC Baron",
        "RC Raider",
        "Glendale",
        "Oceanic",
        "Sanchez",
        "Sparrow",
        "Patriot",
        "Quad",
        "Coastguard",
        "Dinghy",
        "Hermes",
        "Sabre",
        "Rustler",
        "ZR-350",
        "Walton",
        "Regina",
        "Comet",
        "BMX",
        "Burrito",
        "Camper",
        "Marquis",
        "Baggage",
        "Dozer",
        "Maverick",
        "News Chopper",
        "Rancher",
        "FBI Rancher",
        "Virgo",
        "Greenwood",
        "Jetmax",
        "Hotring",
        "Sandking",
        "Blista Compact",
        "Police Maverick",
        "Boxville",
        "Benson",
        "Mesa",
        "RC Goblin",
        "Hotring Racer A",
        "Hotring Racer B",
        "Bloodring Banger",
        "Rancher",
        "Super GT",
        "Elegant",
        "Journey",
        "Bike",
        "Mountain Bike",
        "Beagle",
        "Cropdust",
        "Stunt",
        "Tanker",
        "Roadtrain",
        "Nebula",
        "Majestic",
        "Buccaneer",
        "Shamal",
        "Hydra",
        "FCR-900",
        "NRG-500",
        "HPV1000",
        "Cement Truck",
        "Tow Truck",
        "Fortune",
        "Cadrona",
        "FBI Truck",
        "Willard",
        "Forklift",
        "Tractor",
        "Combine",
        "Feltzer",
        "Remington",
        "Slamvan",
        "Blade",
        "Freight",
        "Streak",
        "Vortex",
        "Vincent",
        "Bullet",
        "Clover",
        "Sadler",
        "Firetruck LA",
        "Hustler",
        "Intruder",
        "Primo",
        "Cargobob",
        "Tampa",
        "Sunrise",
        "Merit",
        "Utility",
        "Nevada",
        "Yosemite",
        "Windsor",
        "Monster A",
        "Monster B",
        "Uranus",
        "Jester",
        "Sultan",
        "Stratum",
        "Elegy",
        "Raindance",
        "RC Tiger",
        "Flash",
        "Tahoma",
        "Savanna",
        "Bandito",
        "Freight Flat",
        "Streak Carriage",
        "Kart",
        "Mower",
        "Duneride",
        "Sweeper",
        "Broadway",
        "Tornado",
        "AT-400",
        "DFT-30",
        "Huntley",
        "Stafford",
        "BF-400",
        "Newsvan",
        "Tug",
        "Trailer 3",
        "Emperor",
        "Wayfarer",
        "Euros",
        "Hotdog",
        "Club",
        "Freight Carriage",
        "Trailer 3",
        "Andromada",
        "Dodo",
        "RC Cam",
        "Launch",
        "LS Police Car",
        "SF Police Car",
        "LV Police Car",
        "Police Ranger",
        "Picador",
        "S.W.A.T. Van",
        "Alpha",
        "Phoenix",
        "Glendale",
        "Sadler",
        "Luggage Trailer A",
        "Luggage Trailer B",
        "Stair Trailer",
        "Boxville",
        "Farm Plow",
        "Utility Trailer"
    },
    scOnFoot [ 18 ] = "OnFoot" ;
    if ( vehicleid > 0 ) {
        return scVehicleNames [ GetVehicleModel ( vehicleid ) - 400 ] ;
    }
    else {
        return scOnFoot ;
    }
}

GetarNomeCarros(vname[])
{
    for(new i = 0; i < 211; i++)
    {
        if (strfind(NomeVeiculos[i], vname, true) != -1)
        return i + 400;
    }
    return -1;
}

forward GetVehicleBuy(carid);
public GetVehicleBuy(carid)
{
    new m = GetVehicleModel(carid);
    if ( m == 400 || m == 401 || m == 402 ||
    m == 403 || m == 404 || m == 405 || m == 409 || m == 410 ||
    m == 411 || m == 412 || m == 415 || m == 418 || m == 419 ||
    m == 421 || m == 422 || m == 424 || m == 426 || m == 429 ||
    m == 434 || m == 436 || m == 439 || m == 445 || m == 451 ||
    m == 457 || m == 458 || m == 461 || m == 462 || m == 463 ||
    m == 466 || m == 467 || m == 468 || m == 471 || m == 474 ||
    m == 475 || m == 477 || m == 478 || m == 479 || m == 480 ||
    m == 481 || m == 483 || m == 489 || m == 491 || m == 492 ||
    m == 495 || m == 496 || m == 500 || m == 502 || m == 505 ||
    m == 506 || m == 507 || m == 508 || m == 509 || m == 510 ||
    m == 514 || m == 515 || m == 516 || m == 517 || m == 518 ||
    m == 521 || m == 522 || m == 526 || m == 527 || m == 529 ||
    m == 533 || m == 534 || m == 535 || m == 536 || m == 540 ||
    m == 541 || m == 542 || m == 543 || m == 545 || m == 546 ||
    m == 547 || m == 549 || m == 550 || m == 551 || m == 554 ||
    m == 555 || m == 558 || m == 559 || m == 560 || m == 561 ||
    m == 562 || m == 565 || m == 566 || m == 567 || m == 571 ||
    m == 572 || m == 575 || m == 576 || m == 579 || m == 580 ||
    m == 581 || m == 585 || m == 586 || m == 587 || m == 589 ||
    m == 600 || m == 602 || m == 603 || m == 604 || m == 605 )
    {
    return 0x01;
    }
    return 0;
}
Da 1 erro pede a INC strtok, eu adciono e continua o erro ..
erro:
pawn Код:
C:\Users\User\Desktop\querovere.pwn(650) : error 021: symbol already defined: "strtok"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
Reply
#6

strtok jб foi definida/declarada...
Reply
#7

Strtok jб estб definido, delete uma das stocks.
Reply
#8

eu jб adcinei ele aqui e continua dando erro de strtok sу qe da um diferente , pode arumar pra min ? quero saber o que aconteceu ...
Reply
#9

pawn Код:
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;
}
Retire isto
Reply
#10

pawn Код:
/*
>>>>>>>>>>>>>>>>>>>>>>>>>>>> Crйditos :
                            []BlackGangsta[] - Idealizador e Criador
                            Josma_CMD - Ajudante - Ajudou em varias coisas no FilterScript


*/

#include < a_samp >
#include < Dini >
enum iCarro
{
    s_Dono[ 24 ],
    s_Modelo,
    Float:s_PosX,
    Float:s_PosY,
    Float:s_PosZ,
    Float:s_PosA,
    s_Cor1,
    s_Cor2,
    s_Respawn
};
new
    InfoCarro [ MAX_PLAYERS ] [ iCarro ] ,
    CarroJogador [ MAX_PLAYERS ] ,
    String [ 128 ] ,
    Checkpoint [ MAX_PLAYERS ] ,
    NomeCarro [ MAX_PLAYERS ] ,
    CarroJogadorEntrar [ MAX_PLAYERS ]
    ;

new NomeVeiculos[212][] =
{
    "400 - Landstalker",        "401 - Bravura",            "402 - Buffalo",    "403 - Linerunner",         "404 - Pereniel",       "405 - Sentinel",       "406 - Dumper",             "407 - Firetruck",      "408 - Trashmaster",    "409 - Stretch",
    "410 - Manana",             "411 - Infernus",           "412 - Voodoo",     "413 - Pony",               "414 - Mule",           "415 - Cheetah",        "416 - Ambulance",          "417 - Leviathan",      "418 - Moonbeam",       "419 - Esperanto",          "420 - Taxi",
    "421 - Washington",         "422 - Bobcat",             "423 - Mr Whoopee", "424 - BF Injection",       "425 - Hunter",         "426 - Premier",        "427 - Enforcer",           "428 - Securicar",      "429 - Banshee",        "430 - Predator",
    "431 - Bus",                "432 - Rhino",              "433 - Barracks",   "434 - Hotknife",           "435 - Trailer",        "436 - Previon",        "437 - Coach",              "438 - Cabbie",         "439 - Stallion",       "440 - Rumpo",              "441 - RC Bandit",      "442 - Romero",
    "443 - Packer",             "444 - Monster",            "445 - Admiral",    "446 - Squalo",             "447 - Seasparrow",     "448 - Pizzaboy",       "449 - Tram",               "450 - Trailer",        "451 - Turismo",        "452 - Speeder",            "453 - Reefer",         "454 - Tropic",         "455 - Flatbed",
    "456 - Yankee",             "457 - Caddy",              "458 - Solair",     "459 - Berkley's RC Van",   "460 - Skimmer",        "461 - PCJ-600",        "462 - Faggio",             "463 - Freeway",        "464 - RC Baron",       "465 - RC Raider",
    "466 - Glendale",           "467 - Oceanic",            "468 - Sanchez",    "469 - Sparrow",            "470 - Patriot",        "471 - Quad",           "472 - Coastguard",         "473 - Dinghy",         "474 - Hermes",         "475 - Sabre",              "476 - Rustler",
    "477 - ZR350",              "478 - Walton",             "479 - Regina",     "480 - Comet",              "481 - BMX",            "482 - Burrito",        "483 - Camper",             "484 - Marquis",        "485 - Baggage",        "486 - Dozer",              "487 - Maverick",       "488 - News Chopper",
    "489 - Rancher",            "490 - FBI Rancher",        "491 - Virgo",      "492 - Greenwood",          "493 - Jetmax",         "494 - Hotring",        "495 - Sandking",           "496 - Blista Compact", "497 - Police Maverick",
    "498 - Boxville",           "499 - Benson",             "500 - Mesa",       "501 - RC Goblin",          "502 - Hotring Racer",  "503 - Hotring Racer",  "504 - Bloodring Banger",   "505 - Rancher",        "506 - Super GT",
    "507 - Elegant",            "508 - Journey",            "509 - Bike",       "510 - Mountain Bike",      "511 - Beagle",         "512 - Cropdust",       "513 - Stunt",              "514 - Tanker",         "515 - RoadTrain",      "516 - Nebula",             "517 - Majestic",
    "518 - Buccaneer",          "519 - Shamal",             "520 - Hydra",      "521 - FCR-900",            "522 - NRG-500",        "523 - HPV1000",        "524 - Cement Truck",       "525 - Tow Truck",      "526 - Fortune",        "527 - Cadrona",            "528 - FBI Truck",
    "529 - Willard",            "530 - Forklift",           "531 - Tractor",    "532 - Combine",            "533 - Feltzer",        "534 - Remington",      "535 - Slamvan",            "536 - Blade",          "537 - Freight",        "538 - Streak",             "539 - Vortex",         "540 - Vincent",
    "541 - Bullet",             "542 - Clover",             "543 - Sadler",     "544 - Firetruck",          "545 - Hustler",        "546 - Intruder",       "547 - Primo",              "548 - Cargobob",       "549 - Tampa",          "550 - Sunrise",            "551 - Merit",          "552 - Utility",
    "553 - Nevada",             "554 - Yosemite",           "555 - Windsor",    "556 - Monster",            "557 - Monster",        "558 - Uranus",         "559 - Jester",             "560 - Sultan",         "561 - Stratum",        "562 - Elegy",              "563 - Raindance",      "564 - RC Tiger",
    "565 - Flash",              "566 - Tahoma",             "567 - Savanna",    "568 - Bandito",            "569 - Freight",        "570 - Trailer",        "571 - Kart",               "572 - Mower",          "573 - Duneride",       "574 - Sweeper",            "575 - Broadway",
    "576 - Tornado",            "577 - AT-400",             "578 - DFT-30",     "579 - Huntley",            "580 - Stafford",       "581 - BF-400",         "582 - Newsvan",            "583 - Tug",            "584 - Trailer",        "585 - Emperor",            "586 - Wayfarer",
    "587 - Euros",              "588 - Hotdog",             "589 - Club",       "590 - Trailer",            "591 - Trailer",        "592 - Andromada",      "593 - Dodo",               "594 - RC Cam",         "595 - Launch",         "596 - Police Car (LSPD)",   "597 - Police Car (SFPD)",
    "598 - Police Car (LVPD)",   "599 - Police Ranger",     "600 - Picador",    "601 - S.W.A.T. Van",       "602 - Alpha",          "603 - Phoenix",        "604 - Glendale",           "605 - Sadler",         "606 - Luggage Trailer A",
    "607 - Luggage Trailer B",   "608 - Stair Trailer",     "609 - Boxville",   "610 - Farm Plow",          "611 - Utility Trailer"
};

enum iVenda {ModeloCarro,PrecoCarro};

new
    InfoVenda[103][iVenda] =
{
    {400 , 50000} ,
    {401 , 35000} ,
    {402 , 100000} ,
    {403 , 120000} ,
    {404 , 20000} ,
    {405 , 35000} ,
    {409 , 150000} ,
    {410 , 15000} ,
    {411 , 400000} ,
    {412 , 25000} ,
    {415 , 200000} ,
    {418 , 20000} ,
    {419 , 20000} ,
    {421 , 25000} ,
    {422 , 15000} ,
    {424 , 10000} ,
    {426 , 30000} ,
    {429 , 200000} ,
    {434 , 25000} ,
    {436 , 12000} ,
    {439 , 12000} ,
    {445 , 18000} ,
    {451 , 450000} ,
    {457 , 10000} ,
    {458 , 18000} ,
    {461 , 8000} ,
    {462 , 5000} ,
    {463 , 13000} ,
    {466 , 15000} ,
    {467 , 18000} ,
    {468 , 15000} ,
    {471 , 10000} ,
    {474 , 25000} ,
    {475 , 30000} ,
    {477 , 40000} ,
    {478 , 8000} ,
    {479 , 14000} ,
    {480 , 50000} ,
    {481 , 500} ,
    {483 , 16000} ,
    {489 , 27000} ,
    {491 , 17000} ,
    {492 , 19000} ,
    {495 , 32000} ,
    {496 , 25000} ,
    {500 , 29000} ,
    {502 , 500000} ,
    {505 , 27000} ,
    {506 , 80000} ,
    {507 , 22000} ,
    {508 , 30000} ,
    {509 , 500} ,
    {510 , 13000} ,
    {514 , 60000} ,
    {515 , 60000} ,
    {516 , 20000} ,
    {517 , 15000} ,
    {518 , 17500} ,
    {521 , 70000} ,
    {522 , 100000} ,
    {526 , 20000} ,
    {527 , 20000} ,
    {529 , 22000} ,
    {533 , 23500} ,
    {534 , 32000} ,
    {535 , 35000} ,
    {536 , 35000} ,
    {540 , 32700} ,
    {541 , 350000} ,
    {542 , 28000} ,
    {543 , 20000} ,
    {545 , 20000} ,
    {546 , 28000} ,
    {547 , 27000} ,
    {549 , 22000} ,
    {550 , 35000} ,
    {551 , 32000} ,
    {554 , 25000} ,
    {555 , 20000} ,
    {558 , 75000} ,
    {559 , 80000} ,
    {560 , 100000} ,
    {561 , 65000} ,
    {562 , 60000} ,
    {565 , 50000} ,
    {566 , 30000} ,
    {567 , 35000} ,
    {571 , 5000} ,
    {572 , 5000} ,
    {575 , 13000} ,
    {576 , 35000} ,
    {579 , 40000} ,
    {580 , 30000} ,
    {581 , 38000} ,
    {585 , 23500} ,
    {586 , 15000} ,
    {587 , 37000} ,
    {589 , 30000} ,
    {600 , 12000} ,
    {602 , 37000} ,
    {603 , 45000} ,
    {604 , 7000} ,
    {605 , 8000}
};

public
    OnVehicleSpawn ( vehicleid )
{
    for(new i ; i < MAX_PLAYERS ; ++i)
    {
            format ( String , 30 , "GMNovo/CarrosProprios/%s.ini" , PlayerName ( i ) ) ;
            if ( fexist ( String ) )
            {
                if ( dini_Int ( String , "Estacionado" ) == 10 )
                {
                    SetVehiclePos ( vehicleid , dini_Int ( String , "PosX" ) , dini_Int ( String , "PosY" ) , dini_Int ( String , "PosZ" ) ) ;
                }
            }
        }
    return true ;
}


public
    OnGameModeExit ( )
    {
    SetTimer ( "GameModeExitFunc" , 2000 , 0 ) ;
    return true ;
}

public
    OnPlayerConnect ( playerid )
    {

        format ( String , sizeof ( String ) , "GMNovo/CarrosProprios/%s.ini" , PlayerName ( playerid ) ) ;
        if ( dini_Exists ( String ) )
        {
            InfoCarro[ playerid ] [ s_Dono ] = dini_Int ( String , "DonoCarro" ) ;
            InfoVenda[ playerid ] [ ModeloCarro ] = dini_Int ( String , "Modelo" ) ;
            InfoCarro[ playerid ] [ s_PosX ] = dini_Float ( String , "PosX" ) ;
            InfoCarro[ playerid ] [ s_PosY ] = dini_Float ( String , "PosY" ) ;
            InfoCarro[ playerid ] [ s_PosZ ] = dini_Float ( String , "PosZ" ) ;
            InfoCarro[ playerid ] [ s_PosA ] = dini_Float ( String , "Angulo" ) ;
            InfoCarro[ playerid ] [ s_Cor1 ] = dini_Int ( String , "Cor1" ) ;
            InfoCarro[ playerid ] [ s_Cor2 ] = dini_Int ( String , "Cor2" ) ;
            InfoCarro[ playerid ] [ s_Respawn ] = dini_Int ( String , "Respawn" ) ;
            CarroJogador [ playerid ] = CreateVehicle ( InfoVenda[ playerid ] [ ModeloCarro ] , InfoCarro[ playerid ] [ s_PosX ] , InfoCarro[ playerid ] [ s_PosY ] , InfoCarro[ playerid ] [ s_PosZ ] , InfoCarro[ playerid ] [ s_PosA ] , InfoCarro[ playerid ] [ s_Cor1 ] , InfoCarro[ playerid ] [ s_Cor2 ] , InfoCarro[ playerid ] [ s_Respawn ] ) ;
        }
        return true ;
}

public
    OnPlayerSpawn ( playerid )
        return SetPlayerPos ( playerid , 1691.1439 , 1430.6595 , 10.7658 ) ;

public
    OnPlayerDisconnect ( playerid , reason )
    {
        format ( String , sizeof ( String ) , "GMNovo/CarrosProprios/%s.ini" , PlayerName ( playerid ) ) ;
        if ( dini_Exists ( String ) )
        {
            dini_IntSet ( String , "Preзo" , InfoVenda [ playerid ] [ PrecoCarro ] ) ;
            dini_IntSet ( String , "Modelo" , InfoVenda [ playerid ] [ ModeloCarro ] ) ;
            dini_FloatSet ( String , "PosX" , InfoCarro [ playerid ] [ s_PosX ] ) ;
            dini_FloatSet ( String , "PosY" , InfoCarro [ playerid ] [ s_PosY ] ) ;
            dini_FloatSet ( String , "PosZ" , InfoCarro [ playerid ] [ s_PosZ ] ) ;
            dini_FloatSet ( String , "Angulo" , InfoCarro [ playerid ] [ s_PosA ] ) ;
            dini_IntSet ( String , "Cor1" , 1 ) ;
            dini_IntSet ( String , "Cor2" , 1 ) ;
            dini_IntSet ( String , "Respawn" , -1 ) ;
            DestroyVehicle ( CarroJogador [ playerid ] ) ;
        }
        return true ;
}

public
    OnPlayerEnterCheckpoint ( playerid )
{
    if ( Checkpoint [ playerid ] == 1 )
    {
        PlayerPlaySound ( playerid , 1149 , 0.0 , 0.0 , 0.0 ) ;
        SendClientMessage ( playerid , -1 , "Seja Bem Vindo ao seu veiculo !" ) ;
        DisablePlayerCheckpoint ( playerid ) ;
        return true;
    }
    return true;
}

public
    OnPlayerCommandText ( playerid , cmdtext[] )
{
    new
        cmd [ 128 ] ,
        tmp [ 128 ] ,
        tmp2 ,
        idx,
        msg [ 128 ]
    ;

    cmd = strtok ( cmdtext , idx ) ;
    tmp = strtok ( cmdtext , idx ) ;
    tmp2 = strval ( tmp ) ;

    format ( String , sizeof ( String ) , "GMNovo/CarrosProprios/%s.ini" , PlayerName ( playerid ) ) ;

    if ( strcmp ( "/comprarcarro" , cmdtext ) == 0 )
    {
        if ( dini_Exists ( String ) )
            return SendClientMessage ( playerid , -1 , "Vocк jб possui um veiculo !" ) ;

        ShowPlayerDialog ( playerid , 120+119, DIALOG_STYLE_INPUT, "Carros","Escreva o nome do veiculo que vocк deseja.","Certo","Cancelar");

        return true;
    }

    if ( strcmp ("/vendercarro" , cmdtext ) == 0 )
    {
        if (! dini_Exists ( String ) )
            return SendClientMessage ( playerid , -1 , "Vocк nгo possui um veiculo !" ) ;

        if ( ! IsPlayerInVehicle ( playerid , CarroJogador [ playerid ] ) )
            return SendClientMessage ( playerid , 0xFFFFFFAA , "Vocк nгo estб em seu veiculo." ) ;


        format(msg, sizeof(msg), "Vocк vendeu seu carro por um valor 50 por cento, para $ %i.",  InfoVenda [ playerid ] [ PrecoCarro ] / 2 ) ;
        GivePlayerMoney ( playerid ,  InfoVenda [ playerid ] [ PrecoCarro ] / 2 ) ;
        DestroyVehicle ( CarroJogador [ playerid ] ) ;
        dini_Remove ( String ) ;
        CarroJogador [ playerid ] = 0 ;
        InfoVenda [ playerid ] [ ModeloCarro ] = 0 ;
        InfoVenda [ playerid ] [ PrecoCarro ] = 0 ;
        InfoCarro [ playerid ] [ s_PosX ] = 0 ;
        InfoCarro [ playerid ] [ s_PosY ] = 0 ;
        InfoCarro [ playerid ] [ s_PosZ ] = 0 ;
        InfoCarro [ playerid ] [ s_PosA ] = 0 ;
        SendClientMessage ( playerid , 0xFFFF00FF , msg ) ;
        return 1;
    }

    if ( strcmp ( "/estacionar" , cmdtext ) == 0 )
    {
        if ( ! IsPlayerInVehicle ( playerid , CarroJogador [ playerid ] ) )
                return  SendClientMessage ( playerid , 0xFFFFFFAA , "Vocк nгo estб no seu veiculo." ) ;

        AtualizarPos ( ) ;

        InfoVenda [ playerid ] [ ModeloCarro ] = GetVehicleModel ( GetPlayerVehicleID ( playerid ) ) ;
        InfoCarro [ playerid ] [ s_PosX ] = GetPVarFloat ( playerid , "PosX" ) ;
        InfoCarro [ playerid ] [ s_PosY ] = GetPVarFloat ( playerid , "PosY" ) ;
        InfoCarro [ playerid ] [ s_PosZ ] = GetPVarFloat ( playerid , "PosZ" ) ;
        InfoCarro [ playerid ] [ s_PosA ] = GetPVarFloat ( playerid , "PosA" ) ;

        printf ( "PosX: %f, PosY: %f, PosZ: %f, PosA: %f" , GetPVarFloat ( playerid , "PosX" ) , GetPVarFloat ( playerid , "PosY" ) , GetPVarFloat ( playerid , "PosZ" ) , GetPVarFloat ( playerid , "PosA" ) ) ;


        SendClientMessage ( playerid , 0xFFFF00FF , "Carro estacionado com sucesso !" ) ;
        return true;
    }

    if ( strcmp ( "/localizarcarro" , cmdtext ) == 0 )
    {
        new
            Float:vx ,
            Float:vy ,
            Float:vz
        ;

        GetVehiclePos ( CarroJogador [ playerid ] , vx , vy , vz ) ;
        SetPlayerCheckpoint ( playerid , vx , vy , vz , 10.0 ) ;
        Checkpoint [ playerid ] = 1 ;
        SendClientMessage ( playerid , 0xFFFFFFAA , "Vб ate o Checkpoint para Localizar o seu carro !" ) ;
        return true;
    }

    if ( strcmp ( cmd , "/pintar" , true ) == 0 )
    {
            if ( ! dini_Exists ( String ) )
                return SendClientMessage ( playerid , -1 , "Vocк nгo possui um veiculo !" ) ;

            if ( ! IsPlayerInVehicle ( playerid , CarroJogador [ playerid ] ) )
                return  SendClientMessage ( playerid , 0xFFFFFFAA , "Vocк nгo estб no seu veiculo." ) ;

            if ( ! strlen ( tmp ) )
                return SendClientMessage ( playerid , -1 , "Use /pintar [ Cor ]" ) ;

            ChangeVehicleColor ( GetPlayerVehicleID ( playerid ) , tmp2 , tmp2 ) ;
            format ( String , sizeof ( String ) , "Voce Mudou a Cor do seu veiculo para : %i" , tmp2 ) ;
            SendClientMessage ( playerid , -1 , String ) ;
            return 1;
    }

    if ( strcmp ( "/ajudacarro" , cmdtext ) == 0 )
    {
        SendClientMessage ( playerid , 0xCBCCCEFF, "*** CARRO *** /estacionar /vendercarro /localizarcarro /pintar");
        return true;
    }

    if ( strcmp ( cmdtext , "/testarpos" , true ) == 0 )
    {
        AtualizarPos ( ) ;
        printf ( "PosX: %f, PosY: %f, PosZ: %f, PosA: %f" , GetPVarFloat ( playerid , "PosX" ) , GetPVarFloat ( playerid , "PosY" ) , GetPVarFloat ( playerid , "PosZ" ) , GetPVarFloat ( playerid , "PosA" ) ) ;
        return true ;
    }

    return false;
}

public
    OnPlayerStateChange(playerid, newstate, oldstate)
{
    if ( newstate == PLAYER_STATE_DRIVER )
        {
        if ( CarroJogador [ playerid ] == GetPlayerVehicleID ( playerid ) )
            {
            new
                owner [ MAX_PLAYER_NAME ]
            ;
            GetPlayerName ( InfoCarro [ playerid ] [ s_Dono ] , owner , sizeof ( owner ) ) ;
            format ( String , sizeof ( String ) , "Este(a) \"%s\" pertence a %s." , GetVehicleNameFromID ( GetPlayerVehicleID ( playerid ) ) , owner ) ;
            SendClientMessage ( playerid , 0xFFFFFFAA , String ) ;
            }
        }
        else if ( newstate == PLAYER_STATE_DRIVER )
        {
            if ( CarroJogador [ playerid ] != GetPlayerVehicleID ( playerid ) )
            {
                format ( String, sizeof ( String ) , "Veнculo de %s somente ele(a) pode dirigi-lo!" , InfoCarro[ playerid ] [ s_Dono ] ) ;
                SendClientMessage ( playerid , -1 , String ) ;
                PlayerPlaySound ( playerid , 1147 , 0.0 , 0.0 , 0.0) ;
                RemovePlayerFromVehicle ( playerid ) ;
            }
    }
    return true;
}

public
    OnDialogResponse ( playerid , dialogid , response , listitem , inputtext[] )
{
    if ( dialogid == 120+119 )
    {
        if ( response )
        {

            new
                Float:X ,
                Float:Y ,
                Float:Z
            ;

            NomeCarro [ playerid ] = GetarNomeCarros ( inputtext ) ;

            GetPlayerPos ( playerid , X , Y , Z ) ;
            CarroJogadorEntrar [ playerid ] = CreateVehicle ( NomeCarro [ playerid ]  , X , Y , Z , 180 , -1 , -1 , -1 ) ;
            PutPlayerInVehicle ( playerid , CarroJogadorEntrar [ playerid ] , 0 ) ;

            if(!GetVehicleBuy(CarroJogadorEntrar[playerid]))
                return SendClientMessage ( playerid, -1 , "[ERRO] Veiculo Invalido !" ) , DestroyVehicle ( CarroJogadorEntrar [ playerid ] ) ;

            new
                stringdois [ 128 ]
            ;
            format(stringdois, sizeof(stringdois), "Vocк deseja comprar um %s por %d ?", GetVehicleNameFromID(GetPlayerVehicleID(playerid)), RetornarCarro ( playerid ) );
            ShowPlayerDialog ( playerid , 120+121 , DIALOG_STYLE_MSGBOX , "Compra de Veiculo" , stringdois , "Sim" , "Nгo" ) ;
            }
        return true;
    }

    if ( dialogid == 120+121 )
    {
        if(response)
        {
        if ( GetPlayerMoney ( playerid ) < InfoVenda [ playerid ] [ PrecoCarro ] )
                    return SendClientMessage ( playerid , -1 , "Vocк nгo tem dinheiro suficiente !" ) ,DestroyVehicle ( CarroJogadorEntrar [ playerid ] ) , TogglePlayerControllable ( playerid , true ) ;
        SetPlayerPos ( playerid , 1699.2 , 1435.1 , 10.7 ) ;

        new
            Float:x_set ,
            Float:y_set ,
            Float:z_set ,
            Float:a_set
        ;

        GetPlayerPos( playerid, x_set, y_set, z_set ) ;
        GetPlayerFacingAngle( playerid, a_set ) ;

        format( String , sizeof ( String ) , "GMNovo/CarrosProprios/%s.ini" , PlayerName ( playerid ) ) ;

        DestroyVehicle ( CarroJogadorEntrar [ playerid ] ) ;

        if(! dini_Create ( String ) ) return dini_Create ( String ) ;
        CarroJogador [ playerid ]   = CreateVehicle ( NomeCarro [ playerid ] , 1699.2 , 1435.1 , 10.7 , a_set , 1 , 1, -1 ) ;

        PutPlayerInVehicle ( playerid , CarroJogador [ playerid ] , 0 ) ;
        dini_Set ( String , "DonoCarro" , PlayerName ( playerid ) ) ;
        dini_IntSet ( String , "Preзo" , InfoVenda [ playerid ] [ PrecoCarro ] ) ;
        dini_IntSet ( String , "Modelo" , GetVehicleModel ( CarroJogador [ playerid ] ) ) ;
        dini_FloatSet ( String , "PosX" , x_set ) ;
        dini_FloatSet ( String , "PosY" , y_set ) ;
        dini_FloatSet ( String , "PosZ" , z_set ) ;
        dini_FloatSet ( String , "Angulo" , a_set ) ;
        dini_IntSet ( String , "Cor1" , 1 ) ;
        dini_IntSet ( String , "Cor2" , 1 ) ;
        dini_IntSet ( String , "Respawn" , -1 ) ;

        format( InfoCarro[ GetPlayerVehicleID ( playerid ) ][ s_Dono ], 24, dini_Get( String, "DonoCarro" ));

        InfoCarro[ playerid ] [ s_Dono ] = dini_Int ( String , "DonoCarro" ) ;
        InfoVenda[ playerid ] [ ModeloCarro ] = dini_Int ( String , "Modelo" ) ;
        InfoCarro[ playerid ] [ s_PosX ] = dini_Float ( String , "PosX" ) ;
        InfoCarro[ playerid ] [ s_PosY ] = dini_Float ( String , "PosY" ) ;
        InfoCarro[ playerid ] [ s_PosZ ] = dini_Float ( String , "PosZ" ) ;
        InfoCarro[ playerid ] [ s_PosA ] = dini_Float ( String , "Angulo" ) ;
        InfoCarro[ playerid ] [ s_Cor1 ] = dini_Int ( String , "Cor1" ) ;
        InfoCarro[ playerid ] [ s_Cor2 ] = dini_Int ( String , "Cor2" ) ;
        InfoCarro[ playerid ] [ s_Respawn ] = dini_Int ( String , "Respawn" ) ;
        RemovePlayerFromVehicle ( playerid ) ;
        TogglePlayerControllable ( playerid , true ) ;
        }
        else
        {
        DestroyVehicle ( CarroJogadorEntrar [ playerid ] ) ;
        TogglePlayerControllable ( playerid , true ) ;
        }
    }
    return true;
}

forward RetornarCarro ( playerid ) ;
public
    RetornarCarro ( playerid )
{
    switch ( GetVehicleModel ( GetPlayerVehicleID ( playerid ) ) )
    {
    case 400: InfoVenda [ playerid ] [ PrecoCarro ] =  50000;
    case 401: InfoVenda [ playerid ] [ PrecoCarro ] =  35000;
    case 402: InfoVenda [ playerid ] [ PrecoCarro ] =  100000;
    case 403: InfoVenda [ playerid ] [ PrecoCarro ] =  120000;
    case 404: InfoVenda [ playerid ] [ PrecoCarro ] =  20000;
    case 405: InfoVenda [ playerid ] [ PrecoCarro ] =  35000;
    case 409: InfoVenda [ playerid ] [ PrecoCarro ] =  150000;
    case 410: InfoVenda [ playerid ] [ PrecoCarro ] =  15000;
    case 411: InfoVenda [ playerid ] [ PrecoCarro ] =  400000;
    case 412: InfoVenda [ playerid ] [ PrecoCarro ] =  25000;
    case 415: InfoVenda [ playerid ] [ PrecoCarro ] =  200000;
    case 418: InfoVenda [ playerid ] [ PrecoCarro ] =  20000;
    case 419: InfoVenda [ playerid ] [ PrecoCarro ] =  20000;
    case 421: InfoVenda [ playerid ] [ PrecoCarro ] =  25000;
    case 422: InfoVenda [ playerid ] [ PrecoCarro ] =  15000;
    case 424: InfoVenda [ playerid ] [ PrecoCarro ] =  10000;
    case 426: InfoVenda [ playerid ] [ PrecoCarro ] =  30000;
    case 429: InfoVenda [ playerid ] [ PrecoCarro ] =  200000;
    case 434: InfoVenda [ playerid ] [ PrecoCarro ] =  25000;
    case 436: InfoVenda [ playerid ] [ PrecoCarro ] =  12000;
    case 439: InfoVenda [ playerid ] [ PrecoCarro ] =  12000;
    case 445: InfoVenda [ playerid ] [ PrecoCarro ] =  18000;
    case 451: InfoVenda [ playerid ] [ PrecoCarro ] =  450000;
    case 457: InfoVenda [ playerid ] [ PrecoCarro ] =  10000;
    case 458: InfoVenda [ playerid ] [ PrecoCarro ] =  18000;
    case 461: InfoVenda [ playerid ] [ PrecoCarro ] =  8000;
    case 462: InfoVenda [ playerid ] [ PrecoCarro ] =  5000;
    case 463: InfoVenda [ playerid ] [ PrecoCarro ] =  13000;
    case 466: InfoVenda [ playerid ] [ PrecoCarro ] =  15000;
    case 467: InfoVenda [ playerid ] [ PrecoCarro ] =  18000;
    case 468: InfoVenda [ playerid ] [ PrecoCarro ] =  15000;
    case 471: InfoVenda [ playerid ] [ PrecoCarro ] =  10000;
    case 474: InfoVenda [ playerid ] [ PrecoCarro ] =  25000;
    case 475: InfoVenda [ playerid ] [ PrecoCarro ] =  30000;
    case 477: InfoVenda [ playerid ] [ PrecoCarro ] =  40000;
    case 478: InfoVenda [ playerid ] [ PrecoCarro ] =  8000;
    case 479: InfoVenda [ playerid ] [ PrecoCarro ] =  14000;
    case 480: InfoVenda [ playerid ] [ PrecoCarro ] =  50000;
    case 481: InfoVenda [ playerid ] [ PrecoCarro ] =  500;
    case 483: InfoVenda [ playerid ] [ PrecoCarro ] =  16000;
    case 489: InfoVenda [ playerid ] [ PrecoCarro ] =  27000;
    case 491: InfoVenda [ playerid ] [ PrecoCarro ] =  17000;
    case 492: InfoVenda [ playerid ] [ PrecoCarro ] =  19000;
    case 495: InfoVenda [ playerid ] [ PrecoCarro ] =  32000;
    case 496: InfoVenda [ playerid ] [ PrecoCarro ] =  25000;
    case 500: InfoVenda [ playerid ] [ PrecoCarro ] =  29000;
    case 502: InfoVenda [ playerid ] [ PrecoCarro ] =  500000;
    case 505: InfoVenda [ playerid ] [ PrecoCarro ] =  27000;
    case 506: InfoVenda [ playerid ] [ PrecoCarro ] =  80000;
    case 507: InfoVenda [ playerid ] [ PrecoCarro ] =  22000;
    case 508: InfoVenda [ playerid ] [ PrecoCarro ] =  30000;
    case 509: InfoVenda [ playerid ] [ PrecoCarro ] =  500;
    case 510: InfoVenda [ playerid ] [ PrecoCarro ] =  13000;
    case 514: InfoVenda [ playerid ] [ PrecoCarro ] =  60000;
    case 515: InfoVenda [ playerid ] [ PrecoCarro ] =  60000;
    case 516: InfoVenda [ playerid ] [ PrecoCarro ] =  20000;
    case 517: InfoVenda [ playerid ] [ PrecoCarro ] =  15000;
    case 518: InfoVenda [ playerid ] [ PrecoCarro ] =  17500;
    case 521: InfoVenda [ playerid ] [ PrecoCarro ] =  70000;
    case 522: InfoVenda [ playerid ] [ PrecoCarro ] =  100000;
    case 526: InfoVenda [ playerid ] [ PrecoCarro ] =  20000;
    case 527: InfoVenda [ playerid ] [ PrecoCarro ] =  20000;
    case 529: InfoVenda [ playerid ] [ PrecoCarro ] =  22000;
    case 533: InfoVenda [ playerid ] [ PrecoCarro ] =  23500;
    case 534: InfoVenda [ playerid ] [ PrecoCarro ] =  32000;
    case 535: InfoVenda [ playerid ] [ PrecoCarro ] =  35000;
    case 536: InfoVenda [ playerid ] [ PrecoCarro ] =  35000;
    case 540: InfoVenda [ playerid ] [ PrecoCarro ] =  32700;
    case 541: InfoVenda [ playerid ] [ PrecoCarro ] =  350000;
    case 542: InfoVenda [ playerid ] [ PrecoCarro ] =  28000;
    case 543: InfoVenda [ playerid ] [ PrecoCarro ] =  20000;
    case 545: InfoVenda [ playerid ] [ PrecoCarro ] =  20000;
    case 546: InfoVenda [ playerid ] [ PrecoCarro ] =  28000;
    case 547: InfoVenda [ playerid ] [ PrecoCarro ] =  27000;
    case 549: InfoVenda [ playerid ] [ PrecoCarro ] =  22000;
    case 550: InfoVenda [ playerid ] [ PrecoCarro ] =  35000;
    case 551: InfoVenda [ playerid ] [ PrecoCarro ] =  32000;
    case 554: InfoVenda [ playerid ] [ PrecoCarro ] =  25000;
    case 555: InfoVenda [ playerid ] [ PrecoCarro ] =  20000;
    case 558: InfoVenda [ playerid ] [ PrecoCarro ] =  75000;
    case 559: InfoVenda [ playerid ] [ PrecoCarro ] =  80000;
    case 560: InfoVenda [ playerid ] [ PrecoCarro ] =  100000;
    case 561: InfoVenda [ playerid ] [ PrecoCarro ] =  65000;
    case 562: InfoVenda [ playerid ] [ PrecoCarro ] =  60000;
    case 565: InfoVenda [ playerid ] [ PrecoCarro ] =  50000;
    case 566: InfoVenda [ playerid ] [ PrecoCarro ] =  30000;
    case 567: InfoVenda [ playerid ] [ PrecoCarro ] =  35000;
    case 571: InfoVenda [ playerid ] [ PrecoCarro ] =  5000;
    case 572: InfoVenda [ playerid ] [ PrecoCarro ] =  5000;
    case 575: InfoVenda [ playerid ] [ PrecoCarro ] =  13000;
    case 576: InfoVenda [ playerid ] [ PrecoCarro ] =  35000;
    case 579: InfoVenda [ playerid ] [ PrecoCarro ] =  40000;
    case 580: InfoVenda [ playerid ] [ PrecoCarro ] =  30000;
    case 581: InfoVenda [ playerid ] [ PrecoCarro ] =  38000;
    case 585: InfoVenda [ playerid ] [ PrecoCarro ] =  23500;
    case 586: InfoVenda [ playerid ] [ PrecoCarro ] =  15000;
    case 587: InfoVenda [ playerid ] [ PrecoCarro ] =  37000;
    case 589: InfoVenda [ playerid ] [ PrecoCarro ] =  30000;
    case 600: InfoVenda [ playerid ] [ PrecoCarro ] =  12000;
    case 602: InfoVenda [ playerid ] [ PrecoCarro ] =  37000;
    case 603: InfoVenda [ playerid ] [ PrecoCarro ] =  45000;
    case 604: InfoVenda [ playerid ] [ PrecoCarro ] =  7000;
    case 605: InfoVenda [ playerid ] [ PrecoCarro ] =  8000;
    }
    return InfoVenda [ playerid ] [ PrecoCarro ];
}

forward AtualizarPos ( ) ;
public
    AtualizarPos ( )
{
    for ( new i ; i < MAX_PLAYERS ; i ++ )
    {
        if ( ! IsPlayerConnected ( i ) ) continue ;
        new
            Float:JK [ 4 ]
        ;
        GetPlayerPos ( i , JK [ 0 ] , JK [ 1 ] , JK [ 2 ] ) ;
        GetPlayerFacingAngle ( i , JK [ 3 ] ) ;
        SetPVarFloat ( i , "PosX" , JK [ 0 ] ) ;
        SetPVarFloat ( i , "PosY" , JK [ 1 ] ) ;
        SetPVarFloat ( i , "PosZ" , JK [ 2 ] ) ;
        SetPVarFloat ( i , "PosA" , JK [ 3 ] ) ;
    }
    return true ;
}

forward GameModeExitFunc ( playerid ) ;
public
    GameModeExitFunc ( playerid )
{
    format ( String , sizeof ( String ) , "GMNovo/CarrosProprios/%s.ini" , PlayerName ( playerid ) ) ;
    if ( dini_Exists ( String ) )
    {
        dini_IntSet ( String , "Preзo" , InfoVenda [ playerid ] [ PrecoCarro ] ) ;
        dini_IntSet ( String , "Modelo" , InfoVenda [ playerid ] [ ModeloCarro ] ) ;
        dini_FloatSet ( String , "PosX" , InfoCarro [ playerid ] [ s_PosX ] ) ;
        dini_FloatSet ( String , "PosY" , InfoCarro [ playerid ] [ s_PosY ] ) ;
        dini_FloatSet ( String , "PosZ" , InfoCarro [ playerid ] [ s_PosZ ] ) ;
        dini_FloatSet ( String , "Angulo" , InfoCarro [ playerid ] [ s_PosA ] ) ;
        dini_IntSet ( String , "Cor1" , InfoCarro [ playerid ] [ s_Cor1 ] ) ;
        dini_IntSet ( String , "Cor2" , InfoCarro [ playerid ] [ s_Cor2 ] ) ;
        dini_IntSet ( String , "Respawn" , InfoCarro [ playerid ] [ s_Respawn ] ) ;
        DestroyVehicle ( CarroJogador [ playerid ] ) ;
    }
    return true;
}

stock
    PlayerName ( playerid )
    {
    new Nome [ MAX_PLAYER_NAME ] ;
    GetPlayerName ( playerid , Nome , sizeof ( Nome ) ) ;
    return Nome;
}

stock
    GetVehicleNameFromID(vehicleid)
{
    static const scVehicleNames [ ] [ 18 ] = {
        "Landstalker",
        "Bravura",
        "Buffalo",
        "Linerunner",
        "Perrenial",
        "Sentinel",
        "Dumper",
        "Firetruck",
        "Trashmaster",
        "Stretch",
        "Manana",
        "Infernus",
        "Voodoo",
        "Pony",
        "Mule",
        "Cheetah",
        "Ambulance",
        "Leviathan",
        "Moonbeam",
        "Esperanto",
        "Taxi",
        "Washington",
        "Bobcat",
        "Mr Whoopee",
        "BF Injection",
        "Hunter",
        "Premier",
        "Enforcer",
        "Securicar",
        "Banshee",
        "Predator",
        "Bus",
        "Rhino",
        "Barracks",
        "Hotknife",
        "Trailer 1",
        "Previon",
        "Coach",
        "Cabbie",
        "Stallion",
        "Rumpo",
        "RC Bandit",
        "Romero",
        "Packer",
        "Monster",
        "Admiral",
        "Squalo",
        "Seasparrow",
        "Pizzaboy",
        "Tram",
        "Trailer 2",
        "Turismo",
        "Speeder",
        "Reefer",
        "Tropic",
        "Flatbed",
        "Yankee",
        "Caddy",
        "Solair",
        "Berkley's RC Van",
        "Skimmer",
        "PCJ-600",
        "Faggio",
        "Freeway",
        "RC Baron",
        "RC Raider",
        "Glendale",
        "Oceanic",
        "Sanchez",
        "Sparrow",
        "Patriot",
        "Quad",
        "Coastguard",
        "Dinghy",
        "Hermes",
        "Sabre",
        "Rustler",
        "ZR-350",
        "Walton",
        "Regina",
        "Comet",
        "BMX",
        "Burrito",
        "Camper",
        "Marquis",
        "Baggage",
        "Dozer",
        "Maverick",
        "News Chopper",
        "Rancher",
        "FBI Rancher",
        "Virgo",
        "Greenwood",
        "Jetmax",
        "Hotring",
        "Sandking",
        "Blista Compact",
        "Police Maverick",
        "Boxville",
        "Benson",
        "Mesa",
        "RC Goblin",
        "Hotring Racer A",
        "Hotring Racer B",
        "Bloodring Banger",
        "Rancher",
        "Super GT",
        "Elegant",
        "Journey",
        "Bike",
        "Mountain Bike",
        "Beagle",
        "Cropdust",
        "Stunt",
        "Tanker",
        "Roadtrain",
        "Nebula",
        "Majestic",
        "Buccaneer",
        "Shamal",
        "Hydra",
        "FCR-900",
        "NRG-500",
        "HPV1000",
        "Cement Truck",
        "Tow Truck",
        "Fortune",
        "Cadrona",
        "FBI Truck",
        "Willard",
        "Forklift",
        "Tractor",
        "Combine",
        "Feltzer",
        "Remington",
        "Slamvan",
        "Blade",
        "Freight",
        "Streak",
        "Vortex",
        "Vincent",
        "Bullet",
        "Clover",
        "Sadler",
        "Firetruck LA",
        "Hustler",
        "Intruder",
        "Primo",
        "Cargobob",
        "Tampa",
        "Sunrise",
        "Merit",
        "Utility",
        "Nevada",
        "Yosemite",
        "Windsor",
        "Monster A",
        "Monster B",
        "Uranus",
        "Jester",
        "Sultan",
        "Stratum",
        "Elegy",
        "Raindance",
        "RC Tiger",
        "Flash",
        "Tahoma",
        "Savanna",
        "Bandito",
        "Freight Flat",
        "Streak Carriage",
        "Kart",
        "Mower",
        "Duneride",
        "Sweeper",
        "Broadway",
        "Tornado",
        "AT-400",
        "DFT-30",
        "Huntley",
        "Stafford",
        "BF-400",
        "Newsvan",
        "Tug",
        "Trailer 3",
        "Emperor",
        "Wayfarer",
        "Euros",
        "Hotdog",
        "Club",
        "Freight Carriage",
        "Trailer 3",
        "Andromada",
        "Dodo",
        "RC Cam",
        "Launch",
        "LS Police Car",
        "SF Police Car",
        "LV Police Car",
        "Police Ranger",
        "Picador",
        "S.W.A.T. Van",
        "Alpha",
        "Phoenix",
        "Glendale",
        "Sadler",
        "Luggage Trailer A",
        "Luggage Trailer B",
        "Stair Trailer",
        "Boxville",
        "Farm Plow",
        "Utility Trailer"
    },
    scOnFoot [ 18 ] = "OnFoot" ;
    if ( vehicleid > 0 ) {
        return scVehicleNames [ GetVehicleModel ( vehicleid ) - 400 ] ;
    }
    else {
        return scOnFoot ;
    }
}

GetarNomeCarros(vname[])
{
    for(new i = 0; i < 211; i++)
    {
        if (strfind(NomeVeiculos[i], vname, true) != -1)
        return i + 400;
    }
    return -1;
}

forward GetVehicleBuy(carid);
public GetVehicleBuy(carid)
{
    new m = GetVehicleModel(carid);
    if ( m == 400 || m == 401 || m == 402 ||
    m == 403 || m == 404 || m == 405 || m == 409 || m == 410 ||
    m == 411 || m == 412 || m == 415 || m == 418 || m == 419 ||
    m == 421 || m == 422 || m == 424 || m == 426 || m == 429 ||
    m == 434 || m == 436 || m == 439 || m == 445 || m == 451 ||
    m == 457 || m == 458 || m == 461 || m == 462 || m == 463 ||
    m == 466 || m == 467 || m == 468 || m == 471 || m == 474 ||
    m == 475 || m == 477 || m == 478 || m == 479 || m == 480 ||
    m == 481 || m == 483 || m == 489 || m == 491 || m == 492 ||
    m == 495 || m == 496 || m == 500 || m == 502 || m == 505 ||
    m == 506 || m == 507 || m == 508 || m == 509 || m == 510 ||
    m == 514 || m == 515 || m == 516 || m == 517 || m == 518 ||
    m == 521 || m == 522 || m == 526 || m == 527 || m == 529 ||
    m == 533 || m == 534 || m == 535 || m == 536 || m == 540 ||
    m == 541 || m == 542 || m == 543 || m == 545 || m == 546 ||
    m == 547 || m == 549 || m == 550 || m == 551 || m == 554 ||
    m == 555 || m == 558 || m == 559 || m == 560 || m == 561 ||
    m == 562 || m == 565 || m == 566 || m == 567 || m == 571 ||
    m == 572 || m == 575 || m == 576 || m == 579 || m == 580 ||
    m == 581 || m == 585 || m == 586 || m == 587 || m == 589 ||
    m == 600 || m == 602 || m == 603 || m == 604 || m == 605 )
    {
    return 0x01;
    }
    return 0;
}
@OFF
Uma pessoa que nгo vai atras de tutos ou bases nгo tem como ser um programador ¬¬'
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)