Thread: Shift detection
View Single Post
alasfourom
Senior Member
Join Date: Feb 2022
Location: Saudi Arabia
Old 08-07-2022 , 12:17   Re: Shift detection
Reply With Quote #2

Is That What You Want?


PHP Code:
buttons IN_SPEED //SHIFT Button 
PHP Code:
bool buttondelay [MAXPLAYERS+1];

public 
Action OnPlayerRunCmd (int clientint &buttons)
{
    if (
buttons IN_SPEED && !buttondelay[client])
    {
        
buttondelay[client] = true;
        
CreateTimer(3.0Resetbuttondelayclient);
        
PrintToChat(client"You have pressed the <SHIFT> button");
    }
}

public 
Action Resetbuttondelay(Handle timerint client)
{
    
buttondelay[client] = false;

__________________

Last edited by alasfourom; 08-07-2022 at 12:28.
alasfourom is offline