Approved Give Escape Coins

Gameplay Addons
User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 2016
Joined: 3 Years Ago
Location: Egypt
Has thanked: 34 times
Been thanked: 115 times
Age: 22
Contact:

Give Escape Coins

#1

Post by Raheem » 3 Years Ago

Give Escape Coins

Description:
  • Plugin for admins, So they can give players Escape Coins just by using simple console command.
Installation & Instructions:
  • Simply install it like any plugin.
  • Usage: ze_giveec "name" "amount"
    Example: ze_giveec "Raheem" 50 This will give raheem 50 Escape Coins.
    You can change the admin flag from the plugin and then Re-Compile the plugin again: #define ACCESS ADMIN_RCON
Downloads:

Loading Raheem's signature, Please wait...
Image

johnnysins2000
Veteran Member
Veteran Member
Pakistan
Posts: 672
Joined: 3 Years Ago
Location: Lahore
Has thanked: 11 times
Been thanked: 10 times
Age: 23
Contact:

#2

Post by johnnysins2000 » 3 Years Ago

Thanks Very Useful Plugin ! :)
Nobody Is That Busy If They Make Time :roll:

User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 2016
Joined: 3 Years Ago
Location: Egypt
Has thanked: 34 times
Been thanked: 115 times
Age: 22
Contact:

#3

Post by Raheem » 3 Years Ago

Nice hope this helps :)
Loading Raheem's signature, Please wait...
Image

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 640
Joined: 3 Years Ago
Location: Tunisia
Has thanked: 14 times
Been thanked: 7 times
Age: 20
Contact:

#4

Post by Spir0x » 2 Years Ago

this plugin cannot be updated ?
simple example:

!tADMIN !g%s !tHas gived !g%d !tEscape Coins to Player !g%s!y.
I trynna make money, not friends.

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 640
Joined: 3 Years Ago
Location: Tunisia
Has thanked: 14 times
Been thanked: 7 times
Age: 20
Contact:

#5

Post by Spir0x » 2 Years Ago

@Raheem look here.
I trynna make money, not friends.

User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 2016
Joined: 3 Years Ago
Location: Egypt
Has thanked: 34 times
Been thanked: 115 times
Age: 22
Contact:

#6

Post by Raheem » 1 Year Ago

  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 <name> <amount>")
  9. }
  10.  
  11. public Cmd_GiveEC(id)
  12. {
  13.     if (!(get_user_flags(id) & ACCESS))
  14.     {
  15.         client_print(id, print_console, "You have no access to that command")
  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] Player not found!")
  29.         return PLUGIN_HANDLED
  30.     }
  31.    
  32.     if (!is_user_connected(iTargetIndex))
  33.         return PLUGIN_HANDLED
  34.    
  35.     new iECAmout = str_to_num (szAmount)
  36.    
  37.     ze_set_escape_coins(iTargetIndex, ze_get_escape_coins(iTargetIndex) + iECAmout)
  38.     return PLUGIN_HANDLED
  39. }
Loading Raheem's signature, Please wait...
Image

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 640
Joined: 3 Years Ago
Location: Tunisia
Has thanked: 14 times
Been thanked: 7 times
Age: 20
Contact:

#7

Post by Spir0x » 1 Year Ago

What you did on this new code bro ?
I trynna make money, not friends.

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 640
Joined: 3 Years Ago
Location: Tunisia
Has thanked: 14 times
Been thanked: 7 times
Age: 20
Contact:

#8

Post by Spir0x » 1 Year Ago

where's the chat message ?
I trynna make money, not friends.

imSpartan
Member
Member
Malaysia
Posts: 22
Joined: 11 Months Ago
Has thanked: 6 times
Been thanked: 0
Contact:

#9

Post by imSpartan » 11 Months Ago

WIll this work with steamid instead of name?

Code: Select all

ze_giveec "STEAMID" "50"
Can this plugin execute with rcon, like hlsw?

User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 2016
Joined: 3 Years Ago
Location: Egypt
Has thanked: 34 times
Been thanked: 115 times
Age: 22
Contact:

#10

Post by Raheem » 11 Months Ago

imSpartan wrote:
11 Months Ago
WIll this work with steamid instead of name?

Code: Select all

ze_giveec "STEAMID" "50"
Can this plugin execute with rcon, like hlsw?
Give try:

  1. #include <zombie_escape>
  2.  
  3. #define ACCESS ADMIN_RCON
  4.  
  5. new g_iMaxPlayers
  6.  
  7. public plugin_init ()
  8. {
  9.     register_plugin("[ZE] Give Escape Coins", "1.0", "Raheem")
  10.     register_clcmd("ze_giveec", "Cmd_GiveEC", ACCESS, "- ze_giveec <steamid> <amount>")
  11.    
  12.     g_iMaxPlayers = get_member_game(m_nMaxPlayers)
  13. }
  14.  
  15. public Cmd_GiveEC(id)
  16. {
  17.     if (!(get_user_flags(id) & ACCESS))
  18.     {
  19.         client_print(id, print_console, "You have no access to that command")
  20.         return PLUGIN_HANDLED
  21.     }
  22.    
  23.     new szSteamid[32], szAmount[10]
  24.    
  25.     read_argv (1, szSteamid, charsmax (szSteamid))
  26.     read_argv (2, szAmount, charsmax (szAmount))
  27.    
  28.     new iTargetIndex = GetPlayerID(szSteamid)
  29.    
  30.     if (!iTargetIndex)
  31.     {
  32.         client_print(id, print_console, "[ZE] Player not found!")
  33.         return PLUGIN_HANDLED
  34.     }
  35.    
  36.     if (!is_user_connected(iTargetIndex))
  37.         return PLUGIN_HANDLED
  38.    
  39.     new iECAmout = str_to_num (szAmount)
  40.    
  41.     ze_set_escape_coins(iTargetIndex, ze_get_escape_coins(iTargetIndex) + iECAmout)
  42.     return PLUGIN_HANDLED
  43. }
  44.  
  45. stock GetPlayerID(szSteamId[])
  46. {
  47.     for(new id = 1; id <= g_iMaxPlayers; id++)
  48.     {
  49.         if (!is_user_connected(id))
  50.             continue
  51.        
  52.         new szPlayerSteam[36]
  53.         get_user_authid(id, szPlayerSteam, charsmax(szPlayerSteam))
  54.        
  55.         if (equal(szPlayerSteam, szSteamId))
  56.             return id
  57.     }
  58.    
  59.     return 0
  60. }

Not sure if this can be executed with rcon from any software like HLSW .. etc, just try it's related to AMXMODX.
These users thanked the author Raheem for the post:
imSpartan (11 Months Ago)
Loading Raheem's signature, Please wait...
Image

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests