Looking to make a player unable to sprint after they break their leg.
#1

However, the message only gets sent when they press the key - not hold it. I don't want a player to spam press sprint, OR hold it. Is there anyway to prevent them from doing this?

pawn Код:
if (GetPlayerState(playerid) == 1 && (newkeys & KEY_SPRINT) && !(oldkeys & KEY_SPRINT))
    {
        if(PLAYER_BROKEN_LEGS[playerid] == true && HOLDING(KEY_SPRINT))
        {
            SCM(pid, COLOR_GREY, "You're unable to sprint, as your leg is broken.");
            new Float:x, Float:y, Float:z;
            GetPlayerPos(playerid, x, y, z);
            SetPlayerPos(playerid, x, y, z);
            ClearAnimations(playerid);
            return 1;
        }
    }
Reply


Messages In This Thread
Looking to make a player unable to sprint after they break their leg. - by rangerxxll - 22.10.2015, 03:26
Re: Looking to make a player unable to sprint after they break their leg. - by Gammix - 22.10.2015, 03:44
Re: Looking to make a player unable to sprint after they break their leg. - by rangerxxll - 22.10.2015, 05:29
Re: Looking to make a player unable to sprint after they break their leg. - by Gammix - 22.10.2015, 07:55

Forum Jump:


Users browsing this thread: 1 Guest(s)