Raised This Month: $ Target: $400
 0% 

Use command one time per day.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



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