- | Afiseaza codul
#include <amxmodx> #include <hamsandwich> #include <cstrike> #include <amxmisc> #include <fun> #include <fakemeta> #include <engine> #include <xs> #define ACCES_LEVEL ADMIN_LEVEL_H #define PLUGIN "VIP Furien PLUGIN" #define VERSION "Ultimate" #define AUTHOR "...." new g_maxplayers new Float: cl_pushangle[33][3] const WEAPONS_BITSUM = (1<<CSW_KNIFE|1<<CSW_HEGRENADE|1<<CSW_FLASHBANG|1<<CSW_SMOKEGRENADE|1<<CSW_C4) new gViata, gArmura, gHE, gGodModeTime, gTeleportTime; new gHasGodMode[32], gUsed[30]; new bool:recoil[33] new checkCount[33] new blinkSpot[33][3] new origBlinkSpot[33][3] new g_lastPosition[33][3] public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) new weapon_name[24] for (new i = 1; i <= 30; i++) { if (!(WEAPONS_BITSUM & 1 << i) && get_weaponname(i, weapon_name, 23)) { RegisterHam(Ham_Weapon_PrimaryAttack, weapon_name, "fw_Weapon_PrimaryAttack_Pre") RegisterHam(Ham_Weapon_PrimaryAttack, weapon_name, "fw_Weapon_PrimaryAttack_Post", 1) } } register_event("HLTV", "event_round_start", "a", "1=0", "2=0") gViata = register_cvar("vip_hp", "400"); gArmura = register_cvar("vip_armour", "300"); gHE = register_cvar("vip_he_nr", "3"); gGodModeTime = register_cvar("vip_god_time", "15"); gTeleportTime = register_cvar("vip_teleport_time", "1.0"); register_logevent("Inceput_runda", 2 , "1=Round_Start"); RegisterHam( Ham_TraceAttack, "player", "fw_TraceAttack" ); register_clcmd("say /vipmenu", "Creare_meniu"); register_clcmd("say_team /vipmenu", "Creare_meniu"); return PLUGIN_CONTINUE } public event_round_start() for (new id = 1; id <= g_maxplayers; id++) recoil[id] = false public Inceput_runda() { new players[32], num; get_players(players, num, "p"); for(new i = 0; i < num; i++) { gUsed = 0; } } //---------------------------------------------------------------------------------------------- public Creare_meniu(id) { if( get_user_flags( id ) & ACCES_LEVEL) { if(gUsed[id] == 0) { new menu = menu_create("Alege o optiune:", "menu_handler"); menu_additem(menu, "400 HP si 300 Armour", "1", 0); menu_additem(menu, "HE Grenades", "2", 0); menu_additem(menu, "GodMode", "3", 0); menu_additem(menu, "Teleport", "4", 0); menu_additem(menu, "Norecoil", "5",0); menu_setprop(menu, MPROP_EXIT, MEXIT_ALL); menu_display(id, menu, 0); } } else client_print(id, print_chat, "Doar cei cu grad de VIP pot folosi meniul!"); } //---------------------------------------------------------------------------------------------- public menu_handler(id, menu, item) { if( item == MENU_EXIT ) { menu_destroy(menu); return PLUGIN_HANDLED; } new data[6], szName[64]; new access, callback; menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback); new key = str_to_num(data); switch(key) { case 1: { client_print(id, print_chat, "Ai primit %d HP si %d Armour!", get_pcvar_num(gViata), get_pcvar_num(gArmura)); set_user_health(id, get_pcvar_num(gViata)); set_user_armor(id, get_pcvar_num(gArmura)); menu_destroy(menu); return PLUGIN_HANDLED; } case 2: { client_print(id, print_chat, "Ai %d HE Grenades", get_pcvar_num(gHE)); cs_set_user_bpammo( id , CSW_HEGRENADE, get_pcvar_num(gHE)); menu_destroy(menu); return PLUGIN_HANDLED; } case 3: { client_print(id, print_chat, "Ai GodMode pentru %f secunde", get_pcvar_float(gGodModeTime)); gHasGodMode[id] = 1; set_task( get_pcvar_float(gGodModeTime), "End_God", id); menu_destroy(menu); return PLUGIN_HANDLED; } case 4: { client_print(id, print_chat, "Te vei teleporta în %f secunde.", get_pcvar_float(gTeleportTime)); set_task(get_pcvar_float(gTeleportTime), "Teleport_handler", id); menu_destroy(menu); return PLUGIN_HANDLED; } case 5: { client_print(id, print_chat, "Ai primit No Recoil"); recoil[id] = true menu_destroy(menu); return PLUGIN_HANDLED; } } return 1 } //---------------------------------------------------------------------------------------------- public fw_TraceAttack( victim, attacker, Float:damage, Float:direction[3], trace, damageBits ) { if(gHasGodMode[victim]) return HAM_SUPERCEDE; return HAM_IGNORED; } //---------------------------------------------------------------------------------------------- public End_God(id) { gHasGodMode[id] = 0; } //---------------------------------------------------------------------------------------------- public Teleport_handler(id) { get_user_origin(id,blinkSpot[id],3) origBlinkSpot[id][0] = blinkSpot[id][0] origBlinkSpot[id][1] = blinkSpot[id][1] origBlinkSpot[id][2] = blinkSpot[id][2] blinkSpot[id][2] += 45 set_user_origin(id,blinkSpot[id]) checkCount[id] = 1 positionChangeTimer(id) return PLUGIN_CONTINUE } //---------------------------------------------------------------------------------------------- public positionChangeTimer(id) { if (!is_user_alive(id)) return new Float:velocity[3] get_user_origin(id, g_lastPosition[id]) entity_get_vector(id, EV_VEC_velocity, velocity) if ( velocity[0] == 0.0 && velocity[1] == 0.0 && velocity[2] ) { velocity[0] = 50.0 velocity[1] = 50.0 entity_set_vector(id, EV_VEC_velocity, velocity) } set_task(0.1,"positionChangeCheck",id) } //---------------------------------------------------------------------------------------------- public positionChangeCheck(id) { if (!is_user_alive(id)) return new origin[3] get_user_origin(id, origin) if ( g_lastPosition[id][0] == origin[0] && g_lastPosition[id][1] == origin[1] && g_lastPosition[id][2] == origin[2]) { switch(checkCount[id]) { case 0 : blink_movecheck(id, 0, 0, 0) // Original case 1 : blink_movecheck(id, 0, 0, 80) // Up case 2 : blink_movecheck(id, 0, 0, -110) // Down case 3 : blink_movecheck(id, 0, 30, 0) // Forward case 4 : blink_movecheck(id, 0, -30, 0) // Back case 5 : blink_movecheck(id, -30, 0, 0) // Left case 6 : blink_movecheck(id, 30, 0, 0) // Right case 7 : blink_movecheck(id, -30, 30, 0) // Forward-Left case 8 : blink_movecheck(id, 30, 30, 0) // Forward-Right case 9 : blink_movecheck(id, -30, -30, 0) // Back-Left case 10: blink_movecheck(id, 30, -30, 0) // Back-Right case 11: blink_movecheck(id, 0, 30, 60) // Up-Forward case 12: blink_movecheck(id, 0, 30, -110) // Down-Forward case 13: blink_movecheck(id, 0, -30, 60) // Up-Back case 14: blink_movecheck(id, 0, -30, -110) // Down-Back case 15: blink_movecheck(id, -30, 0, 60) // Up-Left case 16: blink_movecheck(id, 30, 0, 60) // Up-Right case 17: blink_movecheck(id, -30, 0, -110) // Down-Left case 18: blink_movecheck(id, 30, 0, -110) // Down-Right default: user_kill(id) } return } } //---------------------------------------------------------------------------------------------- public blink_movecheck(id, mX, mY, mZ) { blinkSpot[id][0] = origBlinkSpot[id][0] + mX blinkSpot[id][1] = origBlinkSpot[id][1] + mY blinkSpot[id][2] = origBlinkSpot[id][2] + mZ set_user_origin(id,blinkSpot[id]) checkCount[id]++ positionChangeTimer(id) } public fw_Weapon_PrimaryAttack_Pre(entity) { new id = pev(entity, pev_owner) if (recoil[id]) { pev(id, pev_punchangle, cl_pushangle[id]) return HAM_IGNORED; } return HAM_IGNORED; } public fw_Weapon_PrimaryAttack_Post(entity) { new id = pev(entity, pev_owner) if (recoil[id]) { new Float: push[3] pev(id, pev_punchangle, push) xs_vec_sub(push, cl_pushangle[id], push) xs_vec_mul_scalar(push, 0.0, push) xs_vec_add(push, cl_pushangle[id], push) set_pev(id, pev_punchangle, push) return HAM_IGNORED; } return HAM_IGNORED; }
IAR CAND SCRIU /vips sa imi apara vip online
MULTUMESC