Plugin Available XP Comand

Unpaid Requests, Public Plugins
Locked
BandiT
Member
Member
Romania
Posts: 19
Joined: 5 Months Ago
Has thanked: 0
Been thanked: 0
Contact:

XP Comand

#1

Post by BandiT » 2 Months Ago

Can someone make a XP comand, i mean to give xp to the players like how is that comand to give coins to the players, if some one can help me post here, Thank you.

[ Post made via iPhone ]

User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 1998
Joined: 3 Years Ago
Location: Egypt
Has thanked: 33 times
Been thanked: 111 times
Age: 22
Contact:

#2

Post by Raheem » 2 Months Ago

Any further problem post here: viewtopic.php?f=12&t=3746

  1. #include <zombie_escape>
  2. #include <ze_levels>
  3.  
  4. #define ACCESS ADMIN_RCON
  5.  
  6. public plugin_init ()
  7. {
  8.     register_plugin("[ZE] Give XP", "1.0", "?")
  9.     register_clcmd("ze_givexp", "Cmd_GiveXP", ACCESS, "- ze_givexp <name> <amount>")
  10. }
  11.  
  12. public Cmd_GiveXP(id)
  13. {
  14.     if (!(get_user_flags(id) & ACCESS))
  15.     {
  16.         client_print(id, print_console, "You have no access to that command")
  17.         return PLUGIN_HANDLED
  18.     }
  19.    
  20.     new szName[32], szAmount[10]
  21.    
  22.     read_argv (1, szName, charsmax (szName))
  23.     read_argv (2, szAmount, charsmax (szAmount))
  24.    
  25.     new iTargetIndex = get_user_index(szName)
  26.    
  27.     if (!is_user_connected(iTargetIndex))
  28.         return PLUGIN_HANDLED
  29.    
  30.     if (!iTargetIndex)
  31.     {
  32.         client_print(id, print_console, "[ZE] Player not found!")
  33.         return PLUGIN_HANDLED
  34.     }
  35.    
  36.     new iXPAmout = str_to_num (szAmount)
  37.    
  38.     ze_set_user_xp(iTargetIndex, ze_get_user_xp(iTargetIndex) + iXPAmout)
  39.     return PLUGIN_HANDLED
  40. }
Loading Raheem's signature, Please wait...
Image

Locked

Who is online

Users browsing this forum: Bing [Bot] and 0 guests