Originally Posted by siriusmd99
Artifact , if you are not experienced in scripting then don't post wrong scripts because other people can have the same problem and they can use wrong script and thinking that they were doing something wrong but not the script itself.
I return to you that word. Mastering the variable types is one of the thing people should learn first.
#define PLUGIN "Cooldown type command"
#define VERSION "1.0"
#define AUTHOR "Freeman"
#define MAX_PLAYERS 32
register_plugin(PLUGIN, VERSION, AUTHOR)
CvarCooldown = register_cvar("amx_cmd_cooldown", "60")
register_clcmd("say /test", "cmd_test")
new Float:gametime = get_gametime()
new Float:command_next_time = CommandNextTime[id]
if( gametime < command_next_time )
new Float:timeleft = command_next_time - gametime
client_print(id, print_chat, "You must wait %.0f second%s to use this command", timeleft, (1.0 <= timeleft < 2.0) ? "s" : "")
CommandNextTime[id] = gametime + get_pcvar_float(CvarCooldown)
// Your command code here