PHP Code:
#include <amxmodx>
new bool:tenSecs;
public plugin_init() {
register_clcmd("say hi", "cmdSayHi");
register_logevent("logevent_RoundStart", 2, "1=Round_Start");
}
public logevent_RoundStart() {
tenSecs = false;
set_task(10.0, "tenSecsPassed");
}
public tenSecsPassed() {
tenSecs = true;
}
public cmdSayHi(id) {
if (tenSecs) {
client_print(id, print_chat, "10 seconds already passed.");
return PLUGIN_HANDLED;
}
// your code goes here
return PLUGIN_HANDLED;
}