Spawn protection
Posted: 2014 Dec 17 19:18
Sveiki, tvarkausi spawn protection kodą, kaip padaryti normalų laikmatį, kad laikas eitu ir rodytu, dabar noriu pasidaryti spalvas, kad rodytu žalią kai yra 5sec, nuo 3sec. geltona ir paskui raudoną
Code: Select all
if ( get_pcvar_num(pSPmsg) == 1 ) { new FTime = get_cvar_num("mp_freezetime") new Float:pSPtime = get_cvar_float("sp_time") new pSPsec = get_cvar_num("sp_time"); if ( pSPsec >= 5 ) set_hudmessage( 0, 255, 0, -1.0, -1.0, 1, 6.0, pSPtime+FTime, 0.4, 0.6, 4 ); else if ( pSPsec <= 3 ) set_hudmessage( 155, 155, 0, -1.0, -1.0, 1, 6.0, pSPtime+FTime, 0.4, 0.6, 4 ); else set_hudmessage( 155, 0, 0, -1.0, -1.0, 1, 6.0, pSPtime+FTime, 0.4, 0.6, 4 ); ShowSyncHudMsg( 0, g_msgsync, "Spawn Protection %d seconds left", pSPsec );}