Key 2 button
#1

hello
if a player press '2' button then hisvehicle should get boost
here is the code
pawn Код:
if(newkeys & KEY_ACTION)
    {
        if(PlayerInfo[playerid][Level] >=2) {
            if (IsPlayerInAnyVehicle(playerid))
            {
                if((GetPlayerVehicleID(playerid) == 520) || (GetPlayerVehicleID(playerid) == 425) || (GetPlayerVehicleID(playerid) == 464)) {
                    return 1;
                }
                else {
                    new Float:vx, Float:vy, Float:vz;
                    GetVehicleVelocity(GetPlayerVehicleID(playerid), vx, vy, vz);
                    SetVehicleVelocity(GetPlayerVehicleID(playerid) ,vx*2,vy*2 ,vz*2);
                }
            }
        }
    }
But in the above code , if we press ctrl then only vehicle should get boost, i want to change it to "2" button
Reply
#2

Код:
if(newkeys & KEY_SUBMISSION)
i guess thats the key youre looking for?
anyways, here are some more listed: https://sampwiki.blast.hk/wiki/GetPlayerKeys
Reply
#3

2 is KEY_SUBMISSION, just change that and it will work. Just as Babul said.
Reply
#4

ok ty guys
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)