12/06/2019, 03:10 PM
buenas, me pueden ayudar a poner al lado del hud anti-terroristas y terroritas la suma de todo el dinero q tiene los jugadores que cada lado osea sumar el dinero de todos los terroristas y ponerlo al lado del hud y a si con en el de anti terroristas y cuando los terroristas o los anti terroristas vallan gastando dinero en el hud valla bajando tambien
Código PHP:
public pfn_show_money(tid) {
update_team_money(1)
update_team_money(2)
}
update_team_money(team) {
new hud[256], name[32]
for(new i = 1 ; i <= iMaxPlayers ; i++) {
if(!is_user_connected(i) || get_user_team(i) != team) {
continue
}
get_user_name(i, name, 31)
format(hud, charsmax(hud), "%s%s - $%i^n", hud, name, get_member(i, m_iAccount))
}
for(new i = 1 ; i <= iMaxPlayers ; i++) {
if(!is_user_connected(i) || get_user_team(i) != team) {
continue
}
set_hudmessage(0, 255, 0, 0.6, 0.15, 0, 1.0, 1.1, 0.1, 0.2, 1)
show_hudmessage(i, team == 1 ? "Terrorista:" : "Anti-Terrorista:")
set_hudmessage(255, 255, 255, 0.6, 0.18, 0, 1.0, 1.1, 0.1, 0.2, 2)
show_hudmessage(i, hud)
}
}