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

Quote:
Originally Posted by Cxnnor
View Post
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);
            }
        }
EDIT: This is the error:

Code:
Global Freeroam\filterscripts\simplecarmenu.pwn(90) : warning 213: tag mismatch
Global Freeroam\filterscripts\simplecarmenu.pwn(90) : error 029: invalid expression, assumed zero
Global Freeroam\filterscripts\simplecarmenu.pwn(91) : error 017: undefined symbol "DestroyVehicleForPlayer"
Global Freeroam\filterscripts\simplecarmenu.pwn(92) : warning 217: loose indentation
Global Freeroam\filterscripts\simplecarmenu.pwn(99) : error 029: invalid expression, assumed zero
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: 6 Guest(s)