AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   csgo, if command sm_deagle executed block example sm_awp, sm_ak (https://forums.alliedmods.net/showthread.php?t=315034)

iskenderkebab33 03-18-2019 02:56

csgo, if command sm_deagle executed block example sm_awp, sm_ak
 
Hello, as the title says, need Plugin where it block sm_deagle, sm_ak and or sm_awp if one of them is executed, with sm_resetweapon it will allow again to choce one weapon and block other.

thanks.

Cruze 03-18-2019 07:40

Re: csgo, if command sm_deagle executed block example sm_awp, sm_ak
 
Show us plugin you're using

iskenderkebab33 03-18-2019 08:02

Re: csgo, if command sm_deagle executed block example sm_awp, sm_ak
 
Quote:

Originally Posted by Cruze (Post 2643891)
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




All times are GMT -4. The time now is 11:42.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.