Raised This Month: $28 Target: $400
 7% 

csgo, if command sm_deagle executed block example sm_awp, sm_ak


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
iskenderkebab33
Senior Member
Join Date: Jun 2018
Old 03-18-2019 , 02:56   csgo, if command sm_deagle executed block example sm_awp, sm_ak
Reply With Quote #1

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.
iskenderkebab33 is offline
Cruze
Veteran Member
Join Date: May 2017
Old 03-18-2019 , 07:40   Re: csgo, if command sm_deagle executed block example sm_awp, sm_ak
Reply With Quote #2

Show us plugin you're using
__________________
Taking paid private requests! Add me on steam/discord!
AlliedModders Releases | Github | Private Plugins | PayPal | Steam | My Discord Server
Cruze is offline
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
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:19.


Powered by vBulletin®
Copyright ©2000 - 2021, vBulletin Solutions, Inc.
Theme made by Freecode