Thread: [Help / Support] ZP Golden Items Issue (Fix)
View Single Post
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 01-28-2021 , 21:59   Re: ZP Golden Items Issue (Fix)
Reply With Quote #3

Nothing wrong with the code, you didn't give the player bpammo in the first place.

PHP Code:
public zp_extra_item_selected(playeritemid)
{
    if ( 
itemid == g_itemid )
    {
        if ( 
user_has_weapon(playerCSW_AWP) )
        {
            
drop_prim(player)
        }
        
        
give_item(player"weapon_awp")
        
client_print(playerprint_chat"[ZP] You bought Golden AWP")
        
g_Hasawp[player] = true;
    }

you give them weapon only
Fix it to this
PHP Code:
public zp_extra_item_selected(playeritemid)
{
    if ( 
itemid == g_itemid )
    {
        if ( 
user_has_weapon(playerCSW_AWP) )
        {
            
drop_prim(player)
        }
        
        
give_item(player"weapon_awp")
        
cs_set_user_bpammo(playerCSW_AWP30//Give them 30 BPAmmo
        
client_print(playerprint_chat"[ZP] You bought Golden AWP")
        
g_Hasawp[player] = true;
    }

and it will give you 30 bpammo
__________________
My plugin:

Last edited by Celena Luna; 01-28-2021 at 22:02.
Celena Luna is offline