[ROZWIĄZANE] pomoc przy zamianie cvaru na...
Najlepsza odpowiedź HaDeS From HELL 05.04.2014 15:50
message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, id)// to dodaje nam jakis efek wizualny write_short(1<<10) write_short(1<<10) write_short(0x0000) write_byte(0) write_byte(200) write_byte(0) write_byte(75) message_end()
to odpowiada za cały efekt, czyli wszystkie jego parametry itp.
Przejdź do postuOporowiec. 04.04.2014
siema, mam taka prosbe moglby mi ktos przerobic ten kod (podany nizej) tak zeby zamiast cvaru od regeneracji hp automatycznie dodalo dana ilosc zdrowia ?
public task_healing(id) { new addhealth = get_pcvar_num(CVAR_HEALTH_ADD) if (!addhealth) return new maxhealth = get_pcvar_num(CVAR_HEALTH_MAX) if (maxhealth > MAX_HEALTH) { set_pcvar_num(CVAR_HEALTH_MAX, MAX_HEALTH) maxhealth = MAX_HEALTH } new health = get_user_health(id) if (is_user_alive(id) && (health < maxhealth)) { set_user_health(id, health + addhealth) set_hudmessage(0, 255, 0, -1.0, 0.25, 0, 1.0, 2.0, 0.1, 0.1, 4) show_hudmessage(id,"<< !!HEAL IN PROGRESS!! >>") message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, id) write_short(1<<10) write_short(1<<10) write_short(0x0000) write_byte(0) write_byte(200) write_byte(0) write_byte(75) message_end() } else { if (is_user_alive(id) && (health > maxhealth)) remove_task(id) } }
i proszę o wytlumaczenie tego kodu:
{ set_user_health(id, health + addhealth) set_hudmessage(0, 255, 0, -1.0, 0.25, 0, 1.0, 2.0, 0.1, 0.1, 4) show_hudmessage(id,"<< !!HEAL IN PROGRESS!! >>") message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, id) write_short(1<<10) write_short(1<<10) write_short(0x0000) write_byte(0) write_byte(200) write_byte(0) write_byte(75) message_end() }
HaDeS From HELL
05.04.2014
zeby zamiast cvaru od regeneracji hp automatycznie dodalo dana ilosc zdrowia
tutaj to zmieniasz:
new addhealth = get_pcvar_num(CVAR_HEALTH_ADD)
możesz to podmienić np na
new addhealth = 20;
teraz bd dodawało 20 hp
i proszę o wytlumaczenie tego kodu:
set_user_health(id, health + addhealth) //ustawia hp graczowi set_hudmessage(0, 255, 0, -1.0, 0.25, 0, 1.0, 2.0, 0.1, 0.1, 4)//odpowada to za parametry wiadomosci hud show_hudmessage(id,"<< !!HEAL IN PROGRESS!! >>")//wiadomosc ktora zostanie wyswietlona message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, id)// to dodaje nam jakis efek wizualny write_short(1<<10) write_short(1<<10) write_short(0x0000) write_byte(0) write_byte(200) write_byte(0) write_byte(75) message_end()
Użytkownik Szybcioor. edytował ten post 05.04.2014 15:45
Oporowiec. 05.04.2014
wielkie dzięki, a jeszcze tutaj:
write_short(1<<10) write_short(1<<10) write_short(0x0000) write_byte(0) write_byte(200) write_byte(0) write_byte(75) message_end()
co sie stanie jesli pozmieniam wszystkie liczby ??
Najlepsza odpowiedź
HaDeS From HELL
05.04.2014
message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, id)// to dodaje nam jakis efek wizualny write_short(1<<10) write_short(1<<10) write_short(0x0000) write_byte(0) write_byte(200) write_byte(0) write_byte(75) message_end()
to odpowiada za cały efekt, czyli wszystkie jego parametry itp.