[ReQ] Instead of VIP Features.
[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 ?
The weapons menu source i use is same as posted in GamePlay section. Just find this line:
I'll post the better solution using native later.
rg_give_item(id, szWeaponName, GT_REPLACE)
replace it with rg_give_item(id, szWeaponName, GT_APPEND)
I'll post the better solution using native later.
He who fails to plan is planning to fail
with this code i got 3 freez nades and 2 fire nades and i already replaced GT_APPEND and the m249 still appear when i choose another one.
now no need to add the models becuz i'm using new_weapons.ini
Code:
now no need to add the models becuz i'm using new_weapons.ini
Code:
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)
}
- TheWhitesmith
- Member
- Posts: 33
- Joined: 6 years ago
- Location: Temara/Rabat
- Contact:
I believe the weapons plugin has an option that strips the weapon from the player. If you don't have the source to remove it you may want to create a menu option inside VIP Menu where he can get M249 if he doesnt have it without stripping user weapons, so he will have the weapon he choose + M249.
[SYA] CSGO-Mod for CS 1.6 [ Cases/Keys/Rank ][/size]
IP: 149.202.251.74:27016
IP: 149.202.251.74:27016
in another servers he take this minigun with out any menu.
and i dont know how to make VIP menu inside main menu.
and i dont know how to make VIP menu inside main menu.
I'm still want this useful plugin.
Minigun VIP
Best Solution Raheem is make it on Extra-Items like you said.
3. Minigun \w[\rVIP\w]
or add natives into ze_weapon_menu to make this minigun fixed for vips.
also normal players will never use m249.
if weapon be restricted or something.
Minigun VIP
Best Solution Raheem is make it on Extra-Items like you said.
3. Minigun \w[\rVIP\w]
or add natives into ze_weapon_menu to make this minigun fixed for vips.
also normal players will never use m249.
if weapon be restricted or something.
Open ze_weapons_menu.sma and find this:
- public Buy_Primary_Weapon(id, selection)
- {
- static szWeaponName[32]
- ArrayGetString(g_szPrimaryWeapons, selection, szWeaponName, charsmax(szWeaponName))
- new iWeaponId = get_weaponid(szWeaponName)
- // Strip and Give Full Weapon
- rg_give_item(id, szWeaponName, GT_REPLACE)
- rg_set_user_bpammo(id, WeaponIdType:iWeaponId, szMaxBPAmmo[iWeaponId])
- // Primary bought
- g_bBoughtPrimary[id] = true
- }
- public Buy_Primary_Weapon(id, selection)
- {
- static szWeaponName[32]
- ArrayGetString(g_szPrimaryWeapons, selection, szWeaponName, charsmax(szWeaponName))
- new iWeaponId = get_weaponid(szWeaponName)
- // Strip and Give Full Weapon
- rg_give_item(id, szWeaponName, GT_APPEND)
- rg_set_user_bpammo(id, WeaponIdType:iWeaponId, szMaxBPAmmo[iWeaponId])
- // Primary bought
- g_bBoughtPrimary[id] = true
- }
He who fails to plan is planning to fail
what about
native ze_giveminigun(id)
on ze_weapon_menu ?
native ze_giveminigun(id)
on ze_weapon_menu ?
I don't remember. Tell me now what the problem and post final code you have.
He who fails to plan is planning to fail
i dont have a game server.
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 13 guests