12.05.2012, 16:15
This is my script,I want it to delete previous spawned vehicle before spawning new one but it is not working.
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == infernuspickup)
{
new Float:X,Float:Y,Float:Z,vehicle[MAX_PLAYERS];
GetPlayerPos(playerid,X,Y,Z);
DestroyVehicle(vehicle[playerid]);
vehicle[playerid] = CreateVehicle(411,X,Y,Z,0,0,0,-1);
PutPlayerInVehicle(playerid,vehicle[playerid], 0);
return 1;
}
return 1;
}