23.09.2012, 04:11
(
Последний раз редактировалось YourLord; 23.09.2012 в 05:37.
)
i guess this would do better the job.
By the way, vehicleid is the ID of the vehicle. you can use the to get the vehicleid that the player is in.
https://sampwiki.blast.hk/wiki/GetPlayerVehicleID
pawn Код:
native IsValidVehicle(vehicleid);
CMD:randcar(playerid, params[])
{
new carid;
while(!IsValidVehicle((carid = random(MAX_VEHICLES)))){}
new
Float:vPos[3];
GetVehiclePos(carid, vPos[0], vPos[1], vPos[2]);
SetPlayerCheckpoint(playerid, vPos[0], vPos[1], vPos[2], 5.0);
return 1;
}
https://sampwiki.blast.hk/wiki/GetPlayerVehicleID