Dodatek do silnika jailbreak by cypis.
Dodajemy bibliotekę colorchat
Funkcja DeathMsg()
Więc tak, do funkcji plugins_init() dopisujemy na samym końcu
register_event("DeathMsg", "DeathMsg", "a")
Następnie na samym dole dopisujemy to:
public DeathMsg(){ new nickkid[33], nickvid[33]; new kid = read_data(1); new vid = read_data(2); get_user_name(kid, nickkid, 32); get_user_name(vid, nickvid, 32); if(get_user_team(kid) == 2 && get_user_team(vid) == 1) ColorChat(0, GREEN, "[ZGON]^x01 --- ^x03 Klawisz %s^x01 zabil^x03 wieznia %s^x01 --- ", nickkid, nickvid); else if(vid != kid){ if(get_user_team(kid) == 1 && get_user_team(vid) == 1) ColorChat(0, GREEN, "[ZGON]^x01 --- ^x03 Wiezien %s^x01 zabil^x03 wieznia %s^x01 --- Pozostalo: %d wiezniow", nickkid, nickvid, ilosc_graczy[ZYWI]-1); } else if(get_user_team(kid) == 1 && get_user_team(vid) == 2) ColorChat(0, GREEN, "[ZGON]^x01 --- ^x03 Wiezien %s^x01 zabil^x03 klawisza %s^x01", nickkid, nickvid); else if(kid == vid){ if(get_user_team(kid) == 1 && get_user_team(vid) == 1) ColorChat(0, GREEN, "[ZGON]^x01 --- ^x03 Wiezien %s^x01 nie wytrzymal wieziennej presji i popelnil samobojstwo", nickkid);} }
Dodanie do funkcji Ham_Killed:
Szukamy:
public SmiercGraczaPost(id, attacker, shouldgib)
Po:
if(!is_user_connected(id)) return HAM_IGNORED;
Dodajemy:
new nickkid[33], nickvid[33]; get_user_name(id, nickkid, 32); get_user_name(attacker, nickvid, 32); if(get_user_team(id) == 2 && get_user_team(attacker) == 1) ColorChat(0, GREEN, "[ZGON]^x01 --- ^x03 Klawisz %s^x01 zabil^x03 wieznia %s^x01 --- ", nickkid, nickvid); else if(id != attacker){ if(get_user_team(id) == 1 && get_user_team(attacker) == 1) ColorChat(0, GREEN, "[ZGON]^x01 --- ^x03 Wiezien %s^x01 zabil^x03 wieznia %s^x01 --- Pozostalo: %d wiezniow", nickkid, nickvid, ilosc_graczy[ZYWI]-1); } else if(get_user_team(id) == 1 && get_user_team(attacker) == 2) ColorChat(0, GREEN, "[ZGON]^x01 --- ^x03 Wiezien %s^x01 zabil^x03 klawisza %s^x01", nickkid, nickvid); else if(id == attacker){ if(get_user_team(id) == 1 && get_user_team(attacker) == 1) ColorChat(0, GREEN, "[ZGON]^x01 --- ^x03 Wiezien %s^x01 nie wytrzymal wieziennej presji i popelnil samobojstwo", nickkid); }
Oddzielny plugin: