02.10.2011, 23:51
When the car spawns, assign its id to a global variable, example.
Just put that propperly on your script with the proper car modelids and you're good to go!
pawn Код:
//OUTSIDE of any function
new PlayerVehicle[MAX_PLAYERS];
//On the vehicle spawn
DestroyVehicle(PlayerVehicle[playerid]);
PlayerVehicle[playerid] = CreateVehicle(411,x,y,z+4,a,-1,-1,30000)
PutPlayerInVehicle(playerid,PlayerVehicle[playerid],0);
spawnedcar[playerid] = 1;
//OnPlayerDisconnect
DestroyVehicle(PlayerVehicle[playerid]);
PlayerVehicle[playerid] = 9999999999999999999999999999;
Just put that propperly on your script with the proper car modelids and you're good to go!