OnPlayerSprint?
#8

I just updated the code, it should work now - typo basically.

PHP код:
new sprint[MAX_PLAYERS]; 
#define PRESSED(%0) \
    
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
#define RELEASED(%0) \ 
    
(((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0))) 
PHP код:
public OnPlayerKeyStateChange(playeridnewkeysoldkeys

    if(
PRESSED(KEY_SPRINT)) 
    { 
        
sprint[playerid] = 1// Player pressed the sprint key 
    

    if(
RELEASED(KEY_SPRINT)) 
    { 
        
sprint[playerid] = 0// Player letgo of the sprint key 
    

    return 
1

Reply


Messages In This Thread
OnPlayerSprint? - by Lirbo - 17.01.2016, 17:30
Re: OnPlayerSprint? - by PrO.GameR - 17.01.2016, 17:36
Re: OnPlayerSprint? - by Lirbo - 17.01.2016, 17:41
Re: OnPlayerSprint? - by Pottus - 17.01.2016, 18:14
Re: OnPlayerSprint? - by -CaRRoT - 17.01.2016, 18:55
Re: OnPlayerSprint? - by d1git - 17.01.2016, 18:59
Re: OnPlayerSprint? - by Lirbo - 17.01.2016, 19:11
Re: OnPlayerSprint? - by d1git - 17.01.2016, 19:13
Re: OnPlayerSprint? - by Lirbo - 17.01.2016, 19:25
Re: OnPlayerSprint? - by d1git - 17.01.2016, 19:27

Forum Jump:


Users browsing this thread: 2 Guest(s)