Advertisement
Sokarbestfrag

Untitled

Feb 26th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. /* Plugin generated by AMXX-Studio */
  2. #include <amxmodx>
  3. #include <amxmisc>
  4. #include <zombieplague>
  5.  
  6. public plugin_init ()
  7. {
  8. register_plugin ( "ZP: Give Ammo", "1.0.0", "Quantum" );
  9. register_clcmd ( "zp_giveap", "CmdGiveAP", ADMIN_RCON, "- zp_giveap <name> <amount> : Give Ammo Packs" );
  10. }
  11.  
  12. public CmdGiveAP ( id, level, cid )
  13. {
  14. if ( !cmd_access ( id, level, cid, 3 ) )
  15. {
  16. return PLUGIN_HANDLED;
  17. }
  18.  
  19. new s_Name[ 32 ], s_Amount[ 4 ];
  20.  
  21. read_argv ( 1, s_Name, charsmax ( s_Name ) );
  22. read_argv ( 2, s_Amount, charsmax ( s_Amount ) );
  23.  
  24. new i_Target = cmd_target ( id, s_Name, 2 );
  25.  
  26. if ( !i_Target )
  27. {
  28. client_print ( id, print_console, "(!) Player not found" );
  29. return PLUGIN_HANDLED;
  30. }
  31.  
  32. zp_set_user_ammo_packs ( i_Target, max ( 1, str_to_num ( s_Amount ) ) );
  33.  
  34. return PLUGIN_HANDLED;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement