Salut baieti, am si eu o problema la server-ul de SA:MP. Uitati-va care e problema. Imi cumpar o masina personala, si o tunez, cand sa dau /v tunning sau /v paintjob imi zice ca nu sunt in masina mea. Uitati-va codul.
else if(strcmp(x_nr,"tunning",true) == 0)
{
new carsff;
if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey]) { carsff = PlayerInfo[playerid][pPcarkey]; }
if (carsff != 999)
{
if(IsPlayerInVehicle(playerid, carsff))
{
new info[] = "Save Car Mods\nSave All Car Mods\nClear Car Mods\nClear All Car Mods ";
ShowPlayerDialog(playerid, 1300, DIALOG_STYLE_LIST,"Choose the Option",info,"Ok","Cancel");
SendClientMessage(playerid, COLOR_PINK,"Pentru a salva culoarea si paintjobul masinii folositi comenzile /v color si /v paintjob.");
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "* You are not in your vehicle!");
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "* You do not own a car!");
}
}
else if(strcmp(x_nr,"paintjob",true) == 0)
{
if(PlayerInfo[playerid][pPcarkey] == 999)
{
SendClientMessage(playerid, COLOR_GREY," You don't have a vehicle to respray.");
return 1;
}
if(!IsAtPaySpray(playerid))
{
SendClientMessage(playerid, COLOR_GREY,"* You must be at a Pay'n'Spray to do this!");
return 1;
}
if(GetPlayerMoney(playerid) < 5000)
{
SendClientMessage(playerid, COLOR_GREY," You don't have enough money for vehicle respray.");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /v paintjob [paintjob(0-3)]");
return 1;
}
new color1;
color1 = strval(tmp);
if(color1 < 0 && color1 > 3)
{
SendClientMessage(playerid, COLOR_GREY, " Wrong color id!");
return 1;
}
new vehid;
if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey]) { vehid = PlayerInfo[playerid][pPcarkey]; }
else { return 1; }
if(IsPlayerInVehicle(playerid, vehid))
{
CarInfo[vehid][cPaintjob] = color1;
GivePlayerMoney(playerid, -5000);
GameTextForPlayer(playerid, "~w~Bill for a Paint Respray~n~~r~-$5000", 5000, 1);
ChangeVehiclePaintjob(vehid, color1);
OnVehUpdate();
OnPlayerDateUpdate(playerid);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY," You are not in your vehicle.");
return 1;
}
}
Question
Kent_Clark
Salut baieti, am si eu o problema la server-ul de SA:MP. Uitati-va care e problema. Imi cumpar o masina personala, si o tunez, cand sa dau /v tunning sau /v paintjob imi zice ca nu sunt in masina mea. Uitati-va codul.
Link to comment
Share on other sites
3 answers to this question
Recommended Posts