Przerobienie małego pluginu
herossik
25.04.2013
Witam. Chciałbym aby ktoś przerobił ten plugin:
#include #include new const VERSION[] = "0.1" public plugin_init() { register_plugin("HP za Zabicie", VERSION, "Muzzi"); register_event("DeathMsg", "DeathMsg", "a") } public DeathMsg() { new kid = read_data(1) //zabojca new vid = read_data(2); new hs = read_data(3) // HeadShot (1 == true) if(is_user_alive(kid) && is_user_connected(vid) && get_user_team(kid) != get_user_team(vid)) { new health = get_user_health(kid), dodaj = hs ? 15 : 10, limit = 130; set_user_health(kid, health+dodaj > limit ? limit : health+dodaj); Display_Fade(kid,2600,2600,0,0,255,0,15) } } stock Display_Fade(id,duration,holdtime,fadetype,red,green,blue,alpha) { message_begin( MSG_ONE, get_user_msgid("ScreenFade"),{0,0,0},id ) write_short( duration ) // Duration of fadeout write_short( holdtime ) // Hold time of color write_short( fadetype ) // Fade type write_byte ( red ) // Red write_byte ( green ) // Green write_byte ( blue ) // Blue write_byte ( alpha ) // Alpha message_end() }Tak aby gracz z flagą t miał 20 hp za kill i 40 za hs oraz jeśli umiecie to bullet damage ( nie obowiązkowe ). Najlepiej by jeszcze było jakby czytało z komendy /vip motd i w nim by było co posiada vip. Motd sam sobie zrobie.
herossik
26.04.2013
Nie działa ;/ Bullet dmg działa wszystkim i wszystkim daje hp +40.
Chciałbym jeszcze żebyście to poprawili i dodali żeby w hud się pojawiało u góry " Dostałeś x hp"
GT Team 26.04.2013
http://wklej.to/y6Nw7 - Zapomniałem dać warunku czy gracz jest VIPem i dawało każdemu Dodałem HUD
herossik
29.04.2013
Welcome to the AMX Mod X 1.8.1-300 Compiler. Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team hpkill.sma(42) : error 033: array must be indexed (variable "is_vip") hpkill.sma(61) : error 033: array must be indexed (variable "is_vip") 2 Errors. Could not locate output file hpkill.amxx (compile failed).
Skompliuj jak możesz
GT Team 29.04.2013
to ( linia 42)
if(is_user_alive(kid) && is_user_connected(vid) && get_user_team(kid) != get_user_team(vid) && is_vip)zamień na
if(is_user_alive(kid) && is_user_connected(vid) && get_user_team(kid) != get_user_team(vid) && is_vip[kid])i jeszcze to: ( linia 61)
if(!is_user_alive(atakujacy) || !is_user_connected(atakujacy) || !is_vip)zamień na :
if(!is_user_alive(atakujacy) || !is_user_connected(atakujacy) || !is_vip[atakujacy])zauważ co zapomniałem . przynajmniej się nauczysz, co ten błąd oznacza. Sam sobie skompiluj jak nie będzie działać poprawnie to pisz