/veh (vehicle spawner admin cmd) won't destroy vehicles
#2

Use CreateVehicle instead of AddStaticVehicle, because you can destroy them with DestroyVehicle afterwards.
You wanna do it like this?

pawn Код:
//OnPlayerConnect
if(pInfo[playerid][pCarid]!=-1)DestroyVehicle(pInfo[playerid][pCarid]);
pInfo[playerid][Carid]=-1;

//In the command:
if(pInfo[playerid][pCarid]!=-1)DestroyVehicle(pInfo[playerid][pCarid]);
CreateVehicle(vehicleid, PosX+1, PosY+1, PosZ, Angle, color[0], color[1], respawndelay);
You can delete it over OnVehicleSpawn (i guess... maybe over OnVehicleDeath, too?! Never tried.)

Don't forget to put the respawndelay in your sscanf code and putting into pInfo. Enjoy.


Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)