Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Plugin generated by AMXX-Studio */
- #include <amxmodx>
- #include <amxmisc>
- #include <zombieplague>
- public plugin_init ()
- {
- register_plugin ( "ZP: Give Ammo", "1.0.0", "Quantum" );
- register_clcmd ( "zp_giveap", "CmdGiveAP", ADMIN_RCON, "- zp_giveap <name> <amount> : Give Ammo Packs" );
- }
- public CmdGiveAP ( id, level, cid )
- {
- if ( !cmd_access ( id, level, cid, 3 ) )
- {
- return PLUGIN_HANDLED;
- }
- new s_Name[ 32 ], s_Amount[ 4 ];
- read_argv ( 1, s_Name, charsmax ( s_Name ) );
- read_argv ( 2, s_Amount, charsmax ( s_Amount ) );
- new i_Target = cmd_target ( id, s_Name, 2 );
- if ( !i_Target )
- {
- client_print ( id, print_console, "(!) Player not found" );
- return PLUGIN_HANDLED;
- }
- zp_set_user_ammo_packs ( i_Target, max ( 1, str_to_num ( s_Amount ) ) );
- return PLUGIN_HANDLED;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement