Page 1 of 2

Give Escape Coins

Posted: 02 Mar 2017, 18:36
by Raheem
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:


Re: Give Escape Coins

Posted: 03 Mar 2017, 09:36
by johnnysins2000
Thanks Very Useful Plugin ! :)

Re: Give Escape Coins

Posted: 03 Mar 2017, 09:42
by Raheem
Nice hope this helps :)

Re: Give Escape Coins

Posted: 30 Jan 2018, 19:23
by Spir0x
this plugin cannot be updated ?
simple example:

!tADMIN !g%s !tHas gived !g%d !tEscape Coins to Player !g%s!y.

Re: Give Escape Coins

Posted: 01 Feb 2018, 19:35
by Spir0x
@Raheem look here.

Re: Give Escape Coins

Posted: 22 Jul 2018, 14:51
by Raheem
  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. }

Re: Give Escape Coins

Posted: 01 Aug 2018, 18:22
by Spir0x
What you did on this new code bro ?

Re: Give Escape Coins

Posted: 26 Aug 2018, 16:47
by Spir0x
where's the chat message ?

Re: Give Escape Coins

Posted: 01 Aug 2019, 05:44
by imSpartan
WIll this work with steamid instead of name?

Code: Select all

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

Re: Give Escape Coins

Posted: 02 Aug 2019, 17:08
by Raheem
imSpartan wrote:
3 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.