30.05.2014, 18:36
I got A problem, When A player spawn a car/bike/plane with a command (/car)(/v)(acar)(vcar), the car stay always at the place where he spawned it!!!
//above main()
new SpawnedCar[MAX_PLAYERS];
//in your spawn command:
SpawnedCar[playerid] = CreateVehicle(...);
//in OnVehicleSpawn or OnVehicleDeath
if(vehicleid == SpawnedCar[playerid])
{
DestroyVehicle(SpawnedCar[playerid]);
}
forward Destroy(vid);//on top
public Destroy(vid)
{
DestroyVehicle(vid);
return 1;
}
//now this in where you spawn car
new id;
id = CreateVehicle(....);
SetTimerEx("Destroy",1000*60*2/*2mins*/,false,"i",id);