Approved Give Escape Coins

Gameplay Addons
User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 1972
Joined: 2 Years Ago
Location: Egypt
Has thanked: 32 times
Been thanked: 108 times
Age: 21
Contact:

Give Escape Coins

#1

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

You don't know? Learn and you will know.

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

#2

Post by johnnysins2000 » 2 Years Ago

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

User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 1972
Joined: 2 Years Ago
Location: Egypt
Has thanked: 32 times
Been thanked: 108 times
Age: 21
Contact:

#3

Post by Raheem » 2 Years Ago

Nice hope this helps :)
You don't know? Learn and you will know.

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 633
Joined: 2 Years Ago
Location: Tunisia
Has thanked: 14 times
Been thanked: 7 times
Age: 19
Contact:

#4

Post by Spir0x » 1 Year 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: 633
Joined: 2 Years Ago
Location: Tunisia
Has thanked: 14 times
Been thanked: 7 times
Age: 19
Contact:

#5

Post by Spir0x » 1 Year Ago

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

User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 1972
Joined: 2 Years Ago
Location: Egypt
Has thanked: 32 times
Been thanked: 108 times
Age: 21
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. }
You don't know? Learn and you will know.

User avatar
Spir0x
Veteran Member
Veteran Member
Tunisia
Posts: 633
Joined: 2 Years Ago
Location: Tunisia
Has thanked: 14 times
Been thanked: 7 times
Age: 19
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: 633
Joined: 2 Years Ago
Location: Tunisia
Has thanked: 14 times
Been thanked: 7 times
Age: 19
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: 4 Months Ago
Has thanked: 6 times
Been thanked: 0
Contact:

#9

Post by imSpartan » 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?

User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 1972
Joined: 2 Years Ago
Location: Egypt
Has thanked: 32 times
Been thanked: 108 times
Age: 21
Contact:

#10

Post by Raheem » 3 Months Ago

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.
These users thanked the author Raheem for the post:
imSpartan (3 Months Ago)
You don't know? Learn and you will know.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests