Thread: [Subplugin Submission] [ZP] Extra Item: Golden Ak - 47 v1.1 Fix
View Single Post
NTARIS
Member
Join Date: Dec 2020
Location: Greece
Old 01-28-2021 , 04:39   Re: [ZP] Extra Item: Golden Ak - 47 v1.1 Fix
Reply With Quote #140

*Fixed bug with 0 BP ammo

I think alejandro (MAY) removed the required line for that on propose here is the solution to the code.

Code:
public zp_extra_item_selected(player, itemid)
{
    if ( itemid == g_itemid )
    {
        if ( user_has_weapon(player, CSW_AK47) )
        {
            drop_prim(player)
        }
        
        give_item(player, "weapon_ak47")
        cs_set_user_bpammo(player, CSW_AK47, 90) 
        client_print(player, print_chat, "[ZP] You bought Golden AK-47")
        g_Hasawp[player] = true;
    }
}
Attached Files
File Type: sma Get Plugin or Get Source (zp_extra_goldenak.sma - 244 views - 6.0 KB)

Last edited by NTARIS; 01-31-2021 at 07:06. Reason: BUG FIX 2020
NTARIS is offline