[ReQ] Instead of VIP Features.
[ReQ] Instead of VIP Features.
Yo all, i already requested this plugin 4 - 5 months ago as it's useful sometimes.
Give m249 automatically for VIPs when round starts with p_ and v_ models and w_ if possible, then i've the models.
Give x1 fire nade, x1 frost nade, as normal player have 1 from fire and one from frost, So VIPs will get x2 of each nades
I hope my plugin request mark solved as soon becuz it's useful for me.
Peace
Give m249 automatically for VIPs when round starts with p_ and v_ models and w_ if possible, then i've the models.
Give x1 fire nade, x1 frost nade, as normal player have 1 from fire and one from frost, So VIPs will get x2 of each nades
I hope my plugin request mark solved as soon becuz it's useful for me.
Peace
And at this time when you request it i already made it for you. Search back and get it.
He who fails to plan is planning to fail
Where ? lol i've already explained more i said with models u made just weapons not models please i need it.
So ok, Where the old one so i edit it you?
He who fails to plan is planning to fail
Bro you should see the code first fixed or not.
you must remove ze_is_user_zombie(id)) & if (!is_user_alive(id) i know.
but wait now vips will get 3 nades must remove one of each nades from this code !
take:
you must remove ze_is_user_zombie(id)) & if (!is_user_alive(id) i know.
but wait now vips will get 3 nades must remove one of each nades from this code !
take:
Code: Select all
#include <ze_vip>
public plugin_init()
{
register_plugin("VIP Features", "1.0", "Raheem")
}
public ze_user_humanized(id)
{
// Not Admin? Exit the function...
if (!is_user_alive(id) || !(ze_get_vip_flags(id) & VIP_A) || ze_is_user_zombie(id))
return
// Give M249
rg_give_item(id, "weapon_m249", GT_APPEND)
rg_set_user_bpammo(id, WeaponIdType:get_weaponid("weapon_m249"), 200)
// Give x2 Fire Nades
rg_give_item(id, "weapon_hegrenade", GT_APPEND)
rg_set_user_bpammo(id, WeaponIdType:get_weaponid("weapon_hegrenade"), rg_get_user_bpammo(id, WeaponIdType:get_weaponid("weapon_hegrenade")) + 1)
// Give x2 Frost Nades
rg_give_item(id, "weapon_flashbang", GT_APPEND)
rg_set_user_bpammo(id, WeaponIdType:get_weaponid("weapon_flashbang"), rg_get_user_bpammo(id, WeaponIdType:get_weaponid("weapon_flashbang")) + 1)
}
Last edited by Spir0x 6 years ago, edited 1 time in total.
reply updated
i added
you must remove ze_is_user_zombie(id)) & if (!is_user_alive(id) i know.
but wait now vips will get 3 nades must remove one of each nades from this code !
i added
you must remove ze_is_user_zombie(id)) & if (!is_user_alive(id) i know.
but wait now vips will get 3 nades must remove one of each nades from this code !
Try and let me know how it's going:
Code: Select all
#include <ze_vip> // Models new g_v_szMinigunModel[64] = "models/v_m249_vip.mdl" new g_p_szMinigunModel[64] = "models/p_m249_vip.mdl" new g_w_szMinigunModel[64] = "models/w_m249_vip.mdl" // Cvars new g_pCvarDamage // Variables new bool:g_bHaveMiniGun[33] public plugin_init() { register_plugin("VIP Features", "1.1", "Raheem") // Cvars g_pCvarDamage = register_cvar("ze_minigun_damage", "1.5") // HookChains RegisterHookChain(RG_CBasePlayer_TakeDamage, "Fw_TakeDamage_Post", 1) // Hams RegisterHam(Ham_Item_Deploy, "weapon_m249", "Fw_ItemDeploy_Post", 1) // Forwards register_forward(FM_SetModel, "Fw_SetModel_Post", 1) } public plugin_precache() { // Models precache_model(g_v_szMinigunModel) precache_model(g_p_szMinigunModel) precache_model(g_w_szMinigunModel) } public client_disconnected(id) { if (g_bHaveMiniGun[id]) { g_bHaveMiniGun[id] = false } } public ze_user_infected(infected) { if (g_bHaveMiniGun[infected]) { g_bHaveMiniGun[infected] = false } } public ze_user_humanized(id) { // Not VIP? Exit the function... if (!(ze_get_vip_flags(id) & VIP_A)) return // Give M249 g_bHaveMiniGun[id] = true rg_give_item(id, "weapon_m249", GT_APPEND) rg_set_user_bpammo(id, WeaponIdType:get_weaponid("weapon_m249"), 200) // Give x2 Fire Nades rg_give_item(id, "weapon_hegrenade", GT_APPEND) rg_set_user_bpammo(id, WeaponIdType:get_weaponid("weapon_hegrenade"), rg_get_user_bpammo(id, WeaponIdType:get_weaponid("weapon_hegrenade")) + 1) // Give x2 Frost Nades rg_give_item(id, "weapon_flashbang", GT_APPEND) rg_set_user_bpammo(id, WeaponIdType:get_weaponid("weapon_flashbang"), rg_get_user_bpammo(id, WeaponIdType:get_weaponid("weapon_flashbang")) + 1) } public Fw_TakeDamage_Post(iVictim, iInflictor, iAttacker, Float:fDamage, bitsDamageType) { if (!is_user_alive(iVictim) || !is_user_alive(iAttacker)) return HC_CONTINUE if (g_bHaveMiniGun[iAttacker] && (get_user_weapon(iAttacker) == CSW_M249)) { SetHookChainArg(4 , ATYPE_FLOAT, fDamage * get_pcvar_float(g_pCvarDamage)) return HC_CONTINUE } return HC_CONTINUE } public Fw_ItemDeploy_Post(iEnt) { new id = get_member(iEnt, m_pPlayer) if (g_bHaveMiniGun[id]) { set_pev(id, pev_viewmodel2, g_v_szMinigunModel) set_pev(id, pev_weaponmodel2, g_p_szMinigunModel) } } public Fw_SetModel_Post(iEnt, szModel[]) { if(!pev_valid(iEnt)) return FMRES_IGNORED if(!equali(szModel, "models/w_m249.mdl")) return FMRES_IGNORED new iOwner = get_member(iEnt, m_pPlayer) // If Player Has G3SG1 if(g_bHaveMiniGun[iOwner] && pev_valid(iEnt)) { // Set weaponbox new model engfunc(EngFunc_SetModel, iEnt, g_w_szMinigunModel) return FMRES_SUPERCEDE } return FMRES_IGNORED }
He who fails to plan is planning to fail
Ok bro, Still 2 little problems
first this give x2 nades i said 1 nade from zombie_escape.cfg and one from this plugin.
second is when i respawn i'm urgent to take another weapons & pistol when i take weapon this m249 appears !
first this give x2 nades i said 1 nade from zombie_escape.cfg and one from this plugin.
second is when i respawn i'm urgent to take another weapons & pistol when i take weapon this m249 appears !
[mention]Raheem[/mention] Please just fix this weapon appear when i chose another vip must have normal weapon and this m249.
and simply edit give just 1 fire nade 1 frost nade ! i need it bro
and simply edit give just 1 fire nade 1 frost nade ! i need it bro
What this means? "this weapon appear when i chose another vip"
For giving 1 fire, frost:
For giving 1 fire, frost:
Code: Select all
#include <ze_vip> // Models new g_v_szMinigunModel[64] = "models/v_m249_vip.mdl" new g_p_szMinigunModel[64] = "models/p_m249_vip.mdl" new g_w_szMinigunModel[64] = "models/w_m249_vip.mdl" // Cvars new g_pCvarDamage // Variables new bool:g_bHaveMiniGun[33] public plugin_init() { register_plugin("VIP Features", "1.1", "Raheem") // Cvars g_pCvarDamage = register_cvar("ze_minigun_damage", "1.5") // HookChains RegisterHookChain(RG_CBasePlayer_TakeDamage, "Fw_TakeDamage_Post", 1) // Hams RegisterHam(Ham_Item_Deploy, "weapon_m249", "Fw_ItemDeploy_Post", 1) // Forwards register_forward(FM_SetModel, "Fw_SetModel_Post", 1) } public plugin_precache() { // Models precache_model(g_v_szMinigunModel) precache_model(g_p_szMinigunModel) precache_model(g_w_szMinigunModel) } public client_disconnected(id) { if (g_bHaveMiniGun[id]) { g_bHaveMiniGun[id] = false } } public ze_user_infected(infected) { if (g_bHaveMiniGun[infected]) { g_bHaveMiniGun[infected] = false } } public ze_user_humanized(id) { // Not VIP? Exit the function... if (!(ze_get_vip_flags(id) & VIP_A)) return // Give M249 g_bHaveMiniGun[id] = true rg_give_item(id, "weapon_m249", GT_APPEND) rg_set_user_bpammo(id, WeaponIdType:get_weaponid("weapon_m249"), 200) // Give x1 Fire Nades rg_give_item(id, "weapon_hegrenade", GT_APPEND) //rg_set_user_bpammo(id, WeaponIdType:get_weaponid("weapon_hegrenade"), rg_get_user_bpammo(id, WeaponIdType:get_weaponid("weapon_hegrenade")) + 1) // Give x1 Frost Nades rg_give_item(id, "weapon_flashbang", GT_APPEND) //rg_set_user_bpammo(id, WeaponIdType:get_weaponid("weapon_flashbang"), rg_get_user_bpammo(id, WeaponIdType:get_weaponid("weapon_flashbang")) + 1) } public Fw_TakeDamage_Post(iVictim, iInflictor, iAttacker, Float:fDamage, bitsDamageType) { if (!is_user_alive(iVictim) || !is_user_alive(iAttacker)) return HC_CONTINUE if (g_bHaveMiniGun[iAttacker] && (get_user_weapon(iAttacker) == CSW_M249)) { SetHookChainArg(4 , ATYPE_FLOAT, fDamage * get_pcvar_float(g_pCvarDamage)) return HC_CONTINUE } return HC_CONTINUE } public Fw_ItemDeploy_Post(iEnt) { new id = get_member(iEnt, m_pPlayer) if (g_bHaveMiniGun[id]) { set_pev(id, pev_viewmodel2, g_v_szMinigunModel) set_pev(id, pev_weaponmodel2, g_p_szMinigunModel) } } public Fw_SetModel_Post(iEnt, szModel[]) { if(!pev_valid(iEnt)) return FMRES_IGNORED if(!equali(szModel, "models/w_m249.mdl")) return FMRES_IGNORED new iOwner = get_member(iEnt, m_pPlayer) // If Player Has G3SG1 if(g_bHaveMiniGun[iOwner] && pev_valid(iEnt)) { // Set weaponbox new model engfunc(EngFunc_SetModel, iEnt, g_w_szMinigunModel) return FMRES_SUPERCEDE } return FMRES_IGNORED }
He who fails to plan is planning to fail
lol my mistake i try to say when round starts i have a m249 and when i take another weapon from weapons list the m249 appears!
You mean M249 disappear when you choose a weapon from menu?
He who fails to plan is planning to fail
Yes but now i can't see the weapons menu lol becuz i changed my old ze_weapon_menu to your ze_weapon_menu from the pack your send me and look at server's log
L 11/30/2017 - 23:41:27: [AMXX] Displaying debug trace (plugin "ze_weapon_menu.amxx", version "1.1")
L 11/30/2017 - 23:41:27: [AMXX] Run time error 10: native error (native "ArrayGetString")
L 11/30/2017 - 23:41:27: [AMXX] [0] ze_weapon_menu.sma::Show_Menu_Buy_Primary (line 379)
L 11/30/2017 - 23:41:27: [AMXX] [1] ze_weapon_menu.sma::Show_Available_Buy_Menus (line 302)
L 11/30/2017 - 23:41:27: [AMXX] [2] ze_weapon_menu.sma::ze_user_humanized (line 277)
L 11/30/2017 - 23:41:27: [AMXX] Displaying debug trace (plugin "ze_weapon_menu.amxx", version "1.1")
L 11/30/2017 - 23:41:27: [AMXX] Run time error 10: native error (native "ArrayGetString")
L 11/30/2017 - 23:41:27: [AMXX] [0] ze_weapon_menu.sma::Show_Menu_Buy_Primary (line 379)
L 11/30/2017 - 23:41:27: [AMXX] [1] ze_weapon_menu.sma::Show_Available_Buy_Menus (line 302)
L 11/30/2017 - 23:41:27: [AMXX] [2] ze_weapon_menu.sma::ze_user_humanized (line 277)
Please update it like i told you raheem.
This will need me to make native to use it to give player the weapon when he buy the primary weapon. Or the ze_weapons_menu plugin you will use give me and i'll edit it for you.
He who fails to plan is planning to fail
i dont have ze_weapon_menu becuz i'm using your server pack i didn't find source codes on it
[mention]TheWhitesmith[/mention] can you help raheem to make this plugin perfect ?
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute
Sign in
Who is online
Users browsing this forum: No registered users and 3 guests