PHP Code:
public playersecondtask(id)
{
id -= TASK_ID_MINISECOND
if( get_pcvar_num(cvar_enable) != 1 )
return PLUGIN_CONTINUE
if( g_showtimein[id] > 1 && g_playerstart[id] && is_user_alive(id) )
{
new Float:tiempo = kz_realplayer_time(id)
new iMin, Float:iSec
iMin = floatround(tiempo, floatround_floor)/60;
iSec = tiempo - (60*iMin);
if( g_showtimein[id] == 2 )
{
kz_hud_over(id, "Timer: %02d:%s%.5f | CheckPoint: %i | GoCheck: %i", iMin, iSec < 10 ? "0": "", iSec, g_playercheckpoint[id], g_playergocheck[id])
}
else if( g_showtimein[id] == 3 )
{
kz_reymon_statustext(id, 0, "Timer: %02d:%s%.5f | CheckPoint: %i | GoCheck: %i", iMin, iSec < 10 ? "0": "", iSec, g_playercheckpoint[id], g_playergocheck[id])
}
}
if( !is_user_alive(id) )
{
new mode = pev(id, pev_iuser1)
if( mode == 2 || mode == 4 )
{
new target = pev(id, pev_iuser2)
g_idspecting[1][id] = target
g_idspecting[0][id] = true
if( get_pcvar_num(kz_specinfo) == 1 && g_showkeyspec[id] )
{
new target = pev(id, pev_iuser2)
new button = pev(target, pev_button)
new tiempo = stock_get_user_roundtime(target)
// Credit of this --> cheap_suit
static key[6][6]
formatex(key[0], 5, "%s", (button & IN_FORWARD) && !(button & IN_BACK) ? " W " : " ")
formatex(key[1], 5, "%s", (button & IN_BACK) && !(button & IN_FORWARD) ? " S " : " ")
formatex(key[2], 5, "%s", (button & IN_MOVELEFT) && !(button & IN_MOVERIGHT) ? "A " : " ")
formatex(key[3], 5, "%s", (button & IN_MOVERIGHT) && !(button & IN_MOVELEFT) ? " D" : " ")
formatex(key[4], 5, "%s", (button & IN_DUCK) ? " DUCK " : " ")
formatex(key[5], 5, "%s", (button & IN_JUMP) ? " JUMP " : " ")
kz_hud_center(id, "%s^n%s %s^n%s^n%s^n%s^n^n^nTime: %02d:%02d GoChecks: %d", key[0], key[2], key[3], key[1], key[5], key[4], (tiempo/60), (tiempo%60), g_playergocheck[target])
}
}
else
{
g_idspecting[0][id] = false
}
}
else if( is_user_alive(id) && get_pcvar_num(kz_specinfo) == 1 && g_showkey[id] )
{
new button = pev(id, pev_button)
// Credit of this --> cheap_suit
static key[6][6]
formatex(key[0], 5, "%s", (button & IN_FORWARD) && !(button & IN_BACK) ? " W " : " ")
formatex(key[1], 5, "%s", (button & IN_BACK) && !(button & IN_FORWARD) ? " S " : " ")
formatex(key[2], 5, "%s", (button & IN_MOVELEFT) && !(button & IN_MOVERIGHT) ? "A " : " ")
formatex(key[3], 5, "%s", (button & IN_MOVERIGHT) && !(button & IN_MOVELEFT) ? " D" : " ")
formatex(key[4], 5, "%s", (button & IN_DUCK) ? " DUCK " : " ")
formatex(key[5], 5, "%s", (button & IN_JUMP) ? " JUMP " : " ")
kz_hud_center(id, "%s^n%s %s^n%s^n%s^n%s", key[0], key[2], key[3], key[1], key[5], key[4])
}
return PLUGIN_CONTINUE
}