Raised This Month: $32 Target: $400
 8% 

[ HELP ] cs_set_user_bpammo and cs_set_weapon_ammo error?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Banana.
BANNED
Join Date: Oct 2015
Location: Brazil [<o>]
Old 10-10-2015 , 21:36   [ HELP ] cs_set_user_bpammo and cs_set_weapon_ammo error?
Reply With Quote #1

How to fix my code to when zp_extra_item_selected() set user bpammo to 5 and set weapon ammo to 1?
PHP Code:
public zp_extra_item_selected(playeritemid)
{
    if(
itemid == g_item_id)
    {
        if(
get_user_weapon(player) == CSW_AWP)
        {
            
drop_prim(player);
        }

        
g_has_anti[player] = true;
        
client_print(playerprint_chat"[ZP] Voce comprou a Antidote AWP.");
        
give_item(player"weapon_awp");
        
cs_set_user_bpammo(playerCSW_AWP5);
        
cs_set_weapon_ammo(CSW_AWP1);
    } 

Banana. is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 10-10-2015 , 22:44   Re: [ HELP ] cs_set_user_bpammo and cs_set_weapon_ammo error?
Reply With Quote #2

so what is not working?
Depresie is offline
Banana.
BANNED
Join Date: Oct 2015
Location: Brazil [<o>]
Old 10-11-2015 , 10:19   Re: [ HELP ] cs_set_user_bpammo and cs_set_weapon_ammo error?
Reply With Quote #3

I fixed the code , but when the player reloads the bpammo changes to 30 and the ammo changes to 10 , how to fix ?
PHP Code:
public zp_extra_item_selected(playeritemid)
{
    if(
itemid == g_item_id)
    {
        if(
get_user_weapon(player) == CSW_AWP)
        {
            
drop_prim(player);
        }

        
g_has_anti[player] = true;
        
client_print(playerprint_chat"[ZP] Voce comprou a Antidote AWP.");
        new 
weaponid give_item(player"weapon_awp");
        
cs_set_weapon_ammo(weaponid1);
        
cs_set_user_bpammo(playerCSW_AWP5);
    } 

Banana. is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 10-11-2015 , 10:53   Re: [ HELP ] cs_set_user_bpammo and cs_set_weapon_ammo error?
Reply With Quote #4

If you search the forum you will find a plugin that does this already. Just use it or look at it for reference.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:42.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode