DestroyVehicle
#9

Is that what I told you? Re-read my post carefully please.


Well change
pawn Код:
new pTempVeh[MAX_VEHICLES];
to
pawn Код:
new pTempVeh[MAX_PLAYERS];
and change
pawn Код:
if(GetPlayerVehicleID(playerid) == Veh[playerid])
    DestroyVehicle(Veh[playerid]);
Veh[playerid] = CreateVehicle(597, -1622.4440,651.8917,10.1875, 0.0000, -1, -1, 100);
PutPlayerInVehicle(playerid, Veh[playerid], 0);
to

pawn Код:
if(GetPlayerVehicleID(playerid) == pTempVeh[playerid])
    DestroyVehicle(pTempVeh[playerid]);
pTempVeh[playerid] = CreateVehicle(597, -1622.4440,651.8917,10.1875, 0.0000, -1, -1, 100);
PutPlayerInVehicle(playerid, pTempVeh[playerid], 0);
And notice that it will only destroy the old spawned vehicle if the player is in it (while spawning a new one).
Reply


Messages In This Thread
DestroyVehicle - by TheDeath - 27.07.2012, 18:32
Re: DestroyVehicle - by [KHK]Khalid - 27.07.2012, 18:45
Re: DestroyVehicle - by TheDeath - 27.07.2012, 18:56
Re: DestroyVehicle - by TheDeath - 27.07.2012, 19:14
Re: DestroyVehicle - by [KHK]Khalid - 27.07.2012, 19:19
Re: DestroyVehicle - by milanosie - 27.07.2012, 19:20
Re: DestroyVehicle - by TheDeath - 27.07.2012, 19:21
Re: DestroyVehicle - by TheDeath - 27.07.2012, 19:26
Re: DestroyVehicle - by [KHK]Khalid - 27.07.2012, 19:29

Forum Jump:


Users browsing this thread: 1 Guest(s)