Plugin Available Ultimate VIP Features
- Spir0x
- Veteran Member
- Posts: 633
- Joined: 2 Years Ago
- Location: Tunisia
- Has thanked: 14 times
- Been thanked: 7 times
- Age: 19
- Contact:
Ultimate VIP Features
Hey everyone, today i'm here with new big idea for VIP. it's Ultimate VIP Features.
It's all about to add a special case "VIP Menu" in main menu allowed only for VIP's with Flag "T" // I mean (ADMIN_LEVEL_H).
Example:
1. Buy weapons
2. Extra-Items
3. VIP Menu
/// What's new in this menu when you click on it ?
1. Knife Menu (Allowed Only for VIP's Of Course)
► Karambit
► Butterfly
► Flachion
► Dual Katana
2. Guns Menu (Allowed Only for VIP's Of Course)
► Lycanthrope [Human]
► Dual Infinity [Human]
3. Glow Menu (Allowed Only for VIP's Of Course)
► Server will choose a random glow for vip's every round .
4. Daily Coins
► (Get 1000 Coins every 24h)
Zombie VIP's can use only: (Daily Golds)
And never forget there's a simple vip features plugin that gives fire/frost nades & more damage, if there's a new idea or update i will add it.
It's all about to add a special case "VIP Menu" in main menu allowed only for VIP's with Flag "T" // I mean (ADMIN_LEVEL_H).
Example:
1. Buy weapons
2. Extra-Items
3. VIP Menu
/// What's new in this menu when you click on it ?
1. Knife Menu (Allowed Only for VIP's Of Course)
► Karambit
► Butterfly
► Flachion
► Dual Katana
2. Guns Menu (Allowed Only for VIP's Of Course)
► Lycanthrope [Human]
► Dual Infinity [Human]
3. Glow Menu (Allowed Only for VIP's Of Course)
► Server will choose a random glow for vip's every round .
4. Daily Coins
► (Get 1000 Coins every 24h)
Zombie VIP's can use only: (Daily Golds)
And never forget there's a simple vip features plugin that gives fire/frost nades & more damage, if there's a new idea or update i will add it.
Last edited by Spir0x on 28 Jun 2019, 15:51, edited 5 times in total.
I trynna make money, not friends.
- Mohamed Alaa
- Mod Developer
- Posts: 626
- Joined: 2 Years Ago
- Location: Egypt
- Has thanked: 34 times
- Been thanked: 49 times
- Age: 19
- Contact:
1) You didn't provide resources for these knives:
► Karambit
► Butterfly
► Flachion
► Dual Katana
2) ► Lycanthrope [Human]
► Unlimited Clip [Human]
► Dual Infinity [Human]
► Leap [Zombie]
► Knockback Bomb [Zombie]
► Blind Bomb [Zombie]
3)
► Skin 1
► Skin 2
► Skin 3
► Skin 4
This is too much for a free one, you shall start making it and post any issues you face
► Karambit
► Butterfly
► Flachion
► Dual Katana
2) ► Lycanthrope [Human]
► Unlimited Clip [Human]
► Dual Infinity [Human]
► Leap [Zombie]
► Knockback Bomb [Zombie]
► Blind Bomb [Zombie]
3)
► Skin 1
► Skin 2
► Skin 3
► Skin 4
This is too much for a free one, you shall start making it and post any issues you face
- Spir0x
- Veteran Member
- Posts: 633
- Joined: 2 Years Ago
- Location: Tunisia
- Has thanked: 14 times
- Been thanked: 7 times
- Age: 19
- Contact:
I don't even know how to make it. this is why i posted here to search help, I can upload knife menu for vips and all extra-items & skins menu for vips too.
I trynna make money, not friends.
- Mohamed Alaa
- Mod Developer
- Posts: 626
- Joined: 2 Years Ago
- Location: Egypt
- Has thanked: 34 times
- Been thanked: 49 times
- Age: 19
- Contact:
VIP Menu:
Trail:
Antidote:
EC reward:
Infinity:
Leap:
Lycanthrope:
Glow menu:
No recoil:
This all untested.
- #include <zombie_escape>
- #include <ze_vip>
- native ze_open_knife_menu(id)
- native ze_open_glow_menu(id)
- native ze_give_lycanthrope_vip(id)
- native ze_give_infinity(id)
- native ze_give_norecoil(id)
- native ze_give_antidote(id)
- native ze_give_leap(id)
- native ze_give_free_coins(id)
- const OFFSET_CSMENUCODE = 205
- const KEYSMENU = MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_5|MENU_KEY_6|MENU_KEY_7|MENU_KEY_8|MENU_KEY_9|MENU_KEY_0
- public plugin_natives()
- {
- register_native("ze_open_ultvip_menu", "native_ze_open_ultvip_menu", 1)
- }
- public native_ze_open_ultvip_menu(id)
- {
- if (!is_user_connected(id))
- return -1
- if (!(get_user_flags(id) & ADMIN_LEVEL_H))
- return false
- Show_Menu(id)
- return true
- }
- public plugin_init()
- {
- register_plugin("[ZE] Ultimate VIP", "1.0", "Jack")
- register_menu("VIP Menu", KEYSMENU, "Main_Menu")
- }
- public Show_Menu(id)
- {
- static szMenu[250]
- new iLen
- iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\rUltimate VIP menu^n")
- iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "^n\y1\d. \wKnife menu")
- if (is_user_alive(id))
- {
- iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "^n\y2\d. \wGuns menu")
- }
- else
- {
- iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "^n\d2. Guns menu")
- }
- iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "^n\y3\d. \wGlow menu")
- iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "^n\y4\d. \wFree 500 EC")
- iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "^n^n\y0\d. \r%L", id, "EXIT")
- set_pdata_int(id, OFFSET_CSMENUCODE, 0)
- show_menu(id, KEYSMENU, szMenu, -1, "Main Menu")
- }
- public Main_Menu(id, key)
- {
- if (!is_user_connected(id))
- return PLUGIN_HANDLED
- switch (key)
- {
- case 0: ze_open_knife_menu(id)
- case 1:
- {
- if (is_user_alive(id))
- {
- if (ze_is_user_zombie(id))
- Open_ZGunMenu(id)
- else
- Open_HGunMenu(id)
- }
- else
- {
- ze_colored_print(id, "%L", id, "DEAD_CANT_BUY_WEAPON")
- }
- }
- case 2: ze_open_glow_menu(id)
- case 3: ze_give_free_coins(id)
- }
- return PLUGIN_HANDLED
- }
- public Open_ZGunMenu(id)
- {
- new iMenu = menu_create("\rVIP Items:^n^n", "ZVIPMenu_Handler")
- menu_additem(iMenu, "Antidote")
- menu_additem(iMenu, "Leap")
- menu_setprop(iMenu, MPROP_EXIT, MEXIT_ALL)
- menu_display(id, iMenu, 0)
- }
- public ZVIPMenu_Handler(id, iMenu, iItem)
- {
- if (!is_user_connected(id))
- return PLUGIN_CONTINUE
- switch (iItem)
- {
- case 0: ze_give_antidote(id)
- case 1: ze_give_leap(id)
- }
- menu_destroy(iMenu)
- return PLUGIN_HANDLED
- }
- public Open_HGunMenu(id)
- {
- new iMenu = menu_create("\rVIP Items:^n^n", "HVIPMenu_Handler")
- menu_additem(iMenu, "Lycanthrope")
- menu_additem(iMenu, "Dual Infinity")
- menu_additem(iMenu, "No Recoil")
- menu_additem(iMenu, "Antidote")
- menu_setprop(iMenu, MPROP_EXIT, MEXIT_ALL)
- menu_display(id, iMenu, 0)
- }
- public HVIPMenu_Handler(id, iMenu, iItem)
- {
- if (!is_user_connected(id))
- return PLUGIN_CONTINUE
- switch (iItem)
- {
- case 0: ze_give_lycanthrope_vip(id)
- case 1: ze_give_infinity(id)
- case 2: ze_give_norecoil(id)
- }
- menu_destroy(iMenu)
- return PLUGIN_HANDLED
- }
Trail:
- #include <zombie_escape>
- #define VIP_ACCESS ADMIN_LEVEL_H
- new gTrailSprite, gTrailRandomColor[33][3], bPlayerTrailStatus[33], Float:bflNextCheck[33]
- const IN_MOVING = IN_FORWARD | IN_BACK | IN_MOVELEFT | IN_MOVERIGHT | IN_JUMP
- public plugin_init()
- {
- register_plugin("VIP Trail", "2.0", "Jack")
- register_forward(FM_CmdStart, "forward_cmdstart")
- register_clcmd("say trail", "cmdMakeOwnerTrail", VIP_ACCESS)
- register_clcmd("say_team trail", "cmdMakeOwnerTrail", VIP_ACCESS)
- RegisterHookChain(RG_CBasePlayer_Spawn, "Fw_PlayerSpawn_Post", 1)
- }
- public plugin_precache() gTrailSprite = precache_model("sprites/new_trail_1.spr")
- public client_connect(id) bPlayerTrailStatus[id] = 0
- public Fw_PlayerSpawn_Post(id)
- {
- if(get_user_flags(id) & VIP_ACCESS)
- {
- bPlayerTrailStatus[id] = 1
- gTrailRandomColor[id][0] = random_num(0, 255)
- gTrailRandomColor[id][1] = random_num(0, 255)
- gTrailRandomColor[id][2] = random_num(0, 255)
- set_task(10.0, "change_color", id+81732519124, "b")
- }
- }
- public change_color(taskid)
- {
- new id = taskid - 81732519124
- if(!is_user_alive(id))
- {
- remove_task(taskid)
- return
- }
- gTrailRandomColor[id][0] = random_num(0, 255)
- gTrailRandomColor[id][1] = random_num(0, 255)
- gTrailRandomColor[id][2] = random_num(0, 255)
- }
- public cmdMakeOwnerTrail(id)
- {
- if(!is_user_alive(id) || !(get_user_flags(id) & VIP_ACCESS))
- return
- if(bPlayerTrailStatus[id] == 1)
- {
- bPlayerTrailStatus[id] = 0
- message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
- write_byte(TE_KILLBEAM)
- write_short(id)
- message_end()
- bflNextCheck[id] = -5000.0
- ze_colored_print(id, "!gTrail !thas been de-activated !y!")
- }
- else if(bPlayerTrailStatus[id] == 0)
- {
- bPlayerTrailStatus[id] = 1
- gTrailRandomColor[id][0] = random_num(0, 255)
- gTrailRandomColor[id][1] = random_num(0, 255)
- gTrailRandomColor[id][2] = random_num(0, 255)
- ze_colored_print(id, "!gTrail !thas been activated !y!")
- }
- }
- public forward_cmdstart(id, handle)
- {
- if(!is_user_alive(id) || bPlayerTrailStatus[id] == 0) return
- if(!(get_uc(handle, UC_Buttons) & IN_MOVING))
- {
- if(bflNextCheck[id] < get_gametime())
- {
- message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
- write_byte(TE_KILLBEAM)
- write_short(id)
- message_end()
- message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
- write_byte(TE_BEAMFOLLOW)
- write_short(id)
- write_short(gTrailSprite)
- write_byte(15)
- write_byte(20)
- write_byte(gTrailRandomColor[id][0])
- write_byte(gTrailRandomColor[id][1])
- write_byte(gTrailRandomColor[id][2])
- write_byte(255)
- message_end()
- bflNextCheck[id] = get_gametime() + (15/8)
- }
- }
- }
- /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
- *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1042\\ f0\\ fs16 \n\\ par }
- */
Antidote:
- #include <zombie_escape>
- public plugin_natives()
- {
- register_native("ze_give_antidote", "native_ze_give_antidote", 1)
- }
- public native_ze_give_antidote(id)
- {
- if (!is_user_connected(id))
- return -1
- Get_Antidote(id)
- return true
- }
- public plugin_init()
- {
- register_plugin("[ZE] Extra Item: Antidote", "1.0", "Spi")
- }
- public Get_Antidote(id)
- {
- new szName[32]
- ze_set_user_human(id)
- get_user_name(id, szName, charsmax(szName))
- set_hudmessage(0, 0, 255, -0.05, -0.45, 1, 0.0, 5.0, 1.0, 1.0, -1)
- show_hudmessage(0, "%s has used antidote!", szName)
- }
- /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
- *{\\ rtf1\\ ansi\\ ansicpg1252\\ deff0\\ deflang1036{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
- */
EC reward:
- #include <zombie_escape>
- #include <nvault>
- #define NV_NAME "GET_GOLDS"
- enum player_struct {
- mtime,bool:ftime,key[64]
- }
- new g_player[33][player_struct];
- new cvar_save_type,cvar_time,cvar_coins;
- public plugin_natives()
- {
- register_plugin("ze_give_free_coins", "native_ze_give_free_coins", 1)
- }
- public native_ze_give_free_coins(id)
- {
- if (!is_user_connected(id))
- return -1
- cmd_coins(id)
- return true
- }
- public plugin_init() {
- register_plugin("Get Escape Coins", "1.0", "ZE DEV TEAM");
- cvar_save_type = register_cvar("get_golds_save_type","1"); // how to save data 1 by authid, 2 by ip or 3 by name
- cvar_time = register_cvar("get_golds_minutes","720"); // time in minutes, 720minutes=12hours it will be auto calculated
- cvar_coins = register_cvar("get_golds_coins","200"); // how many coins to give
- }
- public cmd_coins(id) {
- new nv = nvault_open(NV_NAME);
- if(nv == INVALID_HANDLE) {
- ze_colored_print(id, "!tFor the moment getting golds system is inactive..");
- return;
- }
- new txt_min[32],txt_coins[10];
- new coins = get_pcvar_num(cvar_coins),pminutes = get_pcvar_num(cvar_time);
- copy(txt_coins,charsmax(txt_coins),(coins==1)?"coin":"coins");
- build_time(pminutes,txt_min,charsmax(txt_min));
- if(g_player[id][ftime]) {
- ze_colored_print(id, "!tYou have received !g%d !tGolds!y, !tget another in !g%s!y!",coins,txt_min);
- ze_set_escape_coins(id, ze_get_escape_coins(id) + coins);
- g_player[id][ftime]=false;
- nvault_touch(nv,g_player[id][key],g_player[id][mtime]=get_systime());
- return;
- }
- new user_time=get_systime()-g_player[id][mtime];
- new diff_min=(user_time<(pminutes*60))?pminutes-(user_time/60):pminutes;
- build_time(diff_min,txt_min,charsmax(txt_min));
- if(user_time>=(pminutes*60)) {
- ze_colored_print(id, "!tYou have just received !g%d !tGolds!y, !tsince !g%s !tpassed!y!",coins,txt_min);
- ze_set_escape_coins(id, ze_get_escape_coins(id) + coins);
- nvault_touch(nv,g_player[id][key],g_player[id][mtime]=get_systime());
- }
- else
- ze_colored_print(id, "!tRetry again in !g%s !tfor getting !g%d !tmore Golds!y.",txt_min,coins);
- nvault_close(nv);
- }
- public client_putinserver(id) {
- new nv,data[32];
- get_auth(id,g_player[id][key],charsmax(g_player[][key]));
- g_player[id][mtime]=get_systime();
- g_player[id][ftime]=false;
- formatex(data,charsmax(data),"%d",g_player[id][mtime]);
- if((nv=nvault_open(NV_NAME))==INVALID_HANDLE)
- return;
- if(!nvault_lookup(nv,g_player[id][key],data,charsmax(data),g_player[id][mtime])) {
- nvault_set(nv,g_player[id][key],data);
- g_player[id][ftime]=true;
- }
- nvault_close(nv);
- }
- public client_disconnected(id) {
- g_player[id][mtime]=0;
- g_player[id][ftime]=false;
- }
- stock get_auth(id,data[],len)
- switch(get_pcvar_num(cvar_save_type)) {
- case 1: get_user_authid(id,data,len);
- case 2: get_user_ip(id,data,len,1);
- case 3: get_user_name(id,data,len);
- }
- stock build_time(pminutes,data[],len)
- if(pminutes==1)
- copy(data,len,"1 minute");
- else if(pminutes!=1&&pminutes<60)
- formatex(data,len,"%d minutes",pminutes);
- else if(pminutes==60)
- copy(data,len,"1 hour");
- else {
- new ptime=pminutes/60;
- if(ptime*60==pminutes)
- formatex(data,len,"%d %s",ptime,(ptime==1)?"hour":"hours");
- else {
- new diff=pminutes-ptime*60;
- formatex(data,len,"%d %s and %d %s",ptime,(ptime==1)?"hour":"hours",diff,(diff==1)?"minute":"minutes");
- }
- }
- /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
- *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1036\\ f0\\ fs16 \n\\ par }
- */
Infinity:
- #include <ze_vip>
- #include <cstrike>
- #include <fakemeta_util>
- #define PLUGIN "[ZE] Extra : DualInfinity"
- #define VERSION "1.0"
- #define AUTHOR "Spi"
- #define CONFIG_CFG_FILE "weapons/dual_infinity.cfg"
- #define OFFSET_LINUX_WEAPONS 4
- #define OFFSET_LINUX 5
- #define m_flNextAttack 83
- #define m_flNextPrimaryAttack 46
- #define m_flTimeWeaponIdle 48
- #define m_fInReload 54
- #define pev_weaponkey pev_impulse
- #define weaponkey_value 18318
- #define CSW_INFINITY CSW_ELITE
- #define VIP_ACCESS ADMIN_LEVEL_H
- new const g_weapon_entity[]="weapon_elite"
- new const g_weapon_event1[]="events/elite_right.sc"
- new const g_weapon_event2[]="events/elite_left.sc"
- new const g_weapon_weaponbox_model[]="models/w_elite.mdl"
- new const weapon_list_txt[]="weapon_dual_infinity2"
- new const weapon_list_sprites[][]=
- {
- "sprites/640hud42.spr",
- "sprites/640hud43.spr",
- "sprites/640hud7.spr"
- }
- new const ViewModel[]="models/Premuim_ZE/v_infinity.mdl"
- new const PlayerModel[]="models/Premuim_ZE/p_infinity.mdl"
- new const WorldModel[]="models/Premuim_ZE/w_infinity.mdl"
- new const Sounds[][]=
- {
- "weapons/infi-1.wav",
- "weapons/infi_clipin.wav",
- "weapons/infi_clipon.wav",
- "weapons/infi_clipout.wav",
- "weapons/infi_draw.wav"
- }
- new Blood[2]
- new g_orig_event_dinfinity
- new g_HasInfinity[33], g_player_weapon_ammo[33], Float:cl_pushangle[33][3], g_shoot_anim[33], g_hitgroup[33]
- new g_mode[33], g_anim_mode[33]
- new pcvar_item_name, pcvar_clipammo, pcvar_bpammo, pcvar_cost, pcvar_time_fire_normal, pcvar_time_fire_fast
- new pcvar_normal_damage_head, pcvar_normal_damage_chest, pcvar_normal_damage_stomach, pcvar_normal_damage_arms, pcvar_normal_damage_legs
- new pcvar_fast_damage_head, pcvar_fast_damage_chest, pcvar_fast_damage_stomach, pcvar_fast_damage_arms, pcvar_fast_damage_legs
- new Float:cvar_time_fire_normal, Float:cvar_time_fire_fast
- const SECONDARY_WEAPONS_BIT_SUM = (1<<CSW_P228)|(1<<CSW_ELITE)|(1<<CSW_FIVESEVEN)|(1<<CSW_USP)|(1<<CSW_GLOCK18)|(1<<CSW_DEAGLE)
- public plugin_natives()
- {
- register_native("ze_give_infinity", "native_ze_give_infinity", 1)
- }
- public native_ze_give_infinity(id)
- {
- if (!is_user_connected(id))
- return -1
- give_infinity(id)
- return true
- }
- public plugin_init()
- {
- register_plugin(PLUGIN, VERSION, AUTHOR)
- register_clcmd(weapon_list_txt, "Redirect")
- pcvar_item_name=register_cvar("dinfinity_item_name", "Dual Infinity")
- pcvar_cost=register_cvar("dinfinity_cost", "15")
- pcvar_bpammo=register_cvar("dinfinity_bpammo", "100")
- pcvar_clipammo=register_cvar("dinfinity_clipammo", "40")
- pcvar_time_fire_normal=register_cvar("dinfinity_fire_normal_period", "0.15")
- pcvar_time_fire_fast=register_cvar("dinfinity_fire_fast_period", "0.02")
- pcvar_normal_damage_head=register_cvar("dinfinity_normal_damage_head", "130")
- pcvar_normal_damage_chest=register_cvar("dinfinity_normal_damage_chest", "34")
- pcvar_normal_damage_stomach=register_cvar("dinfinity_normal_damage_stomach", "34")
- pcvar_normal_damage_arms=register_cvar("dinfinity_normal_damage_arms", "34")
- pcvar_normal_damage_legs=register_cvar("dinfinity_normal_damage_legs", "34")
- pcvar_fast_damage_head=register_cvar("dinfinity_fast_damage_head", "115")
- pcvar_fast_damage_chest=register_cvar("dinfinity_fast_damage_chest", "30")
- pcvar_fast_damage_stomach=register_cvar("dinfinity_fast_damage_stomach", "30")
- pcvar_fast_damage_arms=register_cvar("dinfinity_fast_damage_arms", "30")
- pcvar_fast_damage_legs=register_cvar("dinfinity_fast_damage_legs", "30")
- ReadSettings()
- RegisterHam(Ham_Item_AddToPlayer, g_weapon_entity, "fwAddToPlayer", 1)
- RegisterHam(Ham_Item_Deploy, g_weapon_entity, "fwDeployPost", 1)
- RegisterHam(Ham_Weapon_PrimaryAttack, g_weapon_entity, "fwPrimaryAttack")
- RegisterHam(Ham_Weapon_Reload, g_weapon_entity, "fwReloadPre")
- RegisterHam(Ham_Item_PostFrame, g_weapon_entity, "fwItemPostFrame")
- RegisterHam(Ham_TakeDamage, "player", "fwDamagePre")
- RegisterHam(Ham_RemovePlayerItem, "player", "fwRemoveItem")
- RegisterHam(Ham_TraceAttack, "player", "fwTraceAttackPost", 1)
- RegisterHam(Ham_TraceAttack, "worldspawn", "fwTraceAttackPost", 1)
- RegisterHam(Ham_TraceAttack, "func_breakable", "fwTraceAttackPost", 1)
- RegisterHam(Ham_TraceAttack, "func_wall", "fwTraceAttackPost", 1)
- RegisterHam(Ham_TraceAttack, "func_door", "fwTraceAttackPost", 1)
- RegisterHam(Ham_TraceAttack, "func_door_rotating", "fwTraceAttackPost", 1)
- RegisterHam(Ham_TraceAttack, "func_plat", "fwTraceAttackPost", 1)
- RegisterHam(Ham_TraceAttack, "func_rotating", "fwTraceAttackPost", 1)
- register_forward(FM_PlaybackEvent, "fwPlaybackEvent")
- register_forward(FM_UpdateClientData, "fwUpdateClientDataPost", 1)
- register_forward(FM_CmdStart, "fwCmdStart")
- register_forward(FM_SetModel, "fwSetModel")
- new item_name[64]
- get_pcvar_string(pcvar_item_name, item_name, charsmax(item_name))
- }
- public plugin_precache()
- {
- precache_model(ViewModel)
- precache_model(PlayerModel)
- precache_model(WorldModel)
- for(new i; i<=charsmax(Sounds); i++)
- {
- precache_sound(Sounds[i])
- }
- Blood[0] = precache_model("sprites/bloodspray.spr")
- Blood[1] = precache_model("sprites/blood.spr")
- new tmp[128]
- formatex(tmp, charsmax(tmp), "sprites/%s.txt", weapon_list_txt)
- precache_generic(tmp)
- for(new i; i<=charsmax(weapon_list_sprites); i++)
- {
- precache_generic(weapon_list_sprites[i])
- }
- register_forward(FM_PrecacheEvent, "fwPrecachePost", 1)
- }
- public ReadSettings()
- {
- new confdir[64], path[128]
- get_configsdir(confdir, charsmax(confdir))
- formatex(path, charsmax(path), "%s/%s", confdir, CONFIG_CFG_FILE)
- server_cmd("exec %s", path)
- server_exec()
- cvar_time_fire_normal=get_pcvar_float(pcvar_time_fire_normal)/*ز ��鳼 諳*/
- cvar_time_fire_fast=get_pcvar_float(pcvar_time_fire_fast)
- }
- public Redirect(id)
- {
- client_cmd(id, g_weapon_entity)
- }
- public client_disconnected(id)
- {
- g_HasInfinity[id]=false
- }
- public ze_user_infected(id, iInfector)
- {
- g_HasInfinity[id]=false
- }
- public give_infinity(id)
- {
- drop_weapons(id, 2)
- g_HasInfinity[id]=true
- new ent=fm_give_item(id, g_weapon_entity)
- cs_set_user_bpammo(id, CSW_INFINITY, get_pcvar_num(pcvar_bpammo))
- cs_set_weapon_ammo(ent, get_pcvar_num(pcvar_clipammo))
- InfinitySprite(id)
- }
- public fwPrecachePost(type, const name[])
- {
- if (equal(g_weapon_event1, name) || equal(g_weapon_event2, name) )
- {
- g_orig_event_dinfinity=get_orig_retval()
- return FMRES_HANDLED
- }
- return FMRES_IGNORED
- }
- public fwPlaybackEvent(flags, invoker, eventid, Float:delay, Float:origin[3], Float:angles[3], Float:fparam1, Float:fparam2, iParam1, iParam2, bParam1, bParam2)
- {
- if ((eventid != g_orig_event_dinfinity))
- return FMRES_IGNORED
- if (!is_valid_player(invoker))
- return FMRES_IGNORED
- fm_playback_event(flags|FEV_HOSTONLY, invoker, eventid, delay, origin, angles, fparam1, fparam2, iParam1, iParam2, bParam1, bParam2)
- return FMRES_SUPERCEDE
- }
- public fwUpdateClientDataPost(id, SendWeapons, CD_Handle)
- {
- if (!is_valid_player(id))
- return FMRES_IGNORED
- if(get_user_weapon(id)!=CSW_INFINITY)
- return FMRES_IGNORED
- set_cd(CD_Handle, CD_flNextAttack, get_gametime() + 0.001)
- return FMRES_HANDLED
- }
- public fwCmdStart(id, uc_handle, seed)
- {
- if(!is_valid_player(id))
- return
- if(get_user_weapon(id)!=CSW_INFINITY)
- return
- static buttons; buttons=get_uc(uc_handle, UC_Buttons)
- if(!(buttons&IN_ATTACK2))
- {
- g_mode[id]=0
- return
- }
- static ent; ent=get_pdata_cbase(id, 373)
- if((buttons&IN_ATTACK)) /*Fix*/
- {
- set_pdata_float(ent, m_flNextPrimaryAttack, cvar_time_fire_normal, OFFSET_LINUX_WEAPONS)
- g_mode[id]=0
- return
- }
- if(get_pdata_int(ent, m_fInReload, OFFSET_LINUX_WEAPONS)||get_pdata_float(ent, m_flNextPrimaryAttack, OFFSET_LINUX_WEAPONS)>-0.1)
- return
- g_mode[id]=1
- if(cs_get_weapon_ammo(ent)!=0)
- ExecuteHamB(Ham_Weapon_PrimaryAttack, ent)
- }
- public fwSetModel(ent, model[])
- {
- if(!pev_valid(ent))
- return FMRES_IGNORED;
- if(!equal(model, g_weapon_weaponbox_model))
- return FMRES_IGNORED;
- static classname[33]
- pev(ent, pev_classname, classname, charsmax(classname))
- if(!equal(classname, "weaponbox"))
- return FMRES_IGNORED
- static owner; owner=pev(ent, pev_owner)
- static weap;weap=fm_find_ent_by_owner(-1, g_weapon_entity, ent)
- if(g_HasInfinity[owner]&&pev_valid(weap))
- {
- set_pev(weap, pev_weaponkey, weaponkey_value)
- g_HasInfinity[owner]=false
- fm_entity_set_model(ent, WorldModel)
- return FMRES_SUPERCEDE
- }
- return FMRES_IGNORED
- }
- public fwAddToPlayer(ent, id)
- {
- if(pev_valid(ent))
- {
- if(pev(ent, pev_weaponkey)==weaponkey_value)
- {
- g_HasInfinity[id] = true
- set_pev(ent, pev_weaponkey, 0)
- InfinitySprite(id)
- return HAM_HANDLED
- }
- }
- return HAM_IGNORED
- }
- public fwDeployPost(ent)
- {
- new id=fm_get_weapon_owner(ent)
- if (!is_valid_player(id))
- return
- set_pev(id, pev_viewmodel2, ViewModel)
- set_pev(id, pev_weaponmodel2, PlayerModel)
- playanim(id, 15)
- set_pdata_float(ent, m_flNextPrimaryAttack, 0.8, OFFSET_LINUX_WEAPONS)
- g_anim_mode[id]=!g_anim_mode[id]
- }
- public fwPrimaryAttack(ent)
- {
- new id=fm_get_weapon_owner(ent)
- if (!is_valid_player(id))
- return
- pev(id,pev_punchangle,cl_pushangle[id])
- g_player_weapon_ammo[id]=cs_get_weapon_ammo(ent)
- }
- public fwTraceAttackPost(ent, attacker, Float:damage, Float:dir[3], ptr, damage_type)
- {
- if(!is_valid_player(attacker))
- return
- if(get_user_weapon(attacker)!=CSW_INFINITY)
- return
- static Float:fEnd[3]
- get_tr2(ptr, TR_vecEndPos, fEnd)
- make_bullet_decals(attacker, fEnd)
- g_hitgroup[attacker]=get_tr2(ptr, TR_iHitgroup)
- }
- public fwReloadPre(ent)
- {
- new id=fm_get_weapon_owner(ent)
- if(!is_valid_player(id))
- return HAM_IGNORED
- static bpammo; bpammo=cs_get_user_bpammo(id, CSW_INFINITY)
- static clip; clip=cs_get_weapon_ammo(ent)
- if(bpammo>0&&clip<get_pcvar_num(pcvar_clipammo))
- {
- set_pdata_int(ent, 55, 0, OFFSET_LINUX_WEAPONS)
- set_pdata_float(id, m_flNextAttack, 4.4, OFFSET_LINUX)
- set_pdata_float(ent, m_flTimeWeaponIdle, 4.4, OFFSET_LINUX_WEAPONS)
- set_pdata_float(ent, m_flNextPrimaryAttack, 4.4, OFFSET_LINUX_WEAPONS)
- set_pdata_float(ent, 47, 4.4, OFFSET_LINUX_WEAPONS)
- set_pdata_int(ent, m_fInReload, 1, OFFSET_LINUX_WEAPONS)
- playanim(id, 14)
- }
- return HAM_SUPERCEDE
- }
- public fwItemPostFrame(ent)
- {
- new id=fm_get_weapon_owner(ent)
- if(!is_valid_player(id))
- return
- static bpammo; bpammo=cs_get_user_bpammo(id, CSW_INFINITY)
- static clip; clip=cs_get_weapon_ammo(ent)
- if(clip<g_player_weapon_ammo[id])
- {
- g_player_weapon_ammo[id]=clip
- new Float:push[3]
- pev(id,pev_punchangle,push)
- xs_vec_sub(push,cl_pushangle[id],push)
- xs_vec_mul_scalar(push,0.8,push)
- xs_vec_add(push,cl_pushangle[id],push)
- if(g_mode[id]==0)
- {
- if(g_shoot_anim[id]==0)
- {
- playanim(id, 2)
- }
- else
- {
- playanim(id, 12)
- }
- set_pdata_float(ent, m_flNextPrimaryAttack, cvar_time_fire_normal, OFFSET_LINUX_WEAPONS)
- }
- else
- {
- if(g_shoot_anim[id]==0)
- {
- playanim(id, (g_anim_mode[id])?18:16)
- push[0]+=1.0
- push[1]-=1.5
- }
- else
- {
- playanim(id, (g_anim_mode[id])?19:17)
- push[0]+=1.0
- push[1]+=1.5
- }
- set_pdata_float(ent, m_flNextPrimaryAttack,cvar_time_fire_fast, OFFSET_LINUX_WEAPONS)
- }
- g_shoot_anim[id]=!g_shoot_anim[id]
- set_pev(id,pev_punchangle,push)
- emit_sound(id, CHAN_WEAPON, Sounds[0], VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
- }
- if(get_pdata_int(ent, m_fInReload, OFFSET_LINUX_WEAPONS)&&get_pdata_float(id, m_flNextAttack, 5) <= 0.0 )
- {
- set_pdata_int(ent, m_fInReload, 0, OFFSET_LINUX_WEAPONS)
- for(new i = clip; i<get_pcvar_num(pcvar_clipammo); i++)
- {
- if(bpammo==0)
- break
- bpammo--
- clip++
- }
- cs_set_weapon_ammo(ent, clip)
- cs_set_user_bpammo(id, CSW_INFINITY, bpammo)
- }
- }
- public fwDamagePre(id, weapon, attacker, Float:damage)
- {
- if(!is_valid_player(attacker))
- return
- if(get_user_weapon(attacker)!=CSW_INFINITY)
- return
- new Float:Damage
- switch(g_hitgroup[attacker])
- {
- case HIT_HEAD: Damage=get_pcvar_float((g_mode[attacker])?pcvar_fast_damage_head:pcvar_normal_damage_head)
- case HIT_CHEST: Damage=get_pcvar_float((g_mode[attacker])?pcvar_fast_damage_chest:pcvar_normal_damage_chest)
- case HIT_STOMACH: Damage=get_pcvar_float((g_mode[attacker])?pcvar_fast_damage_stomach:pcvar_normal_damage_stomach)
- case HIT_LEFTARM: Damage=get_pcvar_float((g_mode[attacker])?pcvar_fast_damage_arms:pcvar_normal_damage_arms)
- case HIT_RIGHTARM: Damage=get_pcvar_float((g_mode[attacker])?pcvar_fast_damage_arms:pcvar_normal_damage_arms)
- case HIT_LEFTLEG: Damage=get_pcvar_float((g_mode[attacker])?pcvar_fast_damage_legs:pcvar_normal_damage_legs)
- case HIT_RIGHTLEG: Damage=get_pcvar_float((g_mode[attacker])?pcvar_fast_damage_legs:pcvar_normal_damage_legs)
- }
- SetHamParamFloat(4, Damage)
- }
- public fwRemoveItem(id, ent)
- {
- if(!is_valid_player(id))
- return
- new classname[62]
- pev(ent, pev_classname, classname, 61)
- if(!equal(classname, g_weapon_entity))
- return
- DefaultSprite(id)
- }
- public make_bullet_decals(id, Float:Origin[3])
- {
- new target, body
- get_user_aiming(id, target, body, 999999)
- if(is_user_alive(target))
- {
- if(ze_is_user_zombie(id))
- {
- new Float:fStart[3], Float:fEnd[3], Float:fRes[3], Float:fVel[3]
- pev(id, pev_origin, fStart)
- velocity_by_aim(id, 64, fVel)
- fStart[0] = Origin[0]
- fStart[1] = Origin[1]
- fStart[2] = Origin[2]
- fEnd[0] = fStart[0]+fVel[0]
- fEnd[1] = fStart[1]+fVel[1]
- fEnd[2] = fStart[2]+fVel[2]
- new res
- engfunc(EngFunc_TraceLine, fStart, fEnd, 0, target, res)
- get_tr2(res, TR_vecEndPos, fRes)
- message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
- write_byte(TE_BLOODSPRITE)
- write_coord(floatround(fStart[0]))
- write_coord(floatround(fStart[1]))
- write_coord(floatround(fStart[2]))
- write_short(Blood[0])
- write_short(Blood[1])
- write_byte(70)
- write_byte(random_num(1,2))
- message_end()
- }
- }
- else
- {
- new decal = 41
- if(target)
- {
- message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
- write_byte(TE_DECAL)
- write_coord(floatround(Origin[0]))
- write_coord(floatround(Origin[1]))
- write_coord(floatround(Origin[2]))
- write_byte(decal)
- write_short(target)
- message_end()
- }
- else
- {
- message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
- write_byte(TE_WORLDDECAL)
- write_coord(floatround(Origin[0]))
- write_coord(floatround(Origin[1]))
- write_coord(floatround(Origin[2]))
- write_byte(decal)
- message_end()
- }
- message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
- write_byte(TE_GUNSHOTDECAL)
- write_coord(floatround(Origin[0]))
- write_coord(floatround(Origin[1]))
- write_coord(floatround(Origin[2]))
- write_short(id)
- write_byte(decal)
- message_end()
- }
- }
- public InfinitySprite(id)
- {
- message_begin( MSG_ONE, get_user_msgid("WeaponList"), .player=id )
- write_string(weapon_list_txt)
- write_byte(10)
- write_byte(120)
- write_byte(-1)
- write_byte(-1)
- write_byte(1)
- write_byte(1)
- write_byte(CSW_INFINITY)
- write_byte(0)
- message_end()
- }
- public DefaultSprite(id)
- {
- message_begin( MSG_ONE, get_user_msgid("WeaponList"), .player=id )
- write_string(g_weapon_entity)
- write_byte(10)
- write_byte(120)
- write_byte(-1)
- write_byte(-1)
- write_byte(1)
- write_byte(1)
- write_byte(CSW_INFINITY)
- write_byte(0)
- message_end()
- }
- public is_valid_player(id)
- {
- if(!is_user_alive(id))
- return false
- if(!g_HasInfinity[id])
- return false
- return true
- }
- stock drop_weapons(id, dropwhat)
- {
- static weapons[32], num, i, weaponid
- num = 0
- get_user_weapons(id, weapons, num)
- for (i = 0; i < num; i++)
- {
- weaponid = weapons[i]
- if (dropwhat == 2 && ((1<<weaponid) & SECONDARY_WEAPONS_BIT_SUM))
- {
- static wname[32]
- get_weaponname(weaponid, wname, sizeof wname - 1)
- engclient_cmd(id, "drop", wname)
- }
- }
- }
- stock playanim(player,anim)
- {
- set_pev(player, pev_weaponanim, anim)
- message_begin(MSG_ONE, SVC_WEAPONANIM, {0, 0, 0}, player)
- write_byte(anim)
- write_byte(pev(player, pev_body))
- message_end()
- }
- stock fm_get_weapon_owner(weapon)
- {
- return get_pdata_cbase(weapon, 41, 4)
- }
- /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
- *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang16393\\ f0\\ fs16 \n\\ par }
- */
Leap:
- #include <ze_vip>
- #define PLUGIN "[ZE] Extra Item : Leap"
- #define VERSION "1.5.7"
- #define AUTHOR "Fry!"
- #define VIP_ACCESS ADMIN_LEVEL_H
- /*================================================================================
- [Plugin Customization]
- =================================================================================*/
- new bool:g_hasLongJump[33]
- new Float:g_last_LongJump_time[33]
- new g_LongJump_cost, g_LongJump_force, g_LongJump_height, g_LongJump_cooldown , g_iLimit[33] , cvar_limit
- public plugin_natives()
- {
- register_native("ze_give_leap", "native_ze_give_leap", 1)
- }
- public native_ze_give_leap(id)
- {
- if (!is_user_connected(id))
- return -1
- buy_longjump(id)
- return true
- }
- public plugin_init()
- {
- register_plugin(PLUGIN, VERSION, AUTHOR)
- register_cvar("zp_extra_leap",VERSION,FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_UNLOGGED|FCVAR_SPONLY)
- g_LongJump_force = register_cvar("ze_longjump_force", "580")
- g_LongJump_height = register_cvar("ze_longjump_height", "320")
- g_LongJump_cooldown = register_cvar("ze_longjump_cooldown", "10.0")
- g_LongJump_cost = register_cvar("ze_longjump_cost", "20")
- cvar_limit = register_cvar("ze_longjump_limit", "2")
- register_forward(FM_PlayerPreThink, "fw_PlayerPreThink")
- register_event("DeathMsg", "death", "a")
- register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
- }
- // Reset on disconnection
- public client_disconnected(id)
- {
- g_hasLongJump[id] = false
- }
- // Reset on death
- public death()
- {
- g_hasLongJump[read_data(2)] = false
- }
- // Reset if turned into human
- public ze_user_humanized(id)
- {
- g_hasLongJump[id] = false
- }
- // Reset at round start (for everyone)
- public event_round_start()
- {
- for (new i = 1; i <= 32; i++)
- g_hasLongJump[i] = false
- }
- // Buy through command "say /blj"
- public buy_longjump(id)
- {
- if ( g_hasLongJump[id] )
- {
- client_print(id, print_chat, "[ZE] You have already purchased a jumppack.")
- return PLUGIN_HANDLED
- }
- if ( !is_user_alive(id) )
- {
- client_print(id, print_chat, "[ZE] You can't buy jumppack because You are dead.")
- return PLUGIN_HANDLED
- }
- new money = ze_get_escape_coins(id)
- new cost = get_pcvar_num(g_LongJump_cost)
- if ( money < cost )
- {
- client_print(id, print_chat, "[ZE] You don't have enough ammo packs to buy a jumppack. (%i needed).", cost )
- return PLUGIN_HANDLED
- }
- g_hasLongJump[id] = true
- ze_set_escape_coins(id, money)
- client_print(id, print_chat, "[ZE] You have bought a Jump Pack. To use it, press duck and jump while moving forward.")
- return PLUGIN_HANDLED
- }
- public fw_PlayerPreThink(id)
- {
- if (!is_user_alive(id))
- return FMRES_IGNORED
- if (allow_LongJump(id))
- {
- static Float:velocity[3]
- velocity_by_aim(id, get_pcvar_num(g_LongJump_force), velocity)
- velocity[2] = get_pcvar_float(g_LongJump_height)
- set_pev(id, pev_velocity, velocity)
- g_last_LongJump_time[id] = get_gametime()
- }
- return FMRES_IGNORED
- }
- // Check if the player can longjump
- allow_LongJump(id)
- {
- if (!g_hasLongJump[id])
- return false
- if (!(pev(id, pev_flags) & FL_ONGROUND) || fm_get_speed(id) < 80)
- return false
- static buttons
- buttons = pev(id, pev_button)
- if (!is_user_bot(id) && (!(buttons & IN_JUMP) || !(buttons & IN_DUCK)))
- return false
- if (get_gametime() - g_last_LongJump_time[id] < get_pcvar_float(g_LongJump_cooldown))
- return false
- return true
- }
- // Get entity's speed (from fakemeta_util)
- stock fm_get_speed(entity)
- {
- static Float:velocity[3]
- pev(entity, pev_velocity, velocity)
- return floatround(vector_length(velocity))
- }
- /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
- *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1049\\ f0\\ fs16 \n\\ par }
- */
Lycanthrope:
- #include <ze_vip>
- #include <fakemeta_util>
- #include <cstrike>
- #define CSW_WEAPON_BASE CSW_P90
- #define CSW_NEW_WEAPON "weapon_lycanthrope"
- #define CSW_OLD_WEAPON "weapon_p90"
- #define WEAPON_KEY 9299292
- #define OLD_WEAPON "models/w_p90.mdl"
- #define is_user_valid(%1) (is_user_alive(%1) && !is_user_bot(%1) && !is_user_hltv(%1) && is_user_connected(%1))
- new const Weapon_Models[][] = { "models/Premuim_ZE/v_lycanthrope.mdl", "models/Premuim_ZE/p_lycanthrope.mdl", "models/Premuim_ZE/w_lycanthrope.mdl" }
- new const Weapon_Sounds[][] = { "weapons/sg552-shot1.wav", "weapons/sg552-shot2.wav", "weapons/buffsg552_draw.wav", "weapons/buffsg552_idle.wav", "weapons/buffsg552_reload.wav", "weapons/buffsg552_reload_AF.wav" }
- new const Weapon_Sprites[][] = { "sprites/weapon_lycanthrope.txt", "sprites/640hud148.spr" }
- new const GUNSHOT_DECALS[] = { 41, 42, 43, 44, 45 }
- new bool:g_Hasscope[33], g_hasZoom[33]
- new Cvar_scope_Recoil, Cvar_scope_DMG, Cvar_scope_Clip, Cvar_scope_Ammo, Cvar_scope_Speed
- new Float:cl_pushangle[33][3], g_Eventscope, g_scope_TmpClip[33], g_IsInPrimaryAttack, g_Shock
- public plugin_natives()
- {
- register_native("ze_give_lycanthrope_vip", "native_ze_give_lycanthrope_vip", 1)
- }
- public native_ze_give_lycanthrope_vip(id)
- {
- if (!is_user_connected(id))
- return -1
- Givescope(id)
- return true
- }
- public plugin_precache()
- {
- for(new g = 0; g < sizeof(Weapon_Models); g++)
- precache_model(Weapon_Models[g])
- for(new h = 0; h < sizeof(Weapon_Sounds); h++)
- precache_sound(Weapon_Sounds[h])
- for(new t = 0; t < sizeof(Weapon_Sprites); t++)
- precache_generic(Weapon_Sprites[t])
- g_Shock = precache_model("sprites/lycanthrope_hit.spr")
- register_clcmd(CSW_NEW_WEAPON, "hook")
- register_forward(FM_PrecacheEvent, "Fw_Precache_Event", 1)
- }
- public hook(id)
- {
- engclient_cmd(id, CSW_OLD_WEAPON)
- return PLUGIN_HANDLED
- }
- public plugin_init()
- {
- register_plugin("[ZE] Extra Item: Lycanthrope", "1.0", "Jack GamePlay")
- // Events & Messages
- register_message(get_user_msgid("DeathMsg"), "DeathMsg")
- register_event("CurWeapon", "CurrentWeapon", "be", "1=1")
- register_event("HLTV", "New_Round", "a", "1=0", "2=0")
- // Forwards
- register_forward(FM_SetModel, "Fw_Set_Model", 1)
- register_forward(FM_PlaybackEvent, "Fw_Playback_Event")
- register_forward(FM_UpdateClientData, "Fw_Update_Clientdata", 1)
- register_forward(FM_CmdStart, "Fw_CmdStart")
- // Hook Chains
- RegisterHookChain(RG_CBasePlayer_TakeDamage, "Fw_Take_DMG")
- // Hams
- RegisterHam(Ham_Weapon_PrimaryAttack, CSW_OLD_WEAPON, "Fw_PrimaryAttack")
- RegisterHam(Ham_Weapon_PrimaryAttack, CSW_OLD_WEAPON, "Fw_PrimaryAttack_Post", 1)
- RegisterHam(Ham_Item_AddToPlayer, CSW_OLD_WEAPON, "Fw_AddToPlayer")
- RegisterHam(Ham_Weapon_Reload, CSW_OLD_WEAPON, "Fw_Reload")
- RegisterHam(Ham_Weapon_Reload, CSW_OLD_WEAPON, "Fw_Reload_Post", 1)
- RegisterHam(Ham_Spawn, "player", "Fw_Spawn", 1)
- RegisterHam(Ham_TraceAttack, "worldspawn", "Fw_TraceAttack", 1)
- RegisterHam(Ham_TraceAttack, "func_breakable", "Fw_TraceAttack", 1)
- RegisterHam(Ham_TraceAttack, "func_wall", "Fw_TraceAttack", 1)
- RegisterHam(Ham_TraceAttack, "func_door", "Fw_TraceAttack", 1)
- RegisterHam(Ham_TraceAttack, "func_door_rotating", "Fw_TraceAttack", 1)
- RegisterHam(Ham_TraceAttack, "func_plat", "Fw_TraceAttack", 1)
- RegisterHam(Ham_TraceAttack, "func_rotating", "Fw_TraceAttack", 1)
- RegisterHam(Ham_Use, "func_tank", "Fw_UseStationary_Post", 1)
- RegisterHam(Ham_Use, "func_tankmortar", "Fw_UseStationary_Post", 1)
- RegisterHam(Ham_Use, "func_tankrocket", "Fw_UseStationary_Post", 1)
- RegisterHam(Ham_Use, "func_tanklaser", "Fw_UseStationary_Post", 1)
- RegisterHam(Ham_Item_Deploy, CSW_OLD_WEAPON, "Fw_Item_Deploy_Post", 1)
- // Cvars
- Cvar_scope_Recoil = register_cvar("ze_scope_recoil", "1.0")
- Cvar_scope_DMG = register_cvar("ze_scope_damage", "6")
- Cvar_scope_Clip = register_cvar("ze_scope_clip", "30")
- Cvar_scope_Ammo = register_cvar("ze_scope_ammo", "150")
- Cvar_scope_Speed = register_cvar("ze_scope_speed", "4.5")
- }
- public Fw_Item_Deploy_Post(weapon_ent)
- {
- new id = get_pdata_cbase(weapon_ent, 41, 4)
- g_hasZoom[id] = false
- cs_set_user_zoom(id, CS_RESET_ZOOM, 0)
- CurrentWeapon(id)
- }
- public Fw_UseStationary_Post(entity, caller, activator, use_type)
- {
- if (use_type == 0 && is_user_valid(caller))
- {
- CurrentWeapon(caller)
- }
- }
- public Fw_TraceAttack(iEnt, iAttacker, Float:flDamage, Float:fDir[3], ptr, iDamageType)
- {
- if(!is_user_valid(iAttacker))
- return
- static Float:flEnd[3]
- get_tr2(ptr, TR_vecEndPos, flEnd)
- if(get_user_weapon(iAttacker) == CSW_WEAPON_BASE && g_Hasscope[iAttacker])
- {
- if(iEnt)
- {
- message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
- write_byte(TE_DECAL)
- engfunc(EngFunc_WriteCoord, flEnd[0])
- engfunc(EngFunc_WriteCoord, flEnd[1])
- engfunc(EngFunc_WriteCoord, flEnd[2])
- write_byte(GUNSHOT_DECALS[random_num (0, sizeof GUNSHOT_DECALS -1)])
- write_short(iEnt)
- message_end()
- }
- else
- {
- message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
- write_byte(TE_WORLDDECAL)
- engfunc(EngFunc_WriteCoord, flEnd[0])
- engfunc(EngFunc_WriteCoord, flEnd[1])
- engfunc(EngFunc_WriteCoord, flEnd[2])
- write_byte(GUNSHOT_DECALS[random_num (0, sizeof GUNSHOT_DECALS -1)])
- message_end()
- }
- message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
- write_byte(TE_GUNSHOTDECAL)
- engfunc(EngFunc_WriteCoord, flEnd[0])
- engfunc(EngFunc_WriteCoord, flEnd[1])
- engfunc(EngFunc_WriteCoord, flEnd[2])
- write_short(iAttacker)
- write_byte(GUNSHOT_DECALS[random_num (0, sizeof GUNSHOT_DECALS -1)])
- message_end()
- engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, flEnd, 0)
- write_byte(TE_SPRITE)
- engfunc(EngFunc_WriteCoord, flEnd[0])
- engfunc(EngFunc_WriteCoord, flEnd[1])
- engfunc(EngFunc_WriteCoord, flEnd[2])
- write_short(g_Shock)
- write_byte(5)
- write_byte(150)
- message_end()
- }
- }
- public Fw_Spawn(id)
- {
- if(!is_user_valid(id))
- return
- Remove_scope(id)
- }
- public New_Round()
- {
- for(new i = 0; i < get_member_game(m_nMaxPlayers); i++)
- {
- if(!is_user_valid(i) || !g_Hasscope[i])
- continue
- Remove_scope(i)
- }
- }
- public Fw_Reload_Post(weapon_entity)
- {
- new id = pev(weapon_entity, pev_owner)
- if (!is_user_valid(id) || ze_is_user_zombie(id) || g_scope_TmpClip[id] == -1)
- return HAM_IGNORED
- if(g_Hasscope[id])
- {
- g_hasZoom[id] = false
- cs_set_user_zoom(id, CS_RESET_ZOOM, 0)
- set_pdata_int(weapon_entity, 51, g_scope_TmpClip[id], 4)
- set_pdata_float(weapon_entity, 48, 3.0, 4)
- set_pdata_float(id, 83, 3.0, 5)
- set_pdata_int(weapon_entity, 54, 1, 4)
- UTIL_weapon_anim(id, weapon_entity, 1)
- }
- return HAM_IGNORED
- }
- public Fw_Reload(weapon_entity)
- {
- new id = pev(weapon_entity, pev_owner)
- if (!is_user_valid(id) || ze_is_user_zombie(id))
- return HAM_IGNORED
- static iClipExtra
- if(g_Hasscope[id])
- {
- iClipExtra = get_pcvar_num(Cvar_scope_Clip)
- }
- g_scope_TmpClip[id] = -1
- new iBpAmmo = cs_get_user_bpammo(id, CSW_WEAPON_BASE)
- new iClip = get_pdata_int(weapon_entity, 51, 4)
- if (iBpAmmo <= 0 || iClip >= iClipExtra)
- return HAM_SUPERCEDE
- g_scope_TmpClip[id] = iClip
- return HAM_IGNORED
- }
- public Fw_AddToPlayer(ent, id)
- {
- if(!is_valid_ent(ent) || !is_user_valid(id) || ze_is_user_zombie(id))
- return HAM_IGNORED
- if(entity_get_int(ent, EV_INT_impulse) == WEAPON_KEY)
- {
- g_Hasscope[id] = true
- g_hasZoom[id] = false
- cs_set_user_zoom(id, CS_RESET_ZOOM, 0)
- entity_set_int(ent, EV_INT_impulse, 0)
- message_begin(MSG_ONE, get_user_msgid("WeaponList"), {0, 0, 0}, id)
- write_string(CSW_NEW_WEAPON)
- write_byte(7)
- write_byte(100)
- write_byte(-1)
- write_byte(-1)
- write_byte(0)
- write_byte(8)
- write_byte(CSW_WEAPON_BASE)
- write_byte(0)
- message_end()
- return HAM_HANDLED
- }
- else
- {
- message_begin(MSG_ONE, get_user_msgid("WeaponList"), {0, 0, 0}, id)
- write_string(CSW_OLD_WEAPON)
- write_byte(7)
- write_byte(100)
- write_byte(-1)
- write_byte(-1)
- write_byte(0)
- write_byte(8)
- write_byte(CSW_WEAPON_BASE)
- write_byte(0)
- message_end()
- }
- return HAM_IGNORED
- }
- public Fw_Precache_Event(type, const name[])
- {
- if(equal("events/p90.sc", name))
- {
- g_Eventscope = get_orig_retval()
- }
- }
- public Fw_Update_Clientdata(id, sendweapons, cd_handle)
- {
- if(!is_user_valid(id))
- return
- if(get_user_weapon(id) == CSW_WEAPON_BASE && g_Hasscope[id])
- {
- set_cd(cd_handle, CD_flNextAttack, halflife_time() + 0.001)
- }
- }
- public Fw_Playback_Event(flags, invoker, eventid, Float:delay, Float:origin[3], Float:angles[3], Float:fparam1, Float:fparam2, iParam1, iParam2, bParam1, bParam2)
- {
- if(!is_user_valid(invoker) || !g_IsInPrimaryAttack)
- return
- if(eventid == g_Eventscope && get_user_weapon(invoker) == CSW_WEAPON_BASE && g_Hasscope[invoker])
- {
- engfunc(EngFunc_PlaybackEvent, flags | FEV_HOSTONLY, invoker, eventid, delay, origin, angles, fparam1, fparam2, iParam1, iParam2, bParam1, bParam2)
- UTIL_weapon_anim(invoker, eventid, random_num(3, 5))
- emit_sound(invoker, CHAN_WEAPON, Weapon_Sounds[random_num(0, 1)], VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
- }
- }
- public ze_user_humanized(id)
- {
- if(!is_user_valid(id))
- return
- Remove_scope(id)
- }
- public ze_user_infected(id, infector)
- {
- if(!is_user_valid(id))
- return
- Remove_scope(id)
- }
- public Fw_PrimaryAttack(Weapon)
- {
- g_IsInPrimaryAttack = 0
- new szClip, szAmmo, id
- id = get_pdata_cbase(Weapon, 41, 4)
- get_user_weapon(id, szClip, szAmmo)
- if(!is_user_valid(id) || ze_is_user_zombie(id))
- return
- g_IsInPrimaryAttack = 1
- if(g_Hasscope[id])
- {
- if (!cs_get_weapon_ammo(Weapon))
- return
- new Float:push[3]
- pev(id, pev_punchangle, push)
- xs_vec_sub(push, cl_pushangle[id], push)
- xs_vec_mul_scalar(push, get_pcvar_float(Cvar_scope_Recoil), push)
- xs_vec_add(push, cl_pushangle[id], push)
- set_pev(id, pev_punchangle, push)
- UTIL_weapon_anim(id, Weapon, random_num(3, 5))
- emit_sound(id, CHAN_WEAPON, Weapon_Sounds[random_num(0, 1)], VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
- }
- }
- public Fw_CmdStart(id, handle)
- {
- if(!is_user_valid(id) || ze_is_user_zombie(id))
- return
- if((get_uc(handle, UC_Buttons) & IN_ATTACK2) && !(pev(id, pev_oldbuttons) & IN_ATTACK2))
- {
- if(get_user_weapon(id) == CSW_WEAPON_BASE && g_Hasscope[id] && !g_hasZoom[id])
- {
- g_hasZoom[id] = true
- cs_set_user_zoom(id, CS_SET_FIRST_ZOOM, 0)
- }
- else if(get_user_weapon(id) == CSW_WEAPON_BASE && g_Hasscope[id] && g_hasZoom[id])
- {
- g_hasZoom[id] = false
- cs_set_user_zoom(id, CS_RESET_ZOOM, 0)
- }
- }
- }
- public Fw_Take_DMG(Victim, Inflictor, Attacker, Float:Damage, DamageType)
- {
- if(!is_user_valid(Victim) || !is_user_valid(Attacker) ||ze_is_user_zombie(Attacker))
- return
- if(get_user_weapon(Attacker) == CSW_WEAPON_BASE && g_Hasscope[Attacker])
- {
- SetHamParamFloat(4, Damage * get_pcvar_float(Cvar_scope_DMG))
- }
- }
- public Fw_PrimaryAttack_Post(Weapon)
- {
- g_IsInPrimaryAttack = 0
- new szClip, szAmmo, id
- id = get_pdata_cbase(Weapon, 41, 4)
- get_user_weapon(id, szClip, szAmmo)
- if(!is_user_valid(id) || ze_is_user_zombie(id))
- return
- if(g_Hasscope[id])
- {
- if (!cs_get_weapon_ammo(Weapon))
- return
- new Float:push[3]
- pev(id, pev_punchangle, push)
- xs_vec_sub(push, cl_pushangle[id], push)
- xs_vec_mul_scalar(push, get_pcvar_float(Cvar_scope_Recoil), push)
- xs_vec_add(push, cl_pushangle[id], push)
- set_pev(id, pev_punchangle, push)
- UTIL_weapon_anim(id, Weapon, random_num(3, 5))
- emit_sound(id, CHAN_WEAPON, Weapon_Sounds[random_num(0, 1)], VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
- }
- }
- public Fw_Set_Model(entity, model[])
- {
- if(!pev_valid(entity) || !equal(model, OLD_WEAPON))
- return FMRES_IGNORED
- static szClassName[33], id
- id = pev(entity, pev_owner)
- pev(entity, pev_classname, szClassName, charsmax(szClassName))
- if(!equal(szClassName, "weaponbox"))
- return FMRES_IGNORED
- if(g_Hasscope[id] && pev_valid(fm_find_ent_by_owner(-1, CSW_OLD_WEAPON, entity)))
- {
- g_Hasscope[id] = false
- g_hasZoom[id] = false
- cs_set_user_zoom(id, CS_RESET_ZOOM, 0)
- set_pev(fm_find_ent_by_owner(-1, CSW_OLD_WEAPON, entity), pev_impulse, WEAPON_KEY)
- engfunc(EngFunc_SetModel, entity, Weapon_Models[2])
- return FMRES_SUPERCEDE
- }
- return FMRES_IGNORED
- }
- public CurrentWeapon(id)
- {
- if(!is_user_valid(id))
- return
- if(get_user_weapon(id) == CSW_WEAPON_BASE && g_Hasscope[id])
- {
- if(g_hasZoom[id])
- {
- cs_set_player_view_model(id, CSW_WEAPON_BASE, "")
- }
- else if(!g_hasZoom[id])
- {
- cs_set_player_view_model(id, CSW_WEAPON_BASE, Weapon_Models[0])
- }
- cs_set_player_weap_model(id, CSW_WEAPON_BASE, Weapon_Models[1])
- message_begin(MSG_ONE, get_user_msgid("WeaponList"), {0, 0, 0}, id)
- write_string(CSW_NEW_WEAPON)
- write_byte(7)
- write_byte(100)
- write_byte(-1)
- write_byte(-1)
- write_byte(0)
- write_byte(8)
- write_byte(CSW_WEAPON_BASE)
- write_byte(0)
- message_end()
- static Float:iSpeed; iSpeed = get_pcvar_float(Cvar_scope_Speed)
- static Ent; Ent = find_ent_by_owner(-1, CSW_OLD_WEAPON, id)
- if(Ent)
- {
- static Float:Delay; Delay = get_pdata_float( Ent, 46, 4) * iSpeed
- if (Delay > 0.0)
- {
- set_pdata_float(Ent, 46, Delay, 4)
- }
- }
- }
- }
- public DeathMsg(msg_id, msg_dest, id)
- {
- static szTruncatedWeapon[33], iAttacker, iVictim
- get_msg_arg_string(4, szTruncatedWeapon, charsmax(szTruncatedWeapon))
- iAttacker = get_msg_arg_int(1)
- iVictim = get_msg_arg_int(2)
- if(!is_user_valid(iAttacker) || iAttacker == iVictim) return
- if(equal(szTruncatedWeapon, "p90") && get_user_weapon(iAttacker) == CSW_WEAPON_BASE && g_Hasscope[iAttacker])
- {
- set_msg_arg_string(4, "lycanthrope")
- }
- }
- public Givescope(id)
- {
- drop_weapons(id, 1)
- new wep = rg_give_item(id, CSW_OLD_WEAPON)
- if (wep > 0)
- {
- cs_set_weapon_ammo(wep, get_pcvar_num(Cvar_scope_Clip))
- cs_set_user_bpammo(id, CSW_WEAPON_BASE, get_pcvar_num(Cvar_scope_Ammo))
- message_begin(MSG_ONE, get_user_msgid("WeaponList"), {0, 0, 0}, id)
- write_string(CSW_NEW_WEAPON)
- write_byte(7)
- write_byte(100)
- write_byte(-1)
- write_byte(-1)
- write_byte(0)
- write_byte(8)
- write_byte(CSW_WEAPON_BASE)
- write_byte(0)
- message_end()
- }
- g_Hasscope[id] = true
- g_hasZoom[id] = false
- cs_set_user_zoom(id, CS_RESET_ZOOM, 0)
- UTIL_weapon_anim(id, CSW_WEAPON_BASE, 2)
- ze_colored_print(id, "!tYou bought Lycanthrope!y.")
- }
- public Remove_scope(id)
- {
- if(!is_user_valid(id))
- return
- g_Hasscope[id] = false
- g_hasZoom[id] = false
- cs_set_user_zoom(id, CS_SET_NO_ZOOM, 0)
- message_begin(MSG_ONE, get_user_msgid("WeaponList"), {0, 0, 0}, id)
- write_string(CSW_OLD_WEAPON)
- write_byte(7)
- write_byte(100)
- write_byte(-1)
- write_byte(-1)
- write_byte(0)
- write_byte(8)
- write_byte(CSW_WEAPON_BASE)
- write_byte(0)
- message_end()
- cs_reset_player_view_model(id, CSW_WEAPON_BASE)
- cs_reset_player_weap_model(id, CSW_WEAPON_BASE)
- }
- UTIL_weapon_anim(index, entity, sequence = 0)
- {
- set_pev(index, pev_weaponanim, sequence)
- message_begin(MSG_ONE_UNRELIABLE, SVC_WEAPONANIM, {0, 0, 0}, index)
- write_byte(sequence)
- write_byte(pev(entity, pev_body))
- message_end()
- }
- stock drop_weapons(id, dropwhat)
- {
- static weapons[32], num, i, weaponid
- num = 0
- get_user_weapons(id, weapons, num)
- const PRIMARY_WEAPONS_BIT_SUM = (1<<CSW_SCOUT)|(1<<CSW_XM1014)|(1<<CSW_MAC10)|(1<<CSW_MAC10)|(1<<CSW_UMP45)|(1<<CSW_SG550)|(1<<CSW_MAC10)|(1<<CSW_FAMAS)|(1<<CSW_AWP)|(1<<CSW_MP5NAVY)|(1<<CSW_M249)|(1<<CSW_M3)|(1<<CSW_M4A1)|(1<<CSW_TMP)|(1<<CSW_G3SG1)|(1<<CSW_SG552)|(1<<CSW_AK47)|(1<<CSW_P90)
- for (i = 0; i < num; i++)
- {
- weaponid = weapons[i]
- if (dropwhat == 1 && ((1<<weaponid) & PRIMARY_WEAPONS_BIT_SUM))
- {
- static wname[32]
- get_weaponname(weaponid, wname, charsmax(wname))
- engclient_cmd(id, "drop", wname)
- }
- }
- }
- /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
- *{\\ rtf1\\ ansi\\ ansicpg1252\\ deff0\\ deflang1036{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
- */
Glow menu:
- /* FireWalker877's Glow Menu
- * This is a simple [AMXX] public glow plugin.
- * beb0 says "glow", beb0 gets a menu!
- * Colors are those of the rainbow and white (in that order)
- * Send any requests or comments to cstrikememphis@yahoo.com
- *
- * Commands:
- * say "glow"
- * amx_gmtoggle - Admin level H access Toggles Glow Menu On and Off
- *
- * Cvars
- * gm_toggle 1/0 - < if 1, Glow Menu is disabled. if 0 or undefined,
- * all clients have access to the Glow Menu. Define in server.cfg or
- * set in console by typing "amx_gmtoggle"
- */
- #include <zombie_escape>
- #include <fun>
- public plugin_natives()
- {
- register_native("ze_open_glow_menu", "native_ze_open_glow_menu", 1)
- }
- public native_ze_open_glow_menu(id)
- {
- if (!is_user_connected(id))
- return -1
- GlowMenuMenu(id)
- return true
- }
- public plugin_init()
- {
- register_plugin("Glow Menu","v1.3","Spi")
- register_menucmd(register_menuid("Glow Menu"),1023,"GlowMenuChoice")
- //register_concmd("say !glow", "checkityo", 0, "- say glow and select an option")
- register_concmd("amx_gmtoggle", "toggle", ADMIN_LEVEL_H, "- Toggle access to Glow Menu On and Off")
- register_cvar("gm_toggle","0",FCVAR_SERVER)
- set_cvar_string("gm_toggle","0")
- }
- public toggle(id)
- {
- if(get_cvar_num("gm_toggle")==1)
- {
- set_cvar_string("gm_toggle","0")
- client_print(0,print_chat,"Glow Menu has been enabled by the owner!")
- server_print("Glow menu has been enabled!")
- }
- else
- {
- set_cvar_string("gm_toggle","1")
- client_print(0,print_chat,"Glow Menu has been disabled by the owner!")
- server_print("Glow menu has been disabled!")
- set_user_rendering(0,kRenderFxGlowShell,0,0,0,kRenderNormal,25)
- }
- return PLUGIN_HANDLED
- }
- /*public checkityo(id)
- {
- if(get_cvar_num("gm_toggle")==1)
- {
- client_print(id,print_chat,"Glow Menu is currently disabled!")
- }
- else
- {
- GlowMenuMenu(id)
- }
- return PLUGIN_HANDLED
- }*/
- public amx_glowmenu(id)
- {
- GlowMenuMenu(id)
- return PLUGIN_HANDLED
- }
- public GlowMenuMenu(id)
- {
- if (!(get_user_flags(id) & ADMIN_LEVEL_H))
- return
- if (is_user_alive(id) && !ze_is_user_zombie(id))
- {
- new menuBody[1024]
- new key
- format(menuBody, 1023, "Glow Menu^n^n 1. Red^n 2. Orange^n 3. Yellow^n 4. Green^n 5. Light Blue^n 6. Blue^n 7. Purple^n 8. White^n^n 9. Deactivate Glow^n^n 0. Exit.")
- key = (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<7)|(1<<8)|(1<<9)
- show_menu(id, key, menuBody)
- }
- }
- public GlowMenuChoice(id, key)
- {
- new Client[21]
- get_user_name(id,Client,20)
- switch(key)
- {
- case 0:
- {
- set_hudmessage(255,0,0, 0.02, 0.73, 0, 6.0, 8.0, 0.1, 0.2, 4)
- show_hudmessage(0, "%s is now glowing Red!",Client)
- set_user_rendering(id,kRenderFxGlowShell,255,0,0,kRenderNormal,25)
- }
- case 1:
- {
- set_hudmessage(255,140,0, 0.02, 0.73, 0, 6.0, 8.0, 0.1, 0.2, 4)
- show_hudmessage(0, "%s is now glowing Orange!",Client)
- set_user_rendering(id,kRenderFxGlowShell,255,140,0,kRenderNormal,25)
- }
- case 2:
- {
- set_hudmessage(255,255,0, 0.02, 0.73, 0, 6.0, 8.0, 0.1, 0.2, 4)
- show_hudmessage(0, "%s is now glowing Yellow!",Client)
- set_user_rendering(id,kRenderFxGlowShell,255,255,0,kRenderNormal,25)
- }
- case 3:
- {
- set_hudmessage(0,255,0, 0.02, 0.73, 0, 6.0, 8.0, 0.1, 0.2, 4)
- show_hudmessage(0, "%s is now glowing Green!",Client)
- set_user_rendering(id,kRenderFxGlowShell,0,255,0,kRenderNormal,25)
- }
- case 4:
- {
- set_hudmessage(0,255,255, 0.02, 0.73, 0, 6.0, 8.0, 0.1, 0.2, 4)
- show_hudmessage(0, "%s is now glowing Light Blue!",Client)
- set_user_rendering(id,kRenderFxGlowShell,0,255,255,kRenderNormal,25)
- }
- case 5:
- {
- set_hudmessage(0,0,255, 0.02, 0.73, 0, 6.0, 8.0, 0.1, 0.2, 4)
- show_hudmessage(0, "%s is now glowing Blue!",Client)
- set_user_rendering(id,kRenderFxGlowShell,0,0,255,kRenderNormal,25)
- }
- case 6:
- {
- set_hudmessage(255,0,255, 0.02, 0.73, 0, 6.0, 8.0, 0.1, 0.2, 4)
- show_hudmessage(0, "%s is now glowing Purple!",Client)
- set_user_rendering(id,kRenderFxGlowShell,255,0,255,kRenderNormal,25)
- }
- case 7:
- {
- set_hudmessage(192,192,192, 0.02, 0.73, 0, 6.0, 8.0, 0.1, 0.2, 4)
- show_hudmessage(0, "%s is now glowing White!",Client)
- set_user_rendering(id,kRenderFxGlowShell,192,192,192,kRenderNormal,25)
- }
- case 8:
- {
- set_hudmessage(0,255,0, 0.02, 0.73, 0, 6.0, 8.0, 0.1, 0.2, 4)
- show_hudmessage(0, "%s is no longer glowing!",Client)
- set_user_rendering(id,kRenderFxGlowShell,0,0,0,kRenderNormal,25)
- }
- case 9:
- {
- return PLUGIN_CONTINUE
- }
- }
- return PLUGIN_HANDLED
- }
- /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
- *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1036\\ f0\\ fs16 \n\\ par }
- */
No recoil:
- #include <zombie_escape>
- #include <ze_vip>
- #include <xs>
- #define VIP_ACCESS ADMIN_LEVEL_H
- new g_norecoil[33]
- new Float: cl_pushangle[33][3]
- new g_maxplayers
- const WEAPONS_BITSUM = (1<<CSW_KNIFE|1<<CSW_HEGRENADE|1<<CSW_FLASHBANG|1<<CSW_SMOKEGRENADE|1<<CSW_C4)
- public plugin_natives()
- {
- register_native("ze_give_norecoil", "native_ze_give_norecoil", 1)
- }
- public native_ze_give_norecoil(id)
- {
- if (!is_user_connected(id))
- return -1
- Get_NoRecoil(id)
- return true
- }
- public plugin_init()
- {
- register_plugin("[ZE] Extra Item: No Recoil", "1.0", "Spi")
- 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")
- g_maxplayers = get_maxplayers()
- }
- public Get_NoRecoil(id)
- {
- g_norecoil[id] = true
- }
- public ze_user_humanized(id)
- {
- g_norecoil[id] = false
- }
- public ze_user_infected(iVictim)
- {
- g_norecoil[iVictim] = false
- }
- public client_connect(id)
- {
- g_norecoil[id] = false
- }
- public event_round_start()
- {
- for (new id = 1; id <= g_maxplayers; id++)
- g_norecoil[id] = false
- }
- public fw_Weapon_PrimaryAttack_Pre(entity)
- {
- new id = pev(entity, pev_owner)
- if (g_norecoil[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 (g_norecoil[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;
- }
- /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
- *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1036\\ f0\\ fs16 \n\\ par }
- */
This all untested.
- Spir0x
- Veteran Member
- Posts: 633
- Joined: 2 Years Ago
- Location: Tunisia
- Has thanked: 14 times
- Been thanked: 7 times
- Age: 19
- Contact:
OK BRO, first i already told you the antidote and no recoil are only for [Human Owner] you just modified their flags to ADMIN_LEVEL_H that means it's for vips. i want them only for owner with flag "l" (ADMIN_RCON) can you add #define VIP_ACCESS ADMIN_RCON to ze_vip_menu so only owner can buy them.
Second there's a problem on:
Dual infinity:

Leap:

Lycanthrope:

Second there's a problem on:
Dual infinity:

Leap:

Lycanthrope:

I trynna make money, not friends.
- sPe3doN
- Senior Member
- Posts: 216
- Joined: 2 Years Ago
- Has thanked: 14 times
- Been thanked: 7 times
- Age: 20
- Contact:
If you want to change your plugins flag to owner flag just change thisSpir0x wrote: ↑5 Months AgoOK BRO, first i already told you the antidote and no recoil are only for [Human Owner] you just modified their flags to ADMIN_LEVEL_H that means it's for vips. i want them only for owner with flag "l" (ADMIN_RCON) can you add #define VIP_ACCESS ADMIN_RCON to ze_vip_menu so only owner can buy them.
Second there's a problem on:
Dual infinity:
Leap:
Lycanthrope:
![]()
Code: Select all
#define VIP_ACCESS ADMIN_LEVEL_H
Code: Select all
#define VIP_ACCESS ADMIN_RECON
[ Post made via Android ]

- These users thanked the author sPe3doN for the post:
- Mohamed Alaa (5 Months Ago)
Who is online
Users browsing this forum: No registered users and 4 guests