05.01.2013, 19:41
Код:
forward ContMaintxt(); public ContMaintxt() { if(IniciandoRound || !RoundIniciado) return; if(modetipe == ARENA) { sHealth[HOME] = 0; sHealth[AWAY] = 0; for(new i; i < MAX_PLAYERS; i++) { if(pTeam[i] == HOME && InRound[i] && !pSub[i]) { static Float:HP, Float:Armour; GetPlayerHealth(i, HP); GetPlayerArmour(i, Armour); sHealth[HOME] = sHealth[HOME] + HP + Armour; SetPlayerScore(i, floatround(HP + Armour)); } else if(pTeam[i] == AWAY && InRound[i] && !pSub[i]) { static Float:HP, Float:Armour; GetPlayerHealth(i, HP); GetPlayerArmour(i, Armour); sHealth[AWAY] = sHealth[AWAY] + HP + Armour; SetPlayerScore(i, floatround(HP + Armour)); } } new mensagem[190]; format(mensagem, sizeof(mensagem), "~r~%s(~g~~h~%i~r~) ~w~--:-- ~b~%s(~g~~h~%i~b~)", TeamName[HOME], floatround(sHealth[HOME]), TeamName[AWAY], floatround(sHealth[AWAY])); for(new i; i < MAX_PLAYERS; i++) { TextDrawHideForPlayer(i, maintxt[1]); TextDrawSetString(maintxt[1], mensagem); TextDrawShowForPlayer(i, maintxt[1]); } } SetTimer("ContMaintxt", 500, false); }
se alguem puder dar uma forзa =S