[Ajuda] Concessionaria para meu GM
#4

Esta aki
pawn Код:
#include <a_Samp>
#include <DOF2>

#define PASTA_CONCE    "/Conce/%.ini"
#define MAX_VEHICLE_VIP 10

new Float:RequestConceSf[5][4] =
{
    {-1958.1014,301.7753,35.1968,126.0418},
    {-1957.5437,276.8116,35.1958,136.7501},
    {-1948.2711,263.7450,35.1968,112.9527},
    {-1947.9272,264.3204,40.7781,48.4357},
    {-1955.6560,295.3828,40.7741,138.5161}
};

new Placas[] =
{
   9123,
   2345,
   9990,
   1223,
   8756,
   7899,
   1234,
   2912,
   7707,
   7777,
   9999,
   3455,
   6543,
   5902,
   7699,
   1010,
   1352,
   9756,
   8910,
   1040,
   1543,
   6655,
   1025,
   4318
};

enum pIConce
{
    Modelo,
    Float:pX,
    Float:pY,
    Float:pZ,
    Float:pA,
    Dono[24],
    Placa[15],
    Cor1,
    Cor2
};
new vConce[MAX_VEHICLE_VIP][pIConce];

stock CriaveiculoConce(playerid)
{
    new pName[MAX_PLAYER_NAME], file[100],file2[100], proximov,
    randPlaca = random(sizeof(Placas)), placa[15],rand = random(sizeof(RequestConceSf));
    GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
    format(file, sizeof(file), PASTA_CONCE, pName,proximov);
    if(DOF2::FileExists(file))
    {
       proximov++;
       DOF2::CreateFile(file);
    }
    format(file2, sizeof(file2), PASTA_CONCE, pName,proximov);
    DOF2::CreateFile(file2);
    {
        format(placa, sizeof(placa),"BCL - %d", Placas[randPlaca]);
        vConce[playerid][Modelo] = ModeloConceVeiculo[playerid];
        DOF2::SetInt(file,"Modelo", vConce[playerid][Modelo]);
        vConce[playerid][pX] = RequestConceSf[rand][0];
        DOF2::SetFloat(file,"pX",vConce[playerid][pX]);
        vConce[playerid][pY] = RequestConceSf[rand][1];
        DOF2::SetFloat(file,"pY",vConce[playerid][pY]);
        vConce[playerid][pZ] = RequestConceSf[rand][2];
        DOF2::SetFloat(file,"pZ",vConce[playerid][pZ]);
        vConce[playerid][pA] = RequestConceSf[rand][3];
        DOF2::SetFloat(file,"pA",vConce[playerid][pA]);
        vConce[playerid][Dono] = pName;
        DOF2::SetString(file,"Dono",vConce[playerid][Dono]);
        vConce[playerid][Placa] = placa;
        DOF2::SetString(file,"Placa", placa);
        vConce[playerid][Preco] = vVeiculo(ModeloConceVeiculo[playerid]) / 2;
        DOF2::SetInt(file,"Preco",vConce[playerid][Preco]);
        vConce[playerid][Cor1] = random(128);
        DOF2::SetInt(file,"Cor1",vConce[playerid][Cor1]);
        vConce[playerid][Cor2] = random(128);
        DOF2::SetInt(file,"Cor2",vConce[playerid][Cor2]);

        vConce[playerid][Modelo] = CreateVehicle(vConce[playerid][Modelo],vConce[playerid][pX],vConce[playerid][pY],vConce[playerid][pZ],vConce[playerid][pA],vConce[playerid][Cor1],vConce[playerid][Cor2],-1);
        SetVehicleNumberPlate(vConce[playerid][Modelo], vConce[playerid][Placa]);
        PutPlayerInVehicle(playerid, vConce[playerid][Modelo], 0);
        GivePlayerGrana(playerid, -vVeiculo(ModeloConceVeiculo[playerid]));
        SendClientMessage(playerid, Verde, "Veiculo Comprado.");
        ModeloConceVeiculo[playerid] = 0;
    }
    return 1;
}

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    DOF2::Exit();
    return 1;
}
Editado para o cod completo
Reply


Messages In This Thread
Concessionaria para meu GM - by Marlon307 - 16.12.2014, 21:07
Re: Concessionaria para meu GM - by zGuigui2068 - 16.12.2014, 21:09
Re: Concessionaria para meu GM - by ipsLuan - 16.12.2014, 21:09
Re: Concessionaria para meu GM - by Marlon307 - 16.12.2014, 21:13
Re: Concessionaria para meu GM - by MultiKill - 16.12.2014, 21:15
Re: Concessionaria para meu GM - by ipsLuan - 16.12.2014, 21:17
Re: Concessionaria para meu GM - by Marlon307 - 16.12.2014, 21:22
Re: Concessionaria para meu GM - by humildadeforever - 16.12.2014, 21:23
Re: Concessionaria para meu GM - by Marlon307 - 16.12.2014, 21:25
Re: Concessionaria para meu GM - by ipsLuan - 16.12.2014, 21:30

Forum Jump:


Users browsing this thread: 1 Guest(s)