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

[solved]how to compile plugin gives errors: loose identation?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Owyn
Veteran Member
Join Date: Nov 2007
Old 12-03-2009 , 13:07   [solved]how to compile plugin gives errors: loose identation?
Reply With Quote #1

hi i want to block autobuy and rebuy commands (or just buying HE and smoke Greneades with it)

but register_clcmd("rebuy","cmd_rebuy") and same for autobuy doesn't catch commands =\ it's like status, can we somehow stop rebuy and autoboy?
__________________
☜ Free Mozy ☂backup\҉sync user
Quote:
Американский форум - Задаёшь вопрос, потом тебе отвечают.
Израильский форум - Задаёшь вопрос, потом тебе задают вопрос.
Русский форум - Задаёшь вопрос, потом тебе долго рассказывают, какой ты мудак.

Last edited by Owyn; 12-03-2009 at 15:03.
Owyn is offline
Send a message via ICQ to Owyn
matsi
Thinkosaur
Join Date: Sep 2006
Old 12-03-2009 , 13:58   Re: detect buying nade not working
Reply With Quote #2

Code:
#include <amxmodx> #define MAX_CLIENTS 32 new g_weapons[MAX_CLIENTS + 1] public plugin_init() {     register_event("Money", "event_money", "be") } public client_command(id) {     static dummy[32], dummy2     g_weapons[id] = get_user_weapons(id, dummy, dummy2) } public event_money(id) {     new old_weapons = g_weapons[id]     client_command(id)         new new_weapon = g_weapons[id] & ~old_weapons     if (new_weapon) {         new x = -1         do ++x; while ((new_weapon /= 2) >= 1)         static wname[32]         get_weaponname(x, wname, sizeof wname - 1)         server_print("Player [ClientIndex=%d] has bought ^"%s^" [WeaponIndex=%d]", id, wname, x)                 if( equal( wname, "weapon_hegrenade" ) )         {             //player bought hegrenade         }     } }

VEN's way of detecting buy on all weapons. btw why did you make a new topic about this? Didn't you get the answer in your first topic
http://forums.alliedmods.net/showthr...ht=buy+grenade ?
matsi is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-03-2009 , 14:05   Re: detect buying nade not working
Reply With Quote #3

Maybe from retry/autobuy.

Try to include cstrike and use this forward :

PHP Code:
public CS_InternalCommand(id, const szCommand[])
{
    if( 
equal(szCommand"hegren") )
    {
    }

If not enough, you may have to hook menuselect 4 and check player menu.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Owyn
Veteran Member
Join Date: Nov 2007
Old 12-03-2009 , 14:50   Re: detect buying nade not working
Reply With Quote #4

money() + client_command() that's way too much =\

weird, i thought i tested rebuy =\ wasn't working, but now it is what it was,



edit: updater first post to be the main reason of the thread
__________________
☜ Free Mozy ☂backup\҉sync user
Quote:
Американский форум - Задаёшь вопрос, потом тебе отвечают.
Израильский форум - Задаёшь вопрос, потом тебе задают вопрос.
Русский форум - Задаёшь вопрос, потом тебе долго рассказывают, какой ты мудак.

Last edited by Owyn; 12-03-2009 at 15:03.
Owyn is offline
Send a message via ICQ to Owyn
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-03-2009 , 15:59   Re: how: block rebuy and autobuy ? possible?
Reply With Quote #5

Read my previous post, that forward is fired with [auto/re]buy
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Owyn
Veteran Member
Join Date: Nov 2007
Old 12-03-2009 , 16:11   Re: how: block rebuy and autobuy ? possible?
Reply With Quote #6

wow, thx ^_^
__________________
☜ Free Mozy ☂backup\҉sync user
Quote:
Американский форум - Задаёшь вопрос, потом тебе отвечают.
Израильский форум - Задаёшь вопрос, потом тебе задают вопрос.
Русский форум - Задаёшь вопрос, потом тебе долго рассказывают, какой ты мудак.
Owyn is offline
Send a message via ICQ to Owyn
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 12-03-2009 , 16:17   Re: [solved]how
Reply With Quote #7

Connor is a bible
joaquimandrade is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-03-2009 , 16:38   Re: [solved]how
Reply With Quote #8

Keep your title as it previously was could help some users for their future searches...
__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 11:44.


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