08.05.2018, 15:30
Here you go, i think it should work.
PHP код:
if(response)
{
if(listitem == 0)
{
if(inRent[playerid] == 0)
{
if(MasinaUnu != 0)
{
MasinaUnu--;
inRent[playerid] = 1;
IDmasinaInchiriata[playerid] = 526;
new Float:x, Float:y, Float:z, Float:angle;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, angle);
new vehicle = CreateVehicle(IDmasinaInchiriata[playerid] , x, y, z, angle, -1, -1,-1);
PutPlayerInVehicle(playerid, vehicle, 0);
SendClientMessage(playerid, COLOR_WHITE, "Ai platit $30.000 pentru a inchiria acest vehicul.");
SendClientMessage(playerid, COLOR_WHITE, "Ai grija ca cineva sa nu iti fure vehiculul, tu ii vei plati calatoria.");
SendClientMessage(playerid, COLOR_WHITE, "Poti renunta oricand la masina inchiriata folosind [/unrentveh].");
GivePlayerCash(playerid, -30000);
}
else if(MasinaUnu == 0)
{
SendClientMessage(playerid, COLOR_WHITE, "Vehiculul selectat nu se mai afla in stock-ul afacerii!");
}
}
}
}
return 1;
}