Approved Give Escape Coins

Plug-ins compatibility with Zombie Escape 1.x only!


Post Reply
User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

Give Escape Coins

#1

Post by Raheem » 7 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:

He who fails to plan is planning to fail

johnnysins2000
Veteran Member
Veteran Member
Paraguay
Posts: 678
Joined: 7 years ago
Location: Paraguay
Contact:

#2

Post by johnnysins2000 » 7 years ago

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

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#3

Post by Raheem » 7 years ago

Nice hope this helps :)
He who fails to plan is planning to fail

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 641
Joined: 7 years ago
Location: Tunisia
Contact:

#4

Post by Spir0x » 6 years ago

this plugin cannot be updated ?
simple example:

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

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 641
Joined: 7 years ago
Location: Tunisia
Contact:

#5

Post by Spir0x » 6 years ago

[mention]Raheem[/mention] look here.

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#6

Post by Raheem » 5 years 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. }
He who fails to plan is planning to fail

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 641
Joined: 7 years ago
Location: Tunisia
Contact:

#7

Post by Spir0x » 5 years ago

What you did on this new code bro ?

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 641
Joined: 7 years ago
Location: Tunisia
Contact:

#8

Post by Spir0x » 5 years ago

where's the chat message ?

imSpartan
Member
Member
Malaysia
Posts: 22
Joined: 4 years ago
Contact:

#9

Post by imSpartan » 4 years 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
Posts: 2214
Joined: 7 years ago
Contact:

#10

Post by Raheem » 4 years ago

imSpartan wrote: 4 years 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.
He who fails to plan is planning to fail

imSpartan
Member
Member
Malaysia
Posts: 22
Joined: 4 years ago
Contact:

#11

Post by imSpartan » 4 years ago

Thanks raheem it work.

Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Who is online

Users browsing this forum: No registered users and 0 guests