Thread: [Solved] [L4D2] Weapons
View Single Post
Uncle Jessie
Member
Join Date: May 2016
Location: Mind Prison
Old 03-16-2017 , 20:58   Re: [L4D2] Weapons
Reply With Quote #8

Quote:
Call a timer and return Plugin_Handled on the button
Something like this works fine, thanks.

PHP Code:
public Action:OnPlayerRunCmd(client, &buttons, &impulsFloat:vel[3], Float:angles[3], &weapon)
{
    if(
CanPlayerDrop[client] == false && (buttons IN_SPEED) && (buttons IN_USE))
    {
        
buttons &= ~IN_USE;
        return 
Plugin_Continue;
    }
    
    if(
GetClientTeam(client) == && !IsFakeClient(client) && IsPlayerAlive(client) && (buttons IN_SPEED) && (buttons IN_USE))
    {
        
CanPlayerDrop[client] = false;

        
CreateTimer(2.0ResetDelayclient);
        
Command_Drop(clientslot)
        
buttons &= ~IN_USE;
    }
    
    return 
Plugin_Continue;


Last edited by Uncle Jessie; 03-16-2017 at 20:59.
Uncle Jessie is offline