like that:
PHP Code:
// Here we insert the current times + the necesary time to wait
new g_Time[33];
public touch( id )
{
// here we get the exact current seconds passed from map/server start.
new iCurrentTime = floatround( get_gametime() );
// We check if 'now' is bigger or equal with the g_Time, wich means if he past 10 seconds.
if( iCurrentTIme >= g_Time[ id ] )
{
// Times passed, you can use now!
// your code here ...
// Also we update the time:
// +10 , how many seconds he need to wait until he can use again the command.
g_Time[ id ] = iCurrentTime + 10;
}
else
{
client_print( id , print_chat, "wait %i seconds before use again this command!", g_Time[ id ] - iCurrentTIme );
}
}
__________________