CVARy w float są zrobione więc i pobieranie musiałem dać float: Ale gdy wysyła wiadomość jest okropnie dużo zer po kropce, i tu pytanie:
Da się jakoś usunąć te zera? Najlepiej jakby było samo bez reszty po kropce.
Potrzebna część sma
g_healing_delay = register_cvar("zp_healing_zombie_delay", "3.0")
g_healing_amount = register_cvar("zp_healing_zombie_amount", "50.0")
public zp_user_infected_post(player, infector)
{
new Float:h12del = get_pcvar_float(g_healing_delay)
new Float:hl2amo = get_pcvar_float(g_healing_amount)
if ((zp_get_user_zombie_class(player) == g_zclass_healing) && !zp_get_user_nemesis(player))
{
client_print(player, print_chat, "[ZP] Your health is regenerated at %f sec by %f HP", h12del, hl2amo)
}
return PLUGIN_CONTINUE
}
Wiadomość wysyłana wygląda tak:
[ZP] Your health is regenerated at 6.000000 sec by 100.000000 H
Użytkownik camilost edytował ten post 24.07.2010 10:56