SA-MP Forums Archive
Problem with speedboost and vehicle jump - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Problem with speedboost and vehicle jump (/showthread.php?tid=457625)



Problem with speedboost and vehicle jump - UnlimitedFreeroam - 12.08.2013

I've got some weird erros, and I don't know how to fix them, I'm a beginning scripter so..

Quote:

C:\Users\eigenaar\Contacts\Pictures\Desktop\SAUF Server scripting\gamemodes\SAUFServer.pwn(514) : error 017: undefined symbol "EnableBoast"
C:\Users\eigenaar\Contacts\Pictures\Desktop\SAUF Server scripting\gamemodes\SAUFServer.pwn(514) : warning 215: expression has no effect
C:\Users\eigenaar\Contacts\Pictures\Desktop\SAUF Server scripting\gamemodes\SAUFServer.pwn(514) : error 001: expected token: ";", but found "]"
C:\Users\eigenaar\Contacts\Pictures\Desktop\SAUF Server scripting\gamemodes\SAUFServer.pwn(514) : error 029: invalid expression, assumed zero
C:\Users\eigenaar\Contacts\Pictures\Desktop\SAUF Server scripting\gamemodes\SAUFServer.pwn(514) : fatal error 107: too many error messages on one line

pawn Код:
EnableBoast[playerid] = 0;
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{

        if (IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
        {

        if(newkeys & KEY_2)
        {



        if(EnableBoast[playerid] == 1)
        {
        new Float:vx,Float:vy,Float:vz;
        GetVehicleVelocity(GetPlayerVehicleID(playerid),vx,vy,vz);
        SetVehicleVelocity(GetPlayerVehicleID(playerid), vx * 1.8, vy *1.8, vz * 1.8);
        }
        }
        }


        if (IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
        {
        if (newkeys & KEY_Y)
        {

        if(EnableBoast[playerid] == 1)
        {
        new Float:x, Float:y, Float:z;
        GetVehicleVelocity(GetPlayerVehicleID(playerid),x,y,z);
        SetVehicleVelocity(GetPlayerVehicleID(playerid),x,y,z+0.3);
        }
        }
        }
        return 1;
        }



Re: Problem with speedboost and vehicle jump - Misiur - 12.08.2013

Quote:

undefined symbol "EnableBoast"

This is your problem. Typo in "EnableBoost"?


Re: Problem with speedboost and vehicle jump - UnlimitedFreeroam - 12.08.2013

No, I call it EnableBoast..


Re: Problem with speedboost and vehicle jump - Misiur - 12.08.2013

Where did you define it?


Re: Problem with speedboost and vehicle jump - UnlimitedFreeroam - 12.08.2013

Doesn't work at all....