hlmod.hu https://hlmod.hu/ |
|
TÖRÖLHETŐ! https://hlmod.hu/viewtopic.php?f=29&t=22114 |
Oldal: 1 / 1 |
Szerző: | ZiT3K [2015.09.01. 23:43 ] |
Hozzászólás témája: | TÖRÖLHETŐ! |
Hali! A következő pluginba szeretném, ha valaki beleírná azt, hogy az ölések mellett a hs-eket is írja ki. SMA Forráskód: [ Mindet kijelol ] #include <amxmodx>#include <amxmisc>#include <hamsandwich>#include <dhudmessage>#include <cstrike> #define PLUGIN "New Plugin" #define AUTHOR "Unknown" #define VERSION "1.0" new g_iKills[32]; new top1, top2, top3; public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_event("DeathMsg", "EventDeathMsg", "a") register_logevent("RoundEnd", 2, "1=Round_End") } public client_disconnect(id) { g_iKills[id] = 0; } public EventDeathMsg() { new killer = read_data(1) new victim = read_data(2) if(killer != victim && killer && cs_get_user_team(killer) != cs_get_user_team(victim)) { g_iKills[killer]++; } else g_iKills[killer]--; } public RoundEnd() { new players[32], num; get_players(players, num); SortCustom1D(players, num, "sort_bestplayer") top1 = players[0] top2 = players[1] top3 = players[2] new top1neve[33], top2neve[33], top3neve[33]; get_user_name(top1, top1neve, charsmax(top1neve)) get_user_name(top2, top2neve, charsmax(top2neve)) get_user_name(top3, top3neve, charsmax(top3neve)) if(num == 1) { set_dhudmessage(37, 133, 239, 0.29, 0.42,0,6.0,12.0,0.1,0.2) show_dhudmessage(0, "H4rdCor3 - Kor legjobbjai:^n1. %s |Ölés:%d", top1neve, g_iKills[top1]) } else if(num == 2) { set_dhudmessage(37, 133, 239, 0.29, 0.42,0,6.0,12.0,0.1,0.2) show_dhudmessage(0, "H4rdCor3 - Kor legjobbjai:^n1. %s |Ölés:%d^n2. %s |Ölés:%d", top1neve, g_iKills[top1], top2neve, g_iKills[top2]) } else if(num >= 3) { set_dhudmessage(37, 133, 239, 0.29, 0.42,0,6.0,12.0,0.1,0.2) show_dhudmessage(0, "H4rdCor3 - Kor legjobbjai:^n1. %s |Ölés:%d^n2. %s |Ölés:%d^n3. %s |Ölés:%d", top1neve, g_iKills[top1], top2neve, g_iKills[top2],top3neve, g_iKills[top3]) } client_print(0, print_chat, "") for(new i; i < 31; i++) { g_iKills[i] = 0; } } public sort_bestplayer(id1, id2) { if(g_iKills[id1] > g_iKills[id2]) return -1; else if(g_iKills[id1] < g_iKills[id2]) return 1; return 0; } stock print_color(const id, const input[], any:...){ new count = 1, players[32] static msg[191] vformat(msg, 190, input, 3) replace_all(msg, 190, "!g", "^4") replace_all(msg, 190, "!y", "^1") replace_all(msg, 190, "!t", "^3") replace_all(msg, 190, "?", "á") replace_all(msg, 190, "?", "é") replace_all(msg, 190, "?", "í") replace_all(msg, 190, "?", "ó") replace_all(msg, 190, "?", "ö") replace_all(msg, 190, "?", "ő") replace_all(msg, 190, "?", "ú") replace_all(msg, 190, "?", "ü") replace_all(msg, 190, "?", "ű") replace_all(msg, 190, "?", "Á") replace_all(msg, 190, "?", "É") replace_all(msg, 190, "?", "Í") replace_all(msg, 190, "?", "Ó") replace_all(msg, 190, "?", "Ö") replace_all(msg, 190, "?", "Ő") replace_all(msg, 190, "?", "Ú") replace_all(msg, 190, "?", "Ü") replace_all(msg, 190, "?", "Ű") if (id) players[0] = id; else get_players(players, count, "ch") { for (new i = 0; i < count; i++) { if (is_user_connected(players[i])) { message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]) write_byte(players[i]) write_string(msg) message_end() } } } return PLUGIN_HANDLED} Előre is köszönöm! |
Oldal: 1 / 1 | Minden időpont UTC+02:00 időzóna szerinti |
Powered by phpBB® Forum Software © phpBB Limited https://www.phpbb.com/ |