Jump to content
  • 0

Problema Masini Personale ( Comanda)


Myhaytza1

Question

Salut am si eu o problema,deci am adaugat in GM-ul 1.6.0 Gamelife,comanda /donatecar tot de la acest gm numai ca de la versiunea 1.3.0

si acum imi da niste erori uitati despre ce este vorba:

9lacgl.jpg

Daca va uitati atent eroarea vine de la a 3-a linie venind de sus in jos.

uitati comanda:

[pawn]if(strcmp(cmd, "/donatecar", true) == 0)

{

    new carid;

    if(IsPlayerConnected(playerid))

    {

        if (PlayerInfo[playerid][pAdmin] < 1339)

{

    SendClientMessage(playerid, COLOR_GRAD1, "  Nu esti autorizat sa folosesti comanda!");

    return 1;

}

            if(IsPlayerConnected(playerid))

    {

    tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_GRAD2, "{B8DBFF}USE: /donatecar <PlayerID/Name> [CarModel] [color1] [color2]");

return 1;

}

giveplayerid = ReturnUser(tmp);

if(IsPlayerConnected(giveplayerid))

{

tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_YELLOW2, "{B8DBFF}USE: /donatecar <PlayerID/Name> [CarModel] [color1] [color2]");

return 1;

}

new car;

car = strval(tmp);

if(car < 400 || car > 611) { SendClientMessage(playerid, COLOR_YELLOW2, "  Vehicle Number can't be below 400 or above 611 !"); return 1; }

tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_YELLOW2, "{B8DBFF}USE: /donatecar <PlayerID/Name> [CarModel] [color1] [color2]");

return 1;

}

new color1;

color1 = strval(tmp);

//if(color1 < 0 || color1 > 255) { SendClientMessage(playerid, COLOR_YELLOW2, "  Color Number can't be below 0 or above 126 !"); return 1; }

tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_YELLOW2, "{B8DBFF}USE: /donatecar <PlayerID/Name> [CarModel] [color1] [color2]");

return 1;

}

new color2;

color2 = strval(tmp);

//if(color2 < 0 || color2 > 255) { SendClientMessage(playerid, COLOR_YELLOW2, "  Color Number can't be below 0 or above 126 !"); return 1; }

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

new string1[MAX_PLAYER_NAME];

new string2[MAX_PLAYER_NAME];

if(PlayerInfo[giveplayerid][pPcarkey] == -1)

{

GetPlayerName(playerid,string1,sizeof(string1));

GetPlayerName(giveplayerid,string2,sizeof(string2));

GetPlayerPos(playerid, X,Y,Z);

carid = CreateVehicle(car, X,Y +4,Z, 0.0, color1, color2, 6000000000000);

format(string, sizeof(string), "AmdCmd: %s a creat o masina personala pentru %s", string1, string2);

ABroadCast(COLOR_LIGHTRED, string,1);

format(CarInfo[carid][cLicense], 32 ,"Iti multumim!");

SetVehicleNumberPlate(carid,CarInfo[carid][cLicense]);

CarInfo[carid][cValue] = 1; CarInfo[carid][cModel] = car; CarInfo[carid][cOwned] = 1; CarInfo[carid][cColorOne] = 1; CarInfo[carid][cColorTwo] = 1;

CarInfo[carid][cLocationx] = X; CarInfo[carid][cLocationy] = Y; CarInfo[carid][cLocationz] = Z; CarInfo[carid][cAngle] = 0; CarInfo[carid][cLock] = 0; CarInfo[carid][paintjob] = -1; LoadComponents(carid); CarInfo[carid][cOwner] = string2;

CarInfo[carid][mod1] = 0; CarInfo[carid][mod2] = 0; CarInfo[carid][mod3] = 0; CarInfo[carid][mod4] = 0; CarInfo[carid][mod5] = 0; CarInfo[carid][mod6] = 0; CarInfo[carid][mod7] = 0;

CarInfo[carid][mod8] = 0; CarInfo[carid][mod9] = 0; CarInfo[carid][mod10] = 0; CarInfo[carid][mod11] = 0; CarInfo[carid][mod12] = 0; CarInfo[carid][mod13] = 0; CarInfo[carid][mod14] = 0; CarInfo[carid][mod15] = 0; CarInfo[carid][mod16] = 0;

CarInfo[carid][mod17] = 0;

CarInfo[carid][paintjob] = 0;

CarInfo[carid][cTD] = 0;

CarInfo[carid][cInsurance] = 5;

CarInfo[carid][cInsurancePrice] = 100;

PlayerInfo[giveplayerid][pCurentKey] = carid;

format(CarInfo[carid][cDescription], 12, "%s",aVehicleNames[car-400]);

    PlayerInfo[giveplayerid][pPcarkey] = carid;

    OnPropUpdate();

    OnPlayerUpdateEx(giveplayerid);

    return 1;

}

else if(PlayerInfo[giveplayerid][pPcarkey2] == -1 && PlayerInfo[giveplayerid][pPcarkey] != -1)

{

GetPlayerName(playerid,string1,sizeof(string1));

GetPlayerName(giveplayerid,string2,sizeof(string2));

GetPlayerPos(playerid, X,Y,Z);

carid = CreateVehicle(car, X,Y +4,Z, 0.0, color1, color2, 6000000000000);

format(string, sizeof(string), "AmdCmd: %s a creat o masina personala pentru %s", string1, string2);

ABroadCast(COLOR_LIGHTRED, string,1);

format(CarInfo[carid][cLicense], 32 ,"Iti multumim!");

SetVehicleNumberPlate(carid,CarInfo[carid][cLicense]);

CarInfo[carid][cValue] = 1; CarInfo[carid][cModel] = car; CarInfo[carid][cOwned] = 1; CarInfo[carid][cColorOne] = 1; CarInfo[carid][cColorTwo] = 1;

CarInfo[carid][cLocationx] = X; CarInfo[carid][cLocationy] = Y; CarInfo[carid][cLocationz] = Z; CarInfo[carid][cAngle] = 0; CarInfo[carid][cLock] = 0; CarInfo[carid][paintjob] = -1; LoadComponents(carid); CarInfo[carid][cOwner] = string2;

CarInfo[carid][mod1] = 0; CarInfo[carid][mod2] = 0; CarInfo[carid][mod3] = 0; CarInfo[carid][mod4] = 0; CarInfo[carid][mod5] = 0; CarInfo[carid][mod6] = 0; CarInfo[carid][mod7] = 0;

CarInfo[carid][mod8] = 0; CarInfo[carid][mod9] = 0; CarInfo[carid][mod10] = 0; CarInfo[carid][mod11] = 0; CarInfo[carid][mod12] = 0; CarInfo[carid][mod13] = 0; CarInfo[carid][mod14] = 0; CarInfo[carid][mod15] = 0; CarInfo[carid][mod16] = 0;

CarInfo[carid][mod17] = 0;

CarInfo[carid][paintjob] = 0;

CarInfo[carid][cTD] = 0;

CarInfo[carid][cInsurance] = 5;

CarInfo[carid][cInsurancePrice] = 100;

PlayerInfo[giveplayerid][pCurentKey] = carid;

format(CarInfo[carid][cDescription], 12, "%s",aVehicleNames[car-400]);

    PlayerInfo[giveplayerid][pPcarkey2] = carid;

    OnPropUpdate();

    OnPlayerUpdateEx(giveplayerid);

    return 1;

}

else

{

    SendClientMessage(playerid, COLOR_GREY, "Acel player are deja 2 masini personale");

    return 1;

}

}

}

return 1;

}

return 1;

}[/pawn]

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.