Mensajes: 98
Temas: 33
Registro en: Jan 2020
Reputación:
0
Quisiera que el hud de blueTeam sea azul y el de RedTeam Rojo Ya llevo rato intentando y no me sale si me pudieran ayudar se lo agradecería
Descargar AMXX / TeamScore.sma (Tamaño: 1.71 KB / Descargas: 5)
Mensajes: 101
Temas: 24
Registro en: Nov 2016
Reputación:
0
21/03/2020, 12:29 AM
(Última modificación: 21/03/2020, 12:33 AM por RomeL'. Edited 2 times in total.)
Código PHP: #include <amxmodx> #include <jctf> #include <dhudmessage>
#define PLUGIN "Team Score (JCTF)" #define VERSION "1.46" #define AUTHOR "Sugisaki"
new scorett new scorect
new SND_BLUE_WIN[] = "AxG_CTF/blue_wins.wav" new SND_RED_WIN[] = "AxG_CTF/red_wins.wav" new SND_TEAMS_TIED[] = "AxG_CTF/teams_tied.wav"
enum { TEAM_NONE = 0, TEAM_RED, TEAM_BLUE, TEAM_SPEC }
public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_event("TextMsg","game_c","a","2&#Game_C") set_task(1.0,"score_round",_,_,_,"b") set_task(0.9, "check", _, _, _, "b") scorett = 0 scorect = 0 } public PlaySound(sound[]) { client_cmd(0, "spk ^"%s^"", sound) } public plugin_precache() { precache_sound(SND_BLUE_WIN) precache_sound(SND_RED_WIN) precache_sound(SND_TEAMS_TIED) } public game_c() { set_task(3.0, "reset_score") } public reset_score() { scorett = 0 scorect = 0 } public jctf_flag(ev, id, tm) { if(ev == FLAG_CAPTURED) { switch(tm) { case TEAM_RED: scorect++ case TEAM_BLUE: scorett++ } } return } public score_round() { set_dhudmessage(0, 0, 255, 0.35, 0.01, 1, 0.5, 1.0+0.01) show_dhudmessage(0, "| Blue Team |^n %i", scorect) set_dhudmessage(255, 0, 0, 0.52, 0.01, 1, 0.5, 1.0+0.01) show_dhudmessage(0, "| Red Team |^n %i", scorett) } public check() { new string[10] get_cvar_string("amx_timeleft", string, 10) if(equal(string, "00:00")) { remove_task(_) if(scorect == scorett) PlaySound(SND_TEAMS_TIED) else if(scorect>scorett) PlaySound(SND_BLUE_WIN) else if(scorect<scorett) PlaySound(SND_RED_WIN) } }
No es el que tu tienes pero ve si ese te sirve
Mensajes: 98
Temas: 33
Registro en: Jan 2020
Reputación:
0
Gracias Me Funciono
Mensajes: 12
Temas: 1
Registro en: May 2020
Reputación:
0
(21/03/2020, 12:29 AM)RomeL\ escribió: Código PHP: #include <amxmodx> #include <jctf> #include <dhudmessage>
#define PLUGIN "Team Score (JCTF)" #define VERSION "1.46" #define AUTHOR "Sugisaki"
new scorett new scorect
new SND_BLUE_WIN[] = "AxG_CTF/blue_wins.wav" new SND_RED_WIN[] = "AxG_CTF/red_wins.wav" new SND_TEAMS_TIED[] = "AxG_CTF/teams_tied.wav"
enum { TEAM_NONE = 0, TEAM_RED, TEAM_BLUE, TEAM_SPEC }
public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_event("TextMsg","game_c","a","2&#Game_C") set_task(1.0,"score_round",_,_,_,"b") set_task(0.9, "check", _, _, _, "b") scorett = 0 scorect = 0 } public PlaySound(sound[]) { client_cmd(0, "spk ^"%s^"", sound) } public plugin_precache() { precache_sound(SND_BLUE_WIN) precache_sound(SND_RED_WIN) precache_sound(SND_TEAMS_TIED) } public game_c() { set_task(3.0, "reset_score") } public reset_score() { scorett = 0 scorect = 0 } public jctf_flag(ev, id, tm) { if(ev == FLAG_CAPTURED) { switch(tm) { case TEAM_RED: scorect++ case TEAM_BLUE: scorett++ } } return } public score_round() { set_dhudmessage(0, 0, 255, 0.35, 0.01, 1, 0.5, 1.0+0.01) show_dhudmessage(0, "| Blue Team |^n %i", scorect) set_dhudmessage(255, 0, 0, 0.52, 0.01, 1, 0.5, 1.0+0.01) show_dhudmessage(0, "| Red Team |^n %i", scorett) } public check() { new string[10] get_cvar_string("amx_timeleft", string, 10) if(equal(string, "00:00")) { remove_task(_) if(scorect == scorett) PlaySound(SND_TEAMS_TIED) else if(scorect>scorett) PlaySound(SND_BLUE_WIN) else if(scorect<scorett) PlaySound(SND_RED_WIN) } }
No es el que tu tienes pero ve si ese te sirve
te hago una pregunta, porque a mi siempre me queda en 0 ?
Mensajes: 811
Temas: 99
Registro en: Jun 2019
Reputación:
8
Mensajes: 12
Temas: 1
Registro en: May 2020
Reputación:
0
(30/06/2020, 01:29 AM)andres_1041 escribió: Lo usaste en un Capture The Flag?
Sisi, pero siempre queda en 0
|