Raised This Month: $51 Target: $400
 12% 

[REQ] CT_knives_grenades_only 1


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
blanko
Senior Member
Join Date: Aug 2008
Old 02-05-2019 , 20:19   [REQ] CT_knives_grenades_only 1
Reply With Quote #1

Cts can only pick up and use the knife and grenades
__________________
blanko is offline
blanko
Senior Member
Join Date: Aug 2008
Old 02-13-2019 , 04:38   Re: [REQ] CT_knives_grenades_only 1
Reply With Quote #2

Impossible?
__________________
blanko is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 02-13-2019 , 08:02   Re: [REQ] CT_knives_grenades_only 1
Reply With Quote #3

Explain better.
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/
iceeedr is offline
Send a message via Skype™ to iceeedr
Kalipso22
Junior Member
Join Date: Jul 2018
Location: Türkiye
Old 02-13-2019 , 09:18   Re: [REQ] CT_knives_grenades_only 1
Reply With Quote #4

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(
weaponID != CSW_KNIFE && CSW_FLASHBANG && CSW_HEGRENADE && CSW_SMOKEGRENADE){
    
strip_user_weapons(id)
    
give_item(id,"weapon_knife")
}

Maybe this can be help .
Kalipso22 is offline
blanko
Senior Member
Join Date: Aug 2008
Old 02-13-2019 , 17:37   Re: [REQ] CT_knives_grenades_only 1
Reply With Quote #5

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(
weaponID != CSW_KNIFE && CSW_FLASHBANG && CSW_HEGRENADE && CSW_SMOKEGRENADE){
    
strip_user_weapons(id)
    
give_item(id,"weapon_knife")
}

Maybe this can be help .
It works! But on both teams. I need Terrorists to be able to pick up weapons.
__________________

Last edited by blanko; 02-13-2019 at 18:16.
blanko is offline
Kalipso22
Junior Member
Join Date: Jul 2018
Location: Türkiye
Old 02-14-2019 , 07:33   Re: [REQ] CT_knives_grenades_only 1
Reply With Quote #6

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"
        } 
    } 


Last edited by Kalipso22; 02-14-2019 at 07:34.
Kalipso22 is offline
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
Reply



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 10:52.


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