Quote:
Originally Posted by eat1k
new bool:iLag[32]
1) Why "i"? It's a boolean. so bLag. Moreover, it should be MAX_PLAYERS+1 (32+1).
2) Better not to use ResetHUD.
3) get_cvar_num -> get_pcvar_num (if you want to support AMXX 1.8.2. If not, so just use bind_pcvar_*).
4)
PHP Code:
public StartThread(id) if(iLag[id]==false){
->
PHP Code:
public StartThread(id)
{
if(!iLag[id])
set_task(0.1, "ShowTime", id);
}
|
I feel better with booleans like that, I meant to use iLag as a shortening to isLagging (Since I find this the only reason to hide hud text
). ResetHUD and get_cvar_num are easier to understand, I'll look forward for any bugs in this case. But dont know why should I use 33 instead of 32 boolean(s)?