HLMOD.HU Forrás Megtekintés - www.hlmod.hu
  1. #include <zombie_escape>
  2.  
  3. #define ACCESS ADMIN_RCON
  4.  
  5. public plugin_init ()
  6. {
  7. register_plugin("[ZE] Give Escape Coins", "1.0", "Raheem")
  8. register_clcmd("ze_giveec", "Cmd_GiveEC", ACCESS, "- ze_giveec <név> <összeg>")
  9. }
  10.  
  11. public Cmd_GiveEC(id)
  12. {
  13. if (!(get_user_flags(id) & ACCESS))
  14. {
  15. client_print(id, print_console, "Nincs meg a szükséges jogod, ehhez a parancshoz")
  16. return PLUGIN_HANDLED
  17. }
  18.  
  19. new szName[32], szAmount[10]
  20.  
  21. read_argv (1, szName, charsmax (szName))
  22. read_argv (2, szAmount, charsmax (szAmount))
  23.  
  24. new iTargetIndex = get_user_index(szName)
  25.  
  26. if (!iTargetIndex)
  27. {
  28. client_print(id, print_console, "[ZE] Játékos nem található!")
  29. return PLUGIN_HANDLED
  30. }
  31.  
  32. new iECAmout = str_to_num (szAmount)
  33.  
  34. ze_set_escape_coins(iTargetIndex, ze_get_escape_coins(iTargetIndex) + iECAmout)
  35. return PLUGIN_HANDLED
  36. }