Po zabiciu więźnia
Gasior
21.03.2012
Szukam pluginu na JB, który po zabiciu więźnia wyświetla czy był on buntownikiem czy też nie.
dasiek
21.03.2012
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #define PLUGIN "Wieznio_kill" #define VERSION "1.0" #define AUTHOR "CheQ" new SyncHudObj2 public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_event("DeathMsg", "Death", "ade"); SyncHudObj2 = CreateHudSyncObj(); } public Death() { new id = read_data(2); new attacker = read_data(1); if(!is_user_alive(attacker) || !is_user_connected(attacker)) return PLUGIN_CONTINUE; if(get_user_team(id) == 1) { new name[32]; get_user_name(id,name,32) set_hudmessage(255, 212, 0, 0.50, 0.33, 1, 6.0, 4.0); ShowSyncHudMsg(0, SyncHudObj2, "%s byl buntownikiem", name); } return PLUGIN_CONTINUE; }
Takie coś?
Gasior
21.03.2012
Mniej więcej, tylko dałbyś radę tak przerobić, żeby pisało jak uderzył to %s byl buntownikiem jak nie uderzył %s byl wiezniem.
Użytkownik Gasior edytował ten post 21.03.2012 13:26
Użytkownik Gasior edytował ten post 21.03.2012 13:26
dasiek
21.03.2012
a na jakiej zasadzie ma sprawdzać czy jest buntownikiem? Czy zadał obrażenia CT?
dasiek
21.03.2012
#include <amxmodx> #include <amxmisc> #include <hamsandwich> #define PLUGIN "Wieznio_kill" #define VERSION "1.0" #define AUTHOR "CheQ" new SyncHudObj2 new bool:buntownik[32]; public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) RegisterHam(Ham_Spawn, "player", "Odrodzenie", 1); register_event("DeathMsg", "Death", "ade"); register_event("Damage", "Damage", "b", "2!=0"); SyncHudObj2 = CreateHudSyncObj(); } public Death() { new id = read_data(2); new attacker = read_data(1); if(!is_user_alive(attacker) || !is_user_connected(attacker)) return PLUGIN_CONTINUE; if(get_user_team(id) == 1) { new name[32], tekst[64]; get_user_name(id,name,32) if(buntownik[id]) { format(tekst,64,"%s byl buntownikiem",name) } else { format(tekst,64,"%s byl wiezniem",name) } set_hudmessage(255, 212, 0, 0.50, 0.33, 1, 6.0, 4.0); ShowSyncHudMsg(0, SyncHudObj2, "%s", tekst); } return PLUGIN_CONTINUE; } public Odrodzenie(id) { buntownik[id] = false; } public Damage(id) { new attacker = get_user_attacker(id); if(!is_user_alive(attacker) || !is_user_connected(attacker) ) return PLUGIN_CONTINUE; if((get_user_team(id) == 1) && (get_user_team(attacker) == 2)) { buntownik[id] =true; } return PLUGIN_CONTINUE; }
Działa?