here some code:
PHP Code:
#include <amxmodx>
#include <hamsandwich>
new g_user_time[33]
public plugin_init(){
RegisterHam(Ham_Spawn, "player", "player_spawn", 1)
register_clcmd("say hi", "cmdSayHI")
}
public client_connect(id)
g_user_time[id] = 0
public player_spawn(id)
if(is_user_alive(id) && g_user_time[id] <= 0)
g_user_time[id] = get_systime()
public cmdSayHI(id){
if(g_user_time[id] <= 0){
//user has not been spawned yet since connect
return PLUGIN_CONTINUE
}
if(get_systime() - g_user_time[id] > 10){
//at least 10 seconds passed since user first spawn
client_print(id, print_chat, "10 seconds already passed.")
return PLUGIN_HANDLED
}
//user has been spawned and 10 seconds have not passed yet
return PLUGIN_CONTINUE
}
__________________