[ReQ] Instead of VIP Features.

Unpaid Requests, Public Plugins
User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 303
Joined: 9 Months Ago
Location: Sousse
Has thanked: 12 times
Been thanked: 4 times
Age: 17
Contact:

Re: [ReQ] Instead of VIP Features.

#11

Post by Spir0x » 2 Weeks Ago

@Raheem 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
Image

User avatar
Raheem
Developing Team
Developing Team
Egypt
Posts: 859
Joined: 10 Months Ago
Location: Egypt
Has thanked: 16 times
Been thanked: 41 times
Age: 20
Contact:

Re: [ReQ] Instead of VIP Features.

#12

Post by Raheem » 1 Week Ago

What this means? "this weapon appear when i chose another vip"

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
    }
•• Free Palestine ••

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 303
Joined: 9 Months Ago
Location: Sousse
Has thanked: 12 times
Been thanked: 4 times
Age: 17
Contact:

Re: [ReQ] Instead of VIP Features.

#13

Post by Spir0x » 1 Week Ago

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!
Image

User avatar
Raheem
Developing Team
Developing Team
Egypt
Posts: 859
Joined: 10 Months Ago
Location: Egypt
Has thanked: 16 times
Been thanked: 41 times
Age: 20
Contact:

Re: [ReQ] Instead of VIP Features.

#14

Post by Raheem » 1 Week Ago

You mean M249 disappear when you choose a weapon from menu?
•• Free Palestine ••

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 303
Joined: 9 Months Ago
Location: Sousse
Has thanked: 12 times
Been thanked: 4 times
Age: 17
Contact:

Re: [ReQ] Instead of VIP Features.

#15

Post by Spir0x » 1 Week Ago

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)
Image

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 303
Joined: 9 Months Ago
Location: Sousse
Has thanked: 12 times
Been thanked: 4 times
Age: 17
Contact:

Re: [ReQ] Instead of VIP Features.

#16

Post by Spir0x » 1 Week Ago

so ?
Image

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 303
Joined: 9 Months Ago
Location: Sousse
Has thanked: 12 times
Been thanked: 4 times
Age: 17
Contact:

Re: [ReQ] Instead of VIP Features.

#17

Post by Spir0x » 1 Week Ago

Please update it like i told you raheem.
Image

User avatar
Raheem
Developing Team
Developing Team
Egypt
Posts: 859
Joined: 10 Months Ago
Location: Egypt
Has thanked: 16 times
Been thanked: 41 times
Age: 20
Contact:

Re: [ReQ] Instead of VIP Features.

#18

Post by Raheem » 1 Week Ago

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.
•• Free Palestine ••

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 303
Joined: 9 Months Ago
Location: Sousse
Has thanked: 12 times
Been thanked: 4 times
Age: 17
Contact:

Re: [ReQ] Instead of VIP Features.

#19

Post by Spir0x » 1 Week Ago

i dont have ze_weapon_menu becuz i'm using your server pack i didn't find source codes on it
Image

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 303
Joined: 9 Months Ago
Location: Sousse
Has thanked: 12 times
Been thanked: 4 times
Age: 17
Contact:

Re: [ReQ] Instead of VIP Features.

#20

Post by Spir0x » 2 Days Ago

@TheWhitesmith can you help raheem to make this plugin perfect ?
Image

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest