Raised This Month: $ Target: $400
 0% 

Limit for a command


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 08-20-2009 , 21:24   Re: Limit for a command
Reply With Quote #1

I think with this:

PHP Code:
new counter

...

public 
YourFunction()
{
          if(++
counter == 2)
          { 
               
// Command has been used 2 times
          
}
   
// normal

by joaquimandrade
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 08-20-2009 , 22:09   Re: Limit for a command
Reply With Quote #2

Use return PLUGIN_HANDLED. The only catch is your blocker plugin must be placed before the plugin containing the function in plugins.ini

Tested with my aimbot detection plugin

plugins.ini:
Code:
thisplugin.amxx
aimbotdetet.amxx
PHP Code:
new g_iSaid33 ];

public 
plugin_init() 
{
    
register_concmd"amx_aimwatch" "HookCmd" );
}

public 
HookCmdid )
{
    if ( ++
g_iSaidid ] >= )
    {
        
client_printid print_center"BLOCKED" );
        return 
PLUGIN_HANDLED;
    }

__________________
Bugsy 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 15:11.


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