View Single Post
iskenderkebab33
Senior Member
Join Date: Jun 2018
Old 03-18-2019 , 08:02   Re: csgo, if command sm_deagle executed block example sm_awp, sm_ak
Reply With Quote #3

Quote:
Originally Posted by Cruze View Post
Show us plugin you're using
something like this, but if i write !awp it will block all other commands like !deagle, !ak.
and if i write !reset, it will allow me to write again !awp or !ak or !deagle and after i do it it will block other commands.

PHP Code:
#include <sourcemod>
#include <sdktools>

public void OnPluginStart()
{
    
RegConsoleCmd("sm_awp"cmd_awp);
    
RegConsoleCmd("sm_deagle"cmd_deagle);
    
RegConsoleCmd("sm_ak"cmd_ak);
    
RegConsoleCmd("sm_reset"cmd_reset);
}

public 
Action cmd_awp(int clientint args)
{
    
GivePlayerItem(client"weapon_awp");
}

public 
Action cmd_deagle(int clientint args)
{
    
GivePlayerItem(client"weapon_deagle");
}

public 
Action cmd_ak(int clientint args)
{
    
GivePlayerItem(client"weapon_ak47");
}

public 
Action cmd_reset(int clientint args)
{
    
// reset blocked commands to use again one time


Last edited by iskenderkebab33; 03-18-2019 at 08:03.
iskenderkebab33 is offline