Help me.. after i use the command /paintcar .. you buy the acces to that in an 24/7... it sets the vehicle paintjob to$ and when respawned the vehicle has'n paintjob.. so the paintjob won't save.. .. y give you the commands
Код:
//=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-paintcar-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
if(strcmp(cmd, "/paintcar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pPaintJob] == 1)
{
if(IsPlayerInAnyVehicle(playerid))
{
new currentveh = GetPlayerVehicleID(playerid);
new paintjob;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Folositi: /paintcar [0-5]");
return 1;
}
if(strval(tmp) < 0 && strval(tmp) > 5)
{
SendClientMessage(playerid, COLOR_GRAD2, "Folositi: /paintcar [0-5]");
return 1;
}
paintjob = strval(tmp);
format(string, sizeof(string), "Ai folosit spray-ul de paintjob pentru masina.");
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
ChangeVehiclePaintjob(currentveh, paintjob);
PlayerInfo[playerid][pPaintJob] = 1;
}
}
}
return 1;
}