Vehicle won't destroy after spawning another vehicle /image
#4

Took out part of the callback and added
pawn Code:
if(!IsPlayerInAnyVehicle(playerid) == 1)){
        DestroyVehicleForPlayer(playerid);
If you get compile errors tell me and I will attempt to fix them.
pawn Code:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys == KEY_SECONDARY_ATTACK ){
        if(!IsPlayerInAnyVehicle(playerid) == 1)){
        DestroyVehicleForPlayer(playerid);
            new Float:x, Float:y, Float:z, vehicle;
            GetPlayerPos(playerid, x, y, z );
            GetVehicleWithinDistance(playerid, x, y, z, 20.0, vehicle);
            if(IsVehicleRc(vehicle)){
                PutPlayerInVehicle(playerid, vehicle, 0);
            }
        }
Reply


Messages In This Thread
Vehicle won't destroy after spawning another vehicle /image - by kbalor - 11.07.2012, 19:43
Re: Vehicle won't destroy after spawning another vehicle /image - by Cxnnor - 11.07.2012, 20:20
Re: Vehicle won't destroy after spawning another vehicle /image - by kbalor - 11.07.2012, 20:29
Re: Vehicle won't destroy after spawning another vehicle /image - by Cxnnor - 11.07.2012, 20:44
Re: Vehicle won't destroy after spawning another vehicle /image - by kbalor - 11.07.2012, 20:48
Re: Vehicle won't destroy after spawning another vehicle /image - by Cxnnor - 11.07.2012, 20:54
Re: Vehicle won't destroy after spawning another vehicle /image - by kbalor - 11.07.2012, 20:59
Re: Vehicle won't destroy after spawning another vehicle /image - by kbalor - 12.07.2012, 06:30
Re: Vehicle won't destroy after spawning another vehicle /image - by clarencecuzz - 12.07.2012, 06:40
Re: Vehicle won't destroy after spawning another vehicle /image - by kbalor - 12.07.2012, 06:43
Re: Vehicle won't destroy after spawning another vehicle /image - by clarencecuzz - 12.07.2012, 06:45
Re: Vehicle won't destroy after spawning another vehicle /image - by kbalor - 12.07.2012, 06:47
Re: Vehicle won't destroy after spawning another vehicle /image - by clarencecuzz - 12.07.2012, 07:05
Re: Vehicle won't destroy after spawning another vehicle /image - by kbalor - 12.07.2012, 11:09
Re: Vehicle won't destroy after spawning another vehicle /image - by clarencecuzz - 12.07.2012, 11:12
Re: Vehicle won't destroy after spawning another vehicle /image - by kbalor - 12.07.2012, 11:43
Re: Vehicle won't destroy after spawning another vehicle /image - by clarencecuzz - 12.07.2012, 11:54
Re: Vehicle won't destroy after spawning another vehicle /image - by kbalor - 12.07.2012, 12:25
Re: Vehicle won't destroy after spawning another vehicle /image - by clarencecuzz - 12.07.2012, 12:38
Re: Vehicle won't destroy after spawning another vehicle /image - by kbalor - 12.07.2012, 12:44

Forum Jump:


Users browsing this thread: 4 Guest(s)