Nie dziala HUD
Najkon
28.12.2011
public ShowHUD(id) { if(is_user_alive(id)) { if(PlayerLevel[id]>=40) { new HUD[128]; format(HUD, 127,"[%s] Poziom: MAX / 40 | Exp: MAX / %d (+0)", Ranga[LEVELS[id]], PlayerXP[id]); { message_begin(MSG_ONE, msgtext, {0,0,0}, id); write_byte(0); write_string(HUD); message_end(); return PLUGIN_CONTINUE; } } else { new HUD2[128]; { format(HUD2, 127,"[%s] Poziom: %i / 33 | Exp: %d / %d (+%d)", Ranga[LEVELS[id]], PlayerLevel[id], PlayerXP[id], LEVELS[PlayerLevel[id]], LEVELS[PlayerLevel[id]] - PlayerXP[id]); message_begin(MSG_ONE, msgtext, {0,0,0}, id); write_byte(0); write_string(HUD2); message_end(); return PLUGIN_CONTINUE; } } } return PLUGIN_CONTINUE; } public UpdateHUD(){ for (new id=0; id < 32; id++) { if (!is_user_connected(id)) continue; if(is_user_alive(id)) ShowHUD(id); } }
I w plugin_init mam zarejestrowane :
set_task(0.1, "UpdateHUD",0,"",0,"b")
Nazwa tematu mowi sama za siebie - nie działa mi hud
Zapalka
28.12.2011
public ShowHUD(id)
{
if(is_user_alive(id))
{
if(PlayerLevel[id]>=40)
{
new HUD[128];
format(HUD, 127,"[%s] Poziom: MAX / 40 | Exp: MAX / %d (+0)", Ranga[LEVELS[id]], PlayerXP[id]);
message_begin(MSG_ONE, msgtext, {0,0,0}, id);
write_byte(0);
write_string(HUD);
message_end();
return PLUGIN_CONTINUE;
}
else
{
new HUD2[128];
format(HUD2, 127,"[%s] Poziom: %i / 33 | Exp: %d / %d (+%d)", Ranga[LEVELS[id]], PlayerLevel[id], PlayerXP[id], LEVELS[PlayerLevel[id]], LEVELS[PlayerLevel[id]] - PlayerXP[id]);
message_begin(MSG_ONE, msgtext, {0,0,0}, id);
write_byte(0);
write_string(HUD2);
message_end();
return PLUGIN_CONTINUE;
}
}
return PLUGIN_CONTINUE;
}
public UpdateHUD(){
for (new id=0; id < 32; id++)
{
if (!is_user_connected(id)) continue;
if(is_user_alive(id))
ShowHUD(id);
}
}
Użytkownik Zapalka edytował ten post 28.12.2011 09:23
Najkon
29.12.2011
Niestety - nie wyświetla nadal.
L 12/28/2011 - 23:03:14: [AMXX] Displaying debug trace (plugin "expmodsurf.amxx")
L 12/28/2011 - 23:03:14: [AMXX] Run time error 4: index out of bounds
L 12/28/2011 - 23:03:14: [AMXX] [0] expmodsurf_311354.sma::ShowHUD (line 209)
L 12/28/2011 - 23:03:14: [AMXX] [1] expmodsurf_311354.sma::client_PreThink (line 1013)
Takimi errorami mi spamuje.
I client prethink
proszę o pomoc
sorry za szybki ref ale w kij pilne to
refresh
L 12/28/2011 - 23:03:14: [AMXX] Displaying debug trace (plugin "expmodsurf.amxx")
L 12/28/2011 - 23:03:14: [AMXX] Run time error 4: index out of bounds
L 12/28/2011 - 23:03:14: [AMXX] [0] expmodsurf_311354.sma::ShowHUD (line 209)
L 12/28/2011 - 23:03:14: [AMXX] [1] expmodsurf_311354.sma::client_PreThink (line 1013)
Takimi errorami mi spamuje.
public ShowHUD(id) { if(is_user_alive(id)) { if(PlayerLevel[id]>=40) { new HUD[128]; format(HUD, 127,"[%s] Poziom: MAX / 40 | Exp: %d / MAX (+0)", Ranga[PlayerLevel[id]], PlayerXP[id]); // 209 linijka message_begin(MSG_ONE, msgtext, {0,0,0}, id); write_byte(0); write_string(HUD); message_end(); return PLUGIN_CONTINUE; } else { new HUD2[128]; format(HUD2, 127,"[%s] Poziom: %i / 40 | Exp: %d / %d (+%d)", Ranga[PlayerLevel[id]], PlayerLevel[id], PlayerXP[id], LEVELS[PlayerLevel[id]], LEVELS[PlayerLevel[id]] - PlayerXP[id]); message_begin(MSG_ONE, msgtext, {0,0,0}, id); write_byte(0); write_string(HUD2); message_end(); return PLUGIN_CONTINUE; } } return PLUGIN_CONTINUE; } public UpdateHUD() { for (new id=0; id < 32; id++) { if (!is_user_connected(id)) return; if(is_user_alive(id)) ShowHUD(id); } }
I client prethink
public client_PreThink(id) { if(!is_user_alive(id)) { return PLUGIN_CONTINUE; } if(is_user_alive(id) && !is_user_bot(id)) { new asd,aim get_user_aiming(id,aim,asd); if(is_user_alive(aim)) { ShowHUD(id); // 1013 linjka <img src='https://amxx.pl/public/style_emoticons/<#EMO_DIR#>/biggrin.png' class='bbc_emoticon' alt=':D' /> } } if(punktyautobh[id] >= 1) { new oldbuttons = get_user_oldbutton(id) oldbuttons &= ~IN_JUMP entity_set_int(id, EV_INT_oldbuttons, oldbuttons) } return PLUGIN_CONTINUE; }
proszę o pomoc
sorry za szybki ref ale w kij pilne to
refresh