Raised This Month: $ Target: $400
 0% 

how many times cmd used


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 04-07-2009 , 10:56   how many times cmd used
Reply With Quote #1

hihi

how can i know howmany times a user used a cmd?
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
Dores
Veteran Member
Join Date: Jun 2008
Location: You really don't wanna k
Old 04-07-2009 , 11:16   Re: how many times cmd used
Reply With Quote #2

I think danielkza's Command Limiter would help you out.
__________________
O o
/Ż________________________
| IMMA FIRIN' MAH LAZOR!!!
\_ŻŻŻ
Dores is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 04-07-2009 , 14:32   Re: how many times cmd used
Reply With Quote #3

PHP Code:
new gCommandUses33 ];
public 
plugin_init()
    
register_clcmd"command""command_function" );
public 
command_functionid )
{
    
gCommandUsesid ]++;
    
//...

SnoW is offline
Send a message via MSN to SnoW
Dores
Veteran Member
Join Date: Jun 2008
Location: You really don't wanna k
Old 04-07-2009 , 14:49   Re: how many times cmd used
Reply With Quote #4

PHP Code:
new CommandsCount[33];

public 
client_command(id)
{
    
CommandsCount[id]++;

__________________
O o
/Ż________________________
| IMMA FIRIN' MAH LAZOR!!!
\_ŻŻŻ
Dores is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 04-07-2009 , 15:07   Re: how many times cmd used
Reply With Quote #5

PHP Code:
new gCommandUses33 ];
public 
plugin_init()
    
register_clcmd"command""command_function" );
public 
command_functionid )
{
    
gCommandUses[id]++;
    
//...

lol ok example ill use this :

PHP Code:
new gCommandUses33 ];
public 
plugin_init()
    
register_clcmdsay /hi", "command_function" );
public command_function( id )
{
    gCommandUses[id]++;
    //...

now a if:

if(gCommandUses[id] == 5 ) <<< is this right?
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
Dores
Veteran Member
Join Date: Jun 2008
Location: You really don't wanna k
Old 04-07-2009 , 15:30   Re: how many times cmd used
Reply With Quote #6

Yes.
__________________
O o
/Ż________________________
| IMMA FIRIN' MAH LAZOR!!!
\_ŻŻŻ
Dores 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 02:16.


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