Raised This Month: $ Target: $400
 0% 

Block recive weapons from buttons


Post New Thread Reply   
 
Thread Tools Display Modes
benamo6
Veteran Member
Join Date: Aug 2008
Location: NeverLand
Old 04-13-2010 , 20:53   Re: Block recive weapons from buttons
Reply With Quote #11

BUMP!
__________________
Please help me with this Thread
I am 70% addicted to Counterstrike. What about you?
Ill make any spanish translation of a plugin. Just ask for it
benamo6 is offline
Send a message via MSN to benamo6
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 04-13-2010 , 21:39   Re: Block recive weapons from buttons
Reply With Quote #12

Ohhhhh;

Do you want to block the buttons in CT spawn with the pictures of guns floating above them?

If so:
  • Do you want to block all of them?
  • Do you want to completely remove them?
  • Do you want to give them a new purpose?
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
benamo6
Veteran Member
Join Date: Aug 2008
Location: NeverLand
Old 04-14-2010 , 19:12   Re: Block recive weapons from buttons
Reply With Quote #13

I want to block all of them for CTs.
If its possible it will be better to block any button that gives weapons (only for cts)
__________________
Please help me with this Thread
I am 70% addicted to Counterstrike. What about you?
Ill make any spanish translation of a plugin. Just ask for it

Last edited by benamo6; 04-16-2010 at 10:39.
benamo6 is offline
Send a message via MSN to benamo6
aagguuu
Senior Member
Join Date: Nov 2009
Old 04-17-2010 , 10:29   Re: Block recive weapons from buttons
Reply With Quote #14

Im really interested in this topic too, please could some try to find a solution?
__________________
Scripting: 0% ):

[IMG]http://img340.**************/img340/7371/avrilagu.png[/IMG]


aagguuu is offline
raresnr1
Member
Join Date: Apr 2012
Old 04-07-2013 , 06:19   Re: Block recive weapons from buttons
Reply With Quote #15

it is possible?
raresnr1 is offline
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 04-07-2013 , 07:03   Re: Block recive weapons from buttons
Reply With Quote #16

Yes.
Code:
#include <amxmodx> #include <hamsandwich> #include <fakemeta> public plugin_init() {     register_plugin( "No Button Weapons", "0.0.1", "hornet" );         RegisterHam( Ham_Use, "func_button", "ham_Use_Pre" );     RegisterHam( Ham_Use, "button_target", "ham_Use_Pre" ); } public ham_Use_Pre( iEnt ) {     new szInfo[ 32 ]     pev( iEnt, pev_target, szInfo, charsmax( szInfo ) );         new iTarget = engfunc( EngFunc_FindEntityByString, -1, "targetname", szInfo );         if( iTarget )         pev( iTarget, pev_classname, szInfo, charsmax( szInfo ) );         return equal( szInfo, "multi_manager" ) || equal( szInfo, "game_player_equip" ) ? HAM_SUPERCEDE : HAM_IGNORED; }

I just thought, this may interfer with other map features such as buttons that control certain discos. Do you want them removed completely or just blocked so you can then add a team exception?
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.

Last edited by hornet; 04-07-2013 at 07:18.
hornet is offline
Nax0ne
Senior Member
Join Date: Jul 2011
Location: Chile
Old 12-08-2013 , 10:56   Re: Block recive weapons from buttons
Reply With Quote #17

Quote:
Originally Posted by hornet View Post
Yes.
Code:
#include <amxmodx> #include <hamsandwich> #include <fakemeta> public plugin_init() {     register_plugin( "No Button Weapons", "0.0.1", "hornet" );         RegisterHam( Ham_Use, "func_button", "ham_Use_Pre" );     RegisterHam( Ham_Use, "button_target", "ham_Use_Pre" ); } public ham_Use_Pre( iEnt ) {     new szInfo[ 32 ]     pev( iEnt, pev_target, szInfo, charsmax( szInfo ) );         new iTarget = engfunc( EngFunc_FindEntityByString, -1, "targetname", szInfo );         if( iTarget )         pev( iTarget, pev_classname, szInfo, charsmax( szInfo ) );         return equal( szInfo, "multi_manager" ) || equal( szInfo, "game_player_equip" ) ? HAM_SUPERCEDE : HAM_IGNORED; }

I just thought, this may interfer with other map features such as buttons that control certain discos. Do you want them removed completely or just blocked so you can then add a team exception?
Just what I was looking for.

I have a question. How I can block for a specific team? (Example: Terrorists)
Could use cs_get_user_team (id) == CS_TEAM_T. But where would go? ...

I feel lost.
Nax0ne is offline
OnePL
BANNED
Join Date: May 2012
Location: GB
Old 12-09-2013 , 03:38   Re: Block recive weapons from buttons
Reply With Quote #18

My way:
PHP Code:
#include <amxmodx>
#include <hamsandwich>

public plugin_init() {
    
register_plugin("Block Use""1.0""OnePL");

    
RegisterHam(Ham_Use"game_player_equip""BlockUse");
    
RegisterHam(Ham_Use"player_weaponstrip""BlockUse");
}

public 
BlockUse(entidactivatoriTypeFloat:fValue) {
    if(!
is_user_alive(id) || id == activator) return 1;

    if(
get_user_team(id) == 1) return 4// who has a block 1 - terrorists, 2 - cts

    
return 1;

OnePL is offline
Send a message via ICQ to OnePL Send a message via AIM to OnePL Send a message via Yahoo to OnePL Send a message via Skype™ to OnePL
Nax0ne
Senior Member
Join Date: Jul 2011
Location: Chile
Old 12-09-2013 , 13:35   Re: Block recive weapons from buttons
Reply With Quote #19

Quote:
Originally Posted by OnePL View Post
My way:
PHP Code:
#include <amxmodx>
#include <hamsandwich>

public plugin_init() {
    
register_plugin("Block Use""1.0""OnePL");

    
RegisterHam(Ham_Use"game_player_equip""BlockUse");
    
RegisterHam(Ham_Use"player_weaponstrip""BlockUse");
}

public 
BlockUse(entidactivatoriTypeFloat:fValue) {
    if(!
is_user_alive(id) || id == activator) return 1;

    if(
get_user_team(id) == 1) return 4// who has a block 1 - terrorists, 2 - cts

    
return 1;

OMG! Thank you so much.

It works very well.
Nax0ne 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 07:43.


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