Raised This Month: $ Target: $400
 0% 

[REQ] CT_knives_grenades_only 1


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Moody92
Veteran Member
Join Date: May 2011
Location: Oman
Old 02-14-2019 , 08:54   Re: [REQ] CT_knives_grenades_only 1
Reply With Quote #7

Quote:
Originally Posted by Kalipso22 View Post
PHP Code:
/* Plugin generated by AMXX-Studio */ 

#include <amxmodx> 
#include <fun> 



#define PLUGIN "New Plug-In" 
#define VERSION "1.0" 
#define AUTHOR "author" 


public plugin_init() { 
    
register_plugin(PLUGINVERSIONAUTHOR
    
    
register_event("CurWeapon""Event_Change_Weapon""be""1=1"


public 
Event_Change_Weapon(id

    new 
weaponID read_data(2)  
    if(
get_user_team(id) == 2){ 
        if(
weaponID != CSW_KNIFE && CSW_FLASHBANG && CSW_HEGRENADE && CSW_SMOKEGRENADE){ 
            
strip_user_weapons(id
            
give_item(id,"weapon_knife"
        } 
    } 

PHP Code:
if(weaponID != CSW_KNIFE && CSW_FLASHBANG && CSW_HEGRENADE && CSW_SMOKEGRENADE
You can't just do this, you have to repeat weaponID != to all defined weapons.
ex:
PHP Code:
if(weaponID != CSW_KNIFE && weaponID !=CSW_FLASHBANG && weaponID !=CSW_HEGRENADE && weaponID !=CSW_SMOKEGRENADE
Though, this will disarm CT's whenever they pick up a gun. Assuming they have a set of grenades before picking up the gun, it's just going to disarm them back to knife [only] which is inefficient. You have to add something that prohibits CT's from picking up weapons altogether.

Last edited by Moody92; 02-14-2019 at 08:56.
Moody92 is offline
 


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 02:01.


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