hlmod.hu https://hlmod.hu/ |
|
Plugin https://hlmod.hu/viewtopic.php?f=24&t=20799 |
Oldal: 1 / 1 |
Szerző: | *GrafitY* [ 2015.05.25. 22:08 ] |
Hozzászólás témája: | Plugin |
Sziasztok!! Találtam egy .sma-t de nem tudom mi lenne..valaki elárúlná?? Neten ugy kerestem,mint cd rom ki/be kapcs.. ITT A KÓD: #if !defined USE_AMX #include <amxmodx> #include <amxmisc> #else #include <amxmod> #include <amxmisc> #define get_pcvar_num(%1) get_cvarptr_num(%1) #endif new popcount[33] new popcd_num public plugin_init() { register_plugin("Eject CD", "0.1", "KRoTaL") register_concmd("amx_ejectcd", "amx_eject_cd", ADMIN_SLAY, ": <name/#id/authid/@CT/@TERRORIST/ *(all)> opens the player's CD Drive") register_concmd("amx_closecd", "amx_close_cd", ADMIN_SLAY, ": <name/#id/authid/@CT/@TERRORIST/ *(all)> closes the player's CD Drive") register_concmd("amx_popcd", "amx_pop_cd", ADMIN_SLAY, ": <name/#id/authid/@CT/@TERRORIST/ *(all)> randomly opens and closes the player's CD Drive") popcd_num = register_cvar("popcd_num", "5") } public client_connect(id) { popcount[id] = 0 } public amx_eject_cd(id, level, cid) { if (!cmd_access(id, level, cid, 2)) { return PLUGIN_HANDLED } new arg[32] read_argv(1, arg, 31) new i, players[32], inum, player if(arg[0] == '@') { get_players(players, inum, "e", arg[1]) if(inum == 0) { console_print(id, "No users in such team") return PLUGIN_HANDLED } for(i = 0; i < inum; ++i) { player = players[i] client_cmd(player, "cd eject") set_hudmessage(255, 255, 255, random_float(0.1, 0.7), random_float(0.2, 0.9), 0, 1.0, 6.0, 0.1, 0.2, -1) show_hudmessage(player, "YOU ARE GETTING HACKED!") set_hudmessage(255, 0, 0, random_float(0.1, 0.7), random_float(0.2, 0.9), 0, 1.0, 6.0, 0.1, 0.2,-1) show_hudmessage(player, "YOU ARE GETTING HACKED!") set_hudmessage(0, 0, 255, random_float(0.1, 0.7), random_float(0.2, 0.9), 0, 1.0, 6.0, 0.1, 0.2, -1) show_hudmessage(player, "YOU ARE GETTING HACKED!") set_hudmessage(0, 255, 0, random_float(0.1, 0.7), random_float(0.2, 0.9), 0, 1.0, 6.0, 0.1, 0.2, -1) show_hudmessage(player, "YOU ARE GETTING HACKED!") } } else if(arg[0] == '*') { get_players(players, inum) if(inum == 0) { console_print(id, "No users in such team") return PLUGIN_HANDLED } for(i = 0; i < inum; ++i) { player = players[i] client_cmd(player, "cd eject") set_hudmessage(255, 255, 255, random_float(0.1, 0.7), random_float(0.2, 0.9), 0, 1.0, 6.0, 0.1, 0.2, -1) show_hudmessage(player, "YOU ARE GETTING HACKED!") set_hudmessage(255, 0, 0, random_float(0.1, 0.7), random_float(0.2, 0.9), 0, 1.0, 6.0, 0.1, 0.2, -1) show_hudmessage(player, "YOU ARE GETTING HACKED!") set_hudmessage(0, 0, 255, random_float(0.1, 0.7), random_float(0.2, 0.9), 0, 1.0, 6.0, 0.1, 0.2, -1) show_hudmessage(player, "YOU ARE GETTING HACKED!") set_hudmessage(0, 255, 0, random_float(0.1, 0.7), random_float(0.2, 0.9), 0, 1.0, 6.0, 0.1, 0.2, -1) show_hudmessage(player, "YOU ARE GETTING HACKED!") } } else { player = cmd_target(id, arg, 11) if (!player) return PLUGIN_HANDLED client_cmd(player, "cd eject") set_hudmessage(255, 255, 255, random_float(0.1, 0.7), random_float(0.2, 0.9), 0, 1.0, 6.0, 0.1, 0.2, -1) show_hudmessage(player, "YOU ARE GETTING HACKED!") set_hudmessage(255, 0, 0, random_float(0.1, 0.7), random_float(0.2, 0.9), 0, 1.0, 6.0, 0.1, 0.2, -1) show_hudmessage(player, "YOU ARE GETTING HACKED!") set_hudmessage(0, 0, 255, random_float(0.1, 0.7), random_float(0.2, 0.9), 0, 1.0, 6.0, 0.1, 0.2, -1) show_hudmessage(player, "YOU ARE GETTING HACKED!") set_hudmessage(0, 255, 0, random_float(0.1, 0.7), random_float(0.2, 0.9), 0, 1.0, 6.0, 0.1, 0.2, -1) show_hudmessage(player, "YOU ARE GETTING HACKED!") } return PLUGIN_HANDLED } public amx_close_cd(id, level, cid) { if (!cmd_access(id, level, cid, 2)) { return PLUGIN_HANDLED } new arg[32] read_argv(1,arg,32) new i, players[32], inum, player if(arg[0] == '@') { get_players(players, inum, "e", arg[1]) if(inum == 0) { console_print(id, "No users in such team") return PLUGIN_HANDLED } for(i = 0; i < inum; ++i) { player = players[i] client_cmd(player, "cd close") set_hudmessage(255, 255, 255, random_float(0.1, 0.7), random_float(0.2, 0.9), 0, 1.0, 6.0, 0.1, 0.2, -1) show_hudmessage(player, "YOU ARE GETTING HACKED!") set_hudmessage(255, 0, 0, random_float(0.1, 0.7), random_float(0.2, 0.9), 0, 1.0, 6.0, 0.1, 0.2, -1) show_hudmessage(player, "YOU ARE GETTING HACKED!") set_hudmessage(0, 0, 255, random_float(0.1, 0.7), random_float(0.2, 0.9), 0, 1.0, 6.0, 0.1, 0.2, -1) show_hudmessage(player, "YOU ARE GETTING HACKED!") set_hudmessage(0, 255, 0, random_float(0.1, 0.7), random_float(0.2, 0.9), 0, 1.0, 6.0, 0.1, 0.2, -1) show_hudmessage(player, "YOU ARE GETTING HACKED!") } } else if(arg[0] == '*') { get_players(players, inum) if(inum == 0) { console_print(id, "No users in such team") return PLUGIN_HANDLED } for(i = 0; i < inum; ++i) { player = players[i] client_cmd(player, "cd close") set_hudmessage(255, 255, 255, random_float(0.1, 0.7), random_float(0.2, 0.9), 0, 1.0, 6.0, 0.1, 0.2, -1) show_hudmessage(player, "YOU ARE GETTING HACKED!") set_hudmessage(255, 0, 0, random_float(0.1, 0.7), random_float(0.2, 0.9), 0, 1.0, 6.0, 0.1, 0.2, -1) show_hudmessage(player, "YOU ARE GETTING HACKED!") set_hudmessage(0, 0, 255, random_float(0.1, 0.7), random_float(0.2, 0.9), 0, 1.0, 6.0, 0.1, 0.2, -1) show_hudmessage(player, "YOU ARE GETTING HACKED!") set_hudmessage(0, 255, 0, random_float(0.1, 0.7), random_float(0.2, 0.9), 0, 1.0, 6.0, 0.1, 0.2, -1) show_hudmessage(player, "YOU ARE GETTING HACKED!") } } else { player = cmd_target(id, arg, 11) if (!player) return PLUGIN_HANDLED client_cmd(player, "cd close") set_hudmessage(255, 255, 255, random_float(0.1, 0.7), random_float(0.2, 0.9), 0, 1.0, 6.0, 0.1, 0.2, -1) show_hudmessage(player, "YOU ARE GETTING HACKED!") set_hudmessage(255, 0, 0, random_float(0.1, 0.7), random_float(0.2, 0.9), 0, 1.0, 6.0, 0.1, 0.2, -1) show_hudmessage(player, "YOU ARE GETTING HACKED!") set_hudmessage(0, 0, 255, random_float(0.1, 0.7), random_float(0.2, 0.9), 0, 1.0, 6.0, 0.1, 0.2, -1) show_hudmessage(player, "YOU ARE GETTING HACKED!") set_hudmessage(0, 255, 0, random_float(0.1, 0.7), random_float(0.2, 0.9), 0, 1.0, 6.0, 0.1, 0.2, -1) show_hudmessage(player, "YOU ARE GETTING HACKED!") } return PLUGIN_HANDLED } public amx_pop_cd(id, level, cid) { if (!cmd_access(id,level,cid,2)) { return PLUGIN_HANDLED } new arg[32] read_argv(1,arg,32) new i, players[32], inum, player if(arg[0] == '@') { get_players(players, inum, "e", arg[1]) if(inum == 0) { console_print(id, "No users in such team") return PLUGIN_HANDLED } for(i = 0; i < inum; ++i) { player = players[i] client_cmd(player, "cd eject") set_hudmessage(255, 255, 255, random_float(0.1, 0.7), random_float(0.2, 0.9), 0, 1.0, 4.0, 0.1, 0.2, -1) show_hudmessage(player, "YOU ARE GETTING HACKED!") set_hudmessage(255, 0, 0, random_float(0.1, 0.7), random_float(0.2, 0.9), 0, 1.0, 4.0, 0.1, 0.2, -1) show_hudmessage(player, "YOU ARE GETTING HACKED!") set_hudmessage(0, 0, 255, random_float(0.1, 0.7), random_float(0.2, 0.9), 0, 1.0, 4.0, 0.1, 0.2, -1) show_hudmessage(player, "YOU ARE GETTING HACKED!") set_hudmessage(0, 255, 0, random_float(0.1, 0.7), random_float(0.2, 0.9), 0, 1.0, 4.0, 0.1, 0.2, -1) show_hudmessage(player, "YOU ARE GETTING HACKED!") set_task(random_float(3.0, 6.0), "close_cd", players[i]) } } else if(arg[0] == '*') { get_players(players, inum) if(inum == 0) { console_print(id, "No users in such team") return PLUGIN_HANDLED } for(i = 0; i < inum; ++i) { player = players[i] client_cmd(player, "cd eject") set_hudmessage(255, 255, 255, random_float(0.1, 0.7), random_float(0.2, 0.9), 0, 1.0, 4.0, 0.1, 0.2, -1) show_hudmessage(player, "YOU ARE GETTING HACKED!") set_hudmessage(255, 0, 0, random_float(0.1, 0.7), random_float(0.2, 0.9), 0, 1.0, 4.0, 0.1, 0.2, -1) show_hudmessage(player, "YOU ARE GETTING HACKED!") set_hudmessage(0, 0, 255, random_float(0.1, 0.7), random_float(0.2, 0.9), 0, 1.0, 4.0, 0.1, 0.2, -1) show_hudmessage(player, "YOU ARE GETTING HACKED!") set_hudmessage(0, 255, 0, random_float(0.1, 0.7), random_float(0.2, 0.9), 0, 1.0, 4.0, 0.1, 0.2, -1) show_hudmessage(player, "YOU ARE GETTING HACKED!") set_task(random_float(3.0, 6.0), "close_cd", players[i]) } } else { player = cmd_target(id, arg, 11) if (!player) return PLUGIN_HANDLED client_cmd(player, "cd eject") set_hudmessage(255, 255, 255, random_float(0.1, 0.7), random_float(0.2, 0.9), 0, 1.0, 4.0, 0.1, 0.2, -1) show_hudmessage(player, "YOU ARE GETTING HACKED!") set_hudmessage(255, 0, 0, random_float(0.1, 0.7), random_float(0.2, 0.9), 0, 1.0, 4.0, 0.1, 0.2, -1) show_hudmessage(player, "YOU ARE GETTING HACKED!") set_hudmessage(0, 0, 255, random_float(0.1, 0.7), random_float(0.2, 0.9), 0, 1.0, 4.0, 0.1, 0.2, -1) show_hudmessage(player, "YOU ARE GETTING HACKED!") set_hudmessage(0, 255, 0, random_float(0.1, 0.7), random_float(0.2, 0.9), 0, 1.0, 4.0, 0.1, 0.2, -1) show_hudmessage(player, "YOU ARE GETTING HACKED!") set_task(random_float(3.0, 6.0), "close_cd", player) } return PLUGIN_HANDLED } public open_cd(id) { client_cmd(id, "cd eject") set_hudmessage(255, 255, 255, random_float(0.1, 0.7), random_float(0.2, 0.9), 0, 1.0, 4.0, 0.1, 0.2, -1) show_hudmessage(id, "YOU ARE GETTING HACKED!") set_hudmessage(255, 0, 0, random_float(0.1, 0.7), random_float(0.2, 0.9), 0, 1.0, 4.0, 0.1, 0.2, -1) show_hudmessage(id, "YOU ARE GETTING HACKED!") set_hudmessage(0, 0, 255, random_float(0.1, 0.7), random_float(0.2, 0.9), 0, 1.0, 4.0, 0.1, 0.2, -1) show_hudmessage(id, "YOU ARE GETTING HACKED!") set_hudmessage(0, 255, 0, random_float(0.1, 0.7), random_float(0.2, 0.9), 0, 1.0, 4.0, 0.1, 0.2, -1) show_hudmessage(id, "YOU ARE GETTING HACKED!") set_task(random_float(3.0, 6.0), "close_cd", id) } public close_cd(id) { popcount[id]++ client_cmd(id, "cd close") if(popcount[id] < get_pcvar_num(popcd_num)) { set_task(random_float(3.0, 6.0), "open_cd", id) } else { popcount[id] = 0 } } |
Szerző: | Zeu|Sz [ 2015.05.25. 22:11 ] |
Hozzászólás témája: | Re: Plugin |
Ha beírod konzolba amx_eject_cd "jatekosneve" akkor kinyomja neki a cd olvasót. |
Szerző: | oroszrulett [ 2015.06.04. 14:46 ] |
Hozzászólás témája: | Re: Plugin |
Téma névre figyelj legközelebb + használd a [sma] BBcode -ot. Kuka. |
Oldal: 1 / 1 | Minden időpont UTC+02:00 időzóna szerinti |
Powered by phpBB® Forum Software © phpBB Limited https://www.phpbb.com/ |