AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Zombie Plague Mod (https://forums.alliedmods.net/forumdisplay.php?f=126)
-   -   Subplugin Submission Zombie Plague - Give Full Ammo Packs (https://forums.alliedmods.net/showthread.php?t=87259)

joropito 03-08-2009 21:59

Zombie Plague - Give Full Ammo Packs
 
1 Attachment(s)
This plugin gives you the ability to multiply by 100 the ammo packs of a user.

Use the command: zp_fullammo USER

Updated to 0.2 (fixed as requested in thread)

joaquimandrade 03-08-2009 22:24

Re: Zombie Plague - Give Full Ammo Packs
 
Quote:

Originally Posted by joropito (Post 776883)
This plugin gives you the ability to multiply by 100 the ammo packs of a user.

Use the command: zp_fullammo USER

Indent it:
PHP Code:

public zpFullAmmo(id,level,cid
{
    if (
cmd_access(id,level,cid,2))
    {
        new 
arg[32];
        
read_argv(1,arg,31);
        new 
player cmd_target(id,arg,7);
        
        if (
player)
        {
            
zp_set_user_ammo_packs(player10 zp_get_user_ammo_packs(player));
        }
    }
    
    return 
PLUGIN_HANDLED;



IneedHelp 03-08-2009 23:10

Re: Zombie Plague - Give Full Ammo Packs
 
if (!cmd_access(id,level,cid,2))

?

edit:

Quote:

Are you talking about the "!" ?. Updated.
yes :p

joaquimandrade 03-08-2009 23:17

Re: Zombie Plague - Give Full Ammo Packs
 
Quote:

Originally Posted by IneedHelp (Post 776904)
if (!cmd_access(id,level,cid,2))

?

Are you talking about the "!" ?. Updated. Ok ( :) )

joropito 03-09-2009 08:18

Re: Zombie Plague - Give Full Ammo Packs
 
Quote:

Originally Posted by joaquimandrade (Post 776896)
Indent it:
PHP Code:

public zpFullAmmo(id,level,cid
{
    if (
cmd_access(id,level,cid,2))
    {
        new 
arg[32];
        
read_argv(1,arg,31);
        new 
player cmd_target(id,arg,7);
        
        if (
player)
        {
            
zp_set_user_ammo_packs(player10 zp_get_user_ammo_packs(player));
        }
    }
    
    return 
PLUGIN_HANDLED;




Done. UPDATED

crazyeffect 03-09-2009 11:54

Re: Zombie Plague - Give Full Ammo Packs
 
Cool :D

But doesnt this needs to be in Zombie Plague?

joropito 03-09-2009 16:02

Re: Zombie Plague - Give Full Ammo Packs
 
Quote:

Originally Posted by crazyeffect (Post 777119)
Cool :D

But doesnt this needs to be in Zombie Plague?

Does any moderator could change this thread to the corresponding group?

I'm newbie...

bmann_420 03-09-2009 22:04

Re: Zombie Plague - Give Full Ammo Packs
 
MeRcyLeZZ was trying to make it clear Here. Anybody else disagrees can figure it out. But theirs so many, were still trying to come up with a way to segregate them from strictly approved section. I really dunno, im trying to locate as much as I can into 1 place, but that is outsourced, not here. And create a "new submissions" & "Approved" for Zplague extensions.

Speed! 03-12-2009 17:49

Re: Zombie Plague - Give Full Ammo Packs
 
Quote:

Originally Posted by joropito (Post 776883)
This plugin gives you the ability to multiply by 100 the ammo packs of a user.

Use the command: zp_fullammo USER

from your code:
PHP Code:

zp_set_user_ammo_packs(player10*zp_get_user_ammo_packs(player)); 


ConnorMcLeod 03-13-2009 02:12

Re: Zombie Plague - Give Full Ammo Packs
 
Remove :

new name[32];
get_user_name(player,name,31);

Or use it...


All times are GMT -4. The time now is 16:24.

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