Car Spawner Help
#2

When the car spawns, assign its id to a global variable, example.


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!
Reply


Messages In This Thread
Car Spawner Help - by TyThaBomb - 02.10.2011, 23:04
Re: Car Spawner Help - by henry jiggy - 02.10.2011, 23:51

Forum Jump:


Users browsing this thread: 1 Guest(s)