DeBron Posted October 6, 2020 Share Posted October 6, 2020 Aquí les traigo el Plugin Hook (Tela de Araña) ¿Cómo activarlo?: Deben poner "Bind x +tela" en consola, si ustedes quieren cambiar la letra quitan la X y le ponen la que ustedes quieran. /*=========================================*/ /*----------------Drunk-Gaming--------------*/ /*--------------#2 Plugin-------------------*/ /*=========================================*/ /* Si tira error al compilar no es nada */ /* Importantes Includes */ #include <amxmodx> #include <amxmisc> #include <fakemeta> /* Creditos */ #define PLUGIN "[DG] Hook" #define VERSION "v1.0" #define AUTHOR "DeBron & NuRaSiL" /* Funciones */ #define DG_ACCESS ADMIN_KICK /* Flag */ #define RANDOM_NUM random_num(0,255) #define RED 255 #define GREEN 99 #define BLUE 71 /* Funciones 2 */ enum color {normal = 1, green, team} enum {HOOK_OFF, HOOK_RELEASE, HOOK_ON} /* Variables */ new is_plr_connected[33] new bool:g_bCanUseHook[33] new g_bIsHooked[33] new g_iHookOrigin[33][3] new g_bPlayerIsAdmin[33] new g_SpriteBeam new g_SpriteLaser new g_SpriteBall new g_SayText new g_iMaxPlayers new g_dg_tag /* Inicio del Plugin */ public plugin_init() { /* Creditos */ register_plugin(PLUGIN, VERSION, AUTHOR) register_clcmd("say /creditos", "credits") register_forward(FM_Think, "fw_ThinkEnt") register_clcmd("+tela", "TelaOn", DG_ACCESS) /* Al activar el hook*/ register_clcmd("-tela ", "TelaOff", DG_ACCESS) /* Al desactivar el hook */ register_clcmd("dg_hook", "cmd_give_hook", DG_ACCESS ,"<nombre|#iddelusuario|steamid|@todos> <on/off>") /* Para dar hook a alguien */ g_dg_tag = register_cvar("dg_tag", "[DG]") /* Este es el Tag No quitar */ new iEnt = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString , "info_target")) set_pev(iEnt, pev_classname, "hook_think") set_pev(iEnt, pev_nextthink, get_gametime() + 0.1) g_SayText = get_user_msgid("SayText") g_iMaxPlayers = get_maxplayers() } /* Los sprites que uso */ public plugin_precache() { g_SpriteBeam = engfunc(EngFunc_PrecacheModel, "sprites/lgtning.spr") g_SpriteLaser = engfunc(EngFunc_PrecacheModel,"sprites/zbeam4.spr") g_SpriteBall = engfunc(EngFunc_PrecacheModel,"sprites/muz4.spr") } /* Al conectarse */ public client_putinserver(id) { is_plr_connected[id] = true g_bIsHooked[id] = HOOK_OFF if(get_user_flags(id) & DG_ACCESS) g_bPlayerIsAdmin[id] = true } /* al desconectarse */ public client_disconnect(id) { is_plr_connected[id] = false g_bIsHooked[id] = HOOK_OFF if(g_bPlayerIsAdmin[id]) g_bPlayerIsAdmin[id] = false } public dg_prize_hook(id, status[]) { switch(status[0]) { case '0': g_bCanUseHook[id] = false case '1': { g_bCanUseHook[id] = true } } } public cmd_give_hook(id,level,cid) { if(!cmd_access(id,level,cid,3)) return PLUGIN_HANDLED new name[32] get_user_name(id,name,31) new szarg1[32], szarg2[8], bool:mode read_argv(1,szarg1,31) read_argv(2,szarg2,7) if(equal(szarg2,"on")) mode = true if(equal(szarg1,"@todos")) { for(new i = 1; i <= g_iMaxPlayers; i++) { if(is_plr_connected[i] && is_user_alive(i)) { g_bCanUseHook[i] = mode } } } else { new pid = cmd_target(id,szarg1,2) if(pid > 0) { g_bCanUseHook[pid] = mode } } return PLUGIN_HANDLED } /* Comando Creditos -- No Robar Creditos */ public credits(id) { jairito_colorchat(id, green, "!nCreditos: !tDeBron & NuRaSiL") } public TelaOn(id) { if(!g_bCanUseHook[id] && !g_bPlayerIsAdmin[id]) return PLUGIN_HANDLED if(is_plr_connected[id] && is_user_alive(id)) { get_user_origin(id, g_iHookOrigin[id], 3) if(callfunc_begin("DetectCheat","Hook.amxx") == 1) { callfunc_push_int(id) callfunc_push_str("Hook") callfunc_end() } g_bIsHooked[id] = HOOK_ON } return PLUGIN_HANDLED } public TelaOff(id) { g_bIsHooked[id] = HOOK_RELEASE return PLUGIN_HANDLED } public fw_ThinkEnt(iEnt) { if (pev_valid(iEnt)) { static ClassName[32] pev(iEnt, pev_classname, ClassName, 31) if(equal(ClassName, "hook_think")) { fw_HookThink() set_pev(iEnt, pev_nextthink, get_gametime() + 0.1) } } } public fw_HookThink() { static id, origin[3], Float:velocity[3], distance ,i for(id = 1 ; id <= g_iMaxPlayers ; id++) { if(g_bIsHooked[id] == HOOK_ON) { for(i=0;i<3;i++) { message_begin(MSG_BROADCAST, SVC_TEMPENTITY) write_byte(1) // TE_BEAMENTPOINT write_short(id) // entid write_coord(g_iHookOrigin[id][0]) // origin write_coord(g_iHookOrigin[id][1]) // origin write_coord(g_iHookOrigin[id][2]) // origin if(g_bPlayerIsAdmin[id]) { write_short(g_SpriteBeam) // sprite index write_byte(0) // start frame write_byte(0) // framerate write_byte(1) // life write_byte(40) // width write_byte(50) write_byte(RANDOM_NUM) // r write_byte(RANDOM_NUM) // g write_byte(RANDOM_NUM) // b } else { write_short(g_SpriteLaser) // sprite index write_byte(0) // start frame write_byte(0) // framerate write_byte(1) // life write_byte(20) // width write_byte(50) write_byte(RED) // r write_byte(GREEN) // g write_byte(BLUE) // b } write_byte(150) // brightness write_byte(0) // speed message_end() } message_begin(MSG_BROADCAST, SVC_TEMPENTITY) write_byte(TE_SPRITE) write_coord(g_iHookOrigin[id][0]) // origin write_coord(g_iHookOrigin[id][1]) // origin write_coord(g_iHookOrigin[id][2]) // origin write_short(g_SpriteBall) write_byte(20) write_byte(164) message_end() get_user_origin(id, origin) distance = get_distance(g_iHookOrigin[id], origin) if(distance > 25) { velocity[0] = (g_iHookOrigin[id][0] - origin[0]) * (2.0 * 350 / distance) velocity[1] = (g_iHookOrigin[id][1] - origin[1]) * (2.0 * 350 / distance) velocity[2] = (g_iHookOrigin[id][2] - origin[2]) * (2.0 * 350 / distance) set_pev(id, pev_velocity, velocity) } } else if (g_bIsHooked[id] == HOOK_RELEASE) { g_bIsHooked[id] = HOOK_OFF } } } jairito_colorchat(id, color:type, const msg[], {Float,Sql,Result,_}:...) { static message[256], pkmsg[180], changed[8], argscount,j argscount = numargs() switch(type) { case normal: message[0] = 0x01 case green: message[0] = 0x04 default: message[0] = 0x03 } new pktag[32] get_pcvar_string(g_dg_tag, pktag, 31) if(id) { if(is_plr_connected[id]) { vformat(pkmsg, 179, msg, 4) formatex(message[1], 255, "%s %s", pktag, pkmsg) message[192] = '^0' replace_all(message, 191, "!g", "^x04") replace_all(message, 191, "!n", "^x01") replace_all(message, 191, "!t", "^x03") dg_print_msg(id, message) } } else { for(new i = 1; i <= g_iMaxPlayers; i++) { if(is_plr_connected[i]) { new changedcount = 0 for(j = 2; j < argscount; j++) { if(getarg(j) == LANG_PLAYER) { setarg(j, 0, i); changed[changedcount++] = j; } } vformat(pkmsg, 179, msg, 4) formatex(message[1], 255, "%s %s", pktag, pkmsg) message[192] = '^0' replace_all(message, 191, "!g", "^x04") replace_all(message, 191, "!n", "^x01") replace_all(message, 191, "!t", "^x03") dg_print_msg(i, message) for(j = 0; j < changedcount; j++) { setarg(changed[j], 0, LANG_PLAYER) } } } } } stock dg_print_msg(id, const msg[]) { message_begin(MSG_ONE_UNRELIABLE, g_SayText, _, id) write_byte(id) write_string(msg) message_end() } Quote Link to comment Share on other sites More sharing options...
Exrated Posted October 6, 2020 Share Posted October 6, 2020 Te falto colocar en que server de la comunidad pa' Quote Link to comment Share on other sites More sharing options...
DeBron Posted October 6, 2020 Author Share Posted October 6, 2020 hace 4 minutos, sand dijo: Te falto colocar en que server de la comunidad pa' Emm no amigo esto lo puede usar cualquier usuario que este construyendo su servidor oh el mismo drunk-gaming, pero les recomiendo poner este plugin en servidores como el JailBreak, Surf, Deathrun, Zombie Plague. ☆Abraham-_ƬQ2003√ 1 Quote Link to comment Share on other sites More sharing options...
Exrated Posted October 6, 2020 Share Posted October 6, 2020 hace 1 hora, DeBron dijo: Emm no amigo esto lo puede usar cualquier usuario que este construyendo su servidor oh el mismo drunk-gaming, pero les recomiendo poner este plugin en servidores como el JailBreak, Surf, Deathrun, Zombie Plague. Pues... Coloca en que servidores de la comunidad recomiendas ese plugin, es cuestión de imaginarse nada más. Quote Link to comment Share on other sites More sharing options...
DeBron Posted October 6, 2020 Author Share Posted October 6, 2020 hace 55 minutos, sand dijo: Pues... Coloca en que servidores de la comunidad recomiendas ese plugin, es cuestión de imaginarse nada más. amigo el plugin lo hice para cualquier servidor ☆Abraham-_ƬQ2003√ 1 Quote Link to comment Share on other sites More sharing options...
RogeR. Posted November 4, 2020 Share Posted November 4, 2020 En 6/10/2020 a las 16:03, DeBron dijo: Emm no amigo esto lo puede usar cualquier usuario que este construyendo su servidor oh el mismo drunk-gaming, pero les recomiendo poner este plugin en servidores como el JailBreak, Surf, Deathrun, Zombie Plague. Hook en deathrun? Quote Link to comment Share on other sites More sharing options...
☆Abraham-_ƬQ2003√ Posted November 4, 2020 Share Posted November 4, 2020 aea Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.