Raised This Month: $ Target: $400
 0% 

Solved Giving ammo packs ZP4.3


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Vellety
New Member
Join Date: Dec 2018
Old 12-22-2018 , 04:58   Giving ammo packs ZP4.3
Reply With Quote #1

Could someone tell me why this does not work?
If I don't provide an argument it'll just say "Player not found" right, but if I do provide args nothing happens at all.

PHP Code:
public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
// cmds
    
register_clcmd("say /giveap""hCMD"ADMIN_BAN"Usage: /giveap <name> <amount>")
    
register_clcmd("say_team /giveap""hCMD"ADMIN_BAN"Usage: /giveap <name> <amount>")
}

public 
hCMD(id)
{
    new 
szName[32], iAmount[256];
    
read_argv(1szNamecharsmax (szName));
    
read_argv(2iAmountcharsmax (iAmount));
    
    new 
iTarget cmd_target(idszName2);
    if (!
iTarget)
    {
        
ColorChat(idRED"[ZM]^1 Player not found!!");
        return 
PLUGIN_HANDLED;
    }
    
    
zp_add_user_ammo_packs(iTargetmax(1str_to_num(iAmount)));
    return 
PLUGIN_HANDLED;


Last edited by Vellety; 12-22-2018 at 11:00. Reason: done
Vellety is offline
 



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 07:32.


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