I tried this code. Works fine.
PHP Code:
new gLastTime[33]
new gTimeLeft[33]
......
public client_PreThink(id)
{
if( get_user_button( id ) & IN_USE )
{
if( get_user_oldbutton( id ) & IN_USE )
{
if( get_systime() - gLastTime[id] < 1 )
return;
client_print( id, print_center, "You are holding use. [%i]", gTimeLeft[id] );
gTimeLeft[id]--;
gLastTime[id] = get_systime();
if( gTimeLeft[id] == 0 )
{
gTimeLeft[id] = 20;
return;
}
}
else gTimeLeft[id] = 20;
}
return;
}
I see count back
__________________