AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   item amount (https://forums.alliedmods.net/showthread.php?t=167726)

RainZ 09-19-2011 08:20

item amount
 
what is the code to put the amount of the weapon . e.g

PHP Code:

give_item(id weapon_hegrenade

I want to put the amount where should I set the amount of the weapon?

Arkshine 09-19-2011 08:25

Re: item amount
 
Use http://www.amxmodx.org/funcwiki.php?go=func&id=186

jim_yang 09-19-2011 08:25

Re: item amount
 
http://www.amxmodx.org/funcwiki.php?go=func&id=186

Arkshine 09-19-2011 08:26

Re: item amount
 
Nice synchronization. :mrgreen:

jim_yang 09-19-2011 08:26

Re: item amount
 
...damn lag for me...

RainZ 09-19-2011 08:31

Re: item amount
 
bpammo? also for HE Grenade? o.o

Arkshine 09-19-2011 08:33

Re: item amount
 
Sure. Try and see.

RainZ 09-19-2011 08:34

Re: item amount
 
Arkshine , please help .

I made a plugin and I want to added the amount but I need to buy it twice so I can get the amount that I want . Please help

PHP Code:

public zp_extra_item_selected(playeritemid)
{
    if ( 
itemid == g_itemid )
    {
        if ( 
user_has_weapon(playerCSW_HEGRENADE) ) 
        
give_item(player"weapon_hegrenade")                 
        
cs_set_user_bpammo(playerCSW_HEGRENADEget_pcvar_num(cvar_amount))
        
        
client_print(playerprint_chat"[ZP] You bought Extra HE-Grenade")
        
g_Bomb[player] = true;
    } 


qwerty123 09-27-2011 09:54

Re: item amount
 
PHP Code:

public zp_extra_item_selected(playeritemid)
{
    if ( 
itemid == g_itemid )
    {
        if ( 
user_has_weapon(playerCSW_HEGRENADE) ) 
        
give_item(player"weapon_hegrenade")                 
        
cs_set_user_bpammo(playerCSW_HEGRENADEget_pcvar_num(cvar_amount))
        
        
client_print(playerprint_chat"[ZP] You bought Extra HE-Grenade")
        
g_Bomb[player] = true;
    } 

==>

PHP Code:

public zp_extra_item_selected(playeritemid)
{
    if ( 
itemid == g_itemid )
    { 
        
give_item(player"weapon_hegrenade")                 
        
cs_set_user_bpammo(playerCSW_HEGRENADEget_pcvar_num(cvar_amount))
        
        
client_print(playerprint_chat"[ZP] You bought Extra HE-Grenade")
        
g_Bomb[player] = true;
    } 



All times are GMT -4. The time now is 19:30.

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