Does anyone know how to make this key state only done by the driver?
#1

pawn Код:
if ((newkeys & KEY_ANALOG_UP) && !(oldkeys & KEY_ANALOG_UP) && IsPlayerInAnyVehicle(playerid) ){
        if(PlayerInfo[playerid][Level] >=2) {
            {
                new Float:vx, Float:vy, Float:vz;
                GetVehicleVelocity(GetPlayerVehicleID(playerid), vx, vy, vz);
                SetVehicleVelocity(GetPlayerVehicleID(playerid) ,vx*1.3,vy*1.3 ,vz*1.3);
            }
        }
    }
    if ((newkeys & KEY_ANALOG_DOWN) && !(oldkeys & KEY_ANALOG_DOWN) && IsPlayerInAnyVehicle(playerid) ){
        if(PlayerInfo[playerid][Level] >=7) {
            {
                new Float:vx, Float:vy, Float:vz;
                GetVehicleVelocity(GetPlayerVehicleID(playerid), vx, vy, vz);
                SetVehicleVelocity(GetPlayerVehicleID(playerid) ,vx/2.8,vy/2.8 ,vz/2.8);
            }
        }
    }
Hi i want it so only the player that is driving can press these bottons. please help and of course +1 rep.
Reply
#2

Thanks i will hopefully test it soon.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)