Raised This Month: $ Target: $400
 0% 

Use command one time per day.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
danielo_o
Member
Join Date: Mar 2011
Old 09-04-2012 , 11:17   Use command one time per day.
Reply With Quote #1

Please help me :d
danielo_o is offline
Torge
Veteran Member
Join Date: Oct 2011
Old 09-04-2012 , 11:22   Re: Use command one time per day.
Reply With Quote #2

I think that work with command limiter, search it.
Torge is offline
danielo_o
Member
Join Date: Mar 2011
Old 09-04-2012 , 14:33   Re: Use command one time per day.
Reply With Quote #3

I didn't find it.
danielo_o is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 09-04-2012 , 14:38   Re: Use command one time per day.
Reply With Quote #4

Search again, it is there.
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
OnePL
BANNED
Join Date: May 2012
Location: GB
Old 09-05-2012 , 07:50   Re: Use command one time per day.
Reply With Quote #5

Maybe something like this?

PHP Code:
#include <amxmodx>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "OnePL"

new last_used

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)

    
register_clcmd("say /something""block_use")
}

public 
block_use(id) {
    if(
get_systime() - last_used 86400 /*time in seconds*/) {
        
client_print(idprint_chat"This command can use once per day!")
        return 
PLUGIN_HANDLED
    
}

    
// code here

    
last_used get_systime()
    return 
PLUGIN_HANDLED


Last edited by OnePL; 09-05-2012 at 07:52.
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
daniel46
Senior Member
Join Date: Dec 2011
Old 09-05-2012 , 08:02   Re: Use command one time per day.
Reply With Quote #6

also can be used like this

PHP Code:
new bool:one_time

public plugin_init() register_event("HLTV""NewRound""a""1=0""2=0")  

public 
NewRound() one_time false

public code()
{
    
one_time true
    
    
if(one_timeclient_print(idprint_chat"This Coammnd Can Used 1 Time A Round"
    
    
else if(!one_time)
    {
    
// Your Code
    
}


Last edited by daniel46; 09-05-2012 at 08:02.
daniel46 is offline
Bos93
Veteran Member
Join Date: Jul 2010
Old 09-05-2012 , 08:04   Re: Use command one time per day.
Reply With Quote #7

http://forums.alliedmods.net/showthread.php?t=176058
__________________
Bos93 is offline
Send a message via ICQ to Bos93 Send a message via Skype™ to Bos93
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 08:22.


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