Here's some optimization you could do to the code:
1.
PHP Code:
if(warnedTimes[iPlayer] == 0){
warnedTimes[iPlayer]++;
} else if(warnedTimes[iPlayer] == 1){
warnedTimes[iPlayer]++;
} else if(warnedTimes[iPlayer] == 2){
warnedTimes[iPlayer]++;
Instead of
if() and
else if() you could use
switch().
2. You should specify a HUD time because default is 12 seconds
PHP Code:
set_hudmessage(0, 255, 0, -1.0, -1.6)
3.
Player name can't be longer than 32 characters, so you can use [32].