speedboost with class problem...
#1

hey guys,
i have downloaded this speedboost script and putted it in my gm so i can make it that it only works for the freeroam class but now i have a problem and i cant get it fixed.... i tried everything! but cant get it fixed...
when a player is freeroam class and is in a car and he presses LMB then he should get a boost but it isnt working...
this are my codes can pls someone help me?:
under ongamemodeinit
pawn Код:
for (new i = 0; i < MAX_PLAYERS; i++)
    {
        if (IsPlayerConnected(i) && !IsPlayerNPC(i))
        {
            SpeedBoostMultiplier[i] = 3.0;
        }
    }
onplayerconnect:
pawn Код:
if(Teams[ playerid ] == FREEROAM)
    {
        SpeedBoostMultiplier[playerid] = 2.0;
    }
under onplayerkeystatechange:
pawn Код:
if (IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER && (Teams[ playerid ] == FREEROAM))
    {
        if (newkeys & KEY_FIRE)
        {
            new Float:vx, Float:vy, Float:vz;
            GetVehicleVelocity(GetPlayerVehicleID(playerid), vx, vy, vz);

            if (floatabs(vx) < 3 && floatabs(vy) < 3 && floatabs(vz) < 3)
            {
                SetVehicleVelocity(GetPlayerVehicleID(playerid), vx * SpeedBoostMultiplier[playerid], vy * SpeedBoostMultiplier[playerid], vz * SpeedBoostMultiplier[playerid]);
            }
            return 1;
        }
    }
can anyone tell me whats wrong with this?

greets niels
Reply


Messages In This Thread
speedboost with class problem... - by niels44 - 17.02.2012, 14:23
Re: speedboost with class problem... - by niels44 - 19.02.2012, 13:34
Re: speedboost with class problem... - by aRoach - 19.02.2012, 13:43
Re: speedboost with class problem... - by niels44 - 19.02.2012, 14:49
Re: speedboost with class problem... - by aRoach - 19.02.2012, 14:51
Re: speedboost with class problem... - by niels44 - 19.02.2012, 14:54
Re: speedboost with class problem... - by niels44 - 20.02.2012, 14:26

Forum Jump:


Users browsing this thread: 1 Guest(s)