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-21-2009 , 18:36   Re: Limit for a command
Reply With Quote #1

My example above is not the same? (but now with ">=" and not "==")

PHP Code:
new counter

public plugin_init()
{
    
register_concmd"amx_yourcommand" "HookCmd" )
}

public 
HookCmd(id)
{
    if(++
counter >= 2)
        return 
PLUGIN_HANDLED

__________________
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-21-2009 , 19:29   Re: Limit for a command
Reply With Quote #2

Quote:
Originally Posted by Alucard^ View Post
My example above is not the same? (but now with ">=" and not "==")
What I think he wanted is how to restrict usage of commands that are found in other plugins (that are called with clcmd or concmd). I didn't think he would need help restricting function usage in his own plugin since it is fairly simple. I could be wrong.
__________________

Last edited by Bugsy; 08-21-2009 at 20:52.
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