Resolved Script bug

Coding Help/Re-API Supported
Post Reply
User avatar
Luxurious
Senior Member
Senior Member
Egypt
Posts: 144
Joined: 1 Year Ago
Location: Egypt
Has thanked: 3 times
Been thanked: 4 times
Contact:

Script bug

#1

Post by Luxurious » 2 Months Ago

i tried to convert "zp ammo menu" to ze v1.4 but i found this problems
  1. //// ze_admin_coins_menu.sma
  2. //
  3. // D:\ze v1.4\include\colorchat.inc(23) : error 021: symbol already defined: "TeamName"
  4. // D:\ze v1.4\include\colorchat.inc(74) : error 028: invalid subscript (not an array or too many subscripts): "TeamName"
  5. // D:\ze v1.4\include\colorchat.inc(74) : warning 215: expression has no effect
  6. // D:\ze v1.4\include\colorchat.inc(74) : error 001: expected token: ";", but found "]"
  7. // D:\ze v1.4\include\colorchat.inc(74) : error 029: invalid expression, assumed zero
  8. // D:\ze v1.4\include\colorchat.inc(74) : fatal error 107: too many error messages on one line
  9. //
  10. // Compilation aborted.
  11. // 5 Errors.
  12. // Could not locate output file D:\ze v1.4\compiled\ze_admin_coins_menu.amx (compile failed).
  13. //
  14. // Compilation Time: 2.98 sec
  15. // ----------------------------------------
Here is the code
  1. #include <zombie_escape>
  2. #include <colorchat>
  3.  
  4.  
  5.  
  6. enum _:PlayerData
  7.  
  8. {
  9.  
  10.     g_szName[32],
  11.  
  12.     g_szSteamID[32],
  13.  
  14.     g_iOption,
  15.  
  16.     g_iPlayer,
  17.  
  18.     g_iChoosen
  19.  
  20. }
  21.  
  22.  
  23.  
  24. new g_PlayerInfo[33][PlayerData]
  25.  
  26.  
  27.  
  28. new const g_szCoinsMenuItems[][] =
  29.  
  30. {
  31.  
  32.     "\yGive Coins",
  33.  
  34.     "\yTake Coins",
  35.  
  36.     "\ySet Coins^n",
  37.  
  38.     "\yReload Coins"
  39.  
  40. }
  41.  
  42.  
  43.  
  44. public plugin_init()
  45.  
  46. {
  47.  
  48.     register_plugin("Admin Menu", "3.6", "Luxurious")
  49.  
  50.     register_concmd("zecoinsmenu", "CoinsMenu")
  51.  
  52.    
  53.  
  54.     register_concmd("ENTER_Coins_NUMBER", "CoinsEntered")
  55.  
  56.     register_concmd("ENTER_Coins_Reset", "CoinsReset")
  57.  
  58. }
  59.  
  60.  
  61.  
  62. public client_authorized(id)
  63.  
  64. {
  65.  
  66.     get_user_name(id, g_PlayerInfo[id][g_szName], charsmax(g_PlayerInfo[][g_szName]))
  67.     get_user_authid(id, g_PlayerInfo[id][g_szSteamID], charsmax(g_PlayerInfo[][g_szSteamID]))
  68.  
  69. }
  70.  
  71.  
  72.  
  73. public CoinsMenu(id)
  74.  
  75. {
  76.  
  77.     new iMenuID = menu_create("\rCoins Menu \w:", "CoinsMenuHandle")
  78.  
  79.     for(new i=0; i<sizeof(g_szCoinsMenuItems); i++) menu_additem(iMenuID, g_szCoinsMenuItems[i])
  80.  
  81.     menu_display(id, iMenuID)
  82.  
  83. }
  84.  
  85.  
  86.  
  87. public CoinsMenuHandle(id, iMenuID, iItem)
  88.  
  89. {
  90.  
  91.     switch(iItem)
  92.  
  93.     {
  94.  
  95.         case 0, 1, 2:
  96.  
  97.         {
  98.  
  99.             g_PlayerInfo[id][g_iOption] = iItem+1
  100.  
  101.             ChooseCoinsPlayer(id)
  102.  
  103.         }
  104.  
  105.         case 3: client_cmd(id, "messagemode ENTER_COINS_Reset")
  106.  
  107.     }
  108.  
  109.     menu_destroy(iMenuID)
  110.  
  111.     return 0
  112.  
  113. }
  114.  
  115.  
  116.  
  117. public ChooseCoinsPlayer(id)
  118.  
  119. {
  120.  
  121.     new szItem[64], szName[33], iMenuID = menu_create("\rChoose Target \w:", "ChooseCoinsPlayerHandle")
  122.  
  123.     for(new i=0, n=0; i<=32; i++)
  124.  
  125.     {
  126.  
  127.         if(!is_user_connected(i)) continue
  128.  
  129.         g_PlayerInfo[n++][g_iPlayer] = i
  130.  
  131.         get_user_name(i, szName, charsmax(szName))
  132.  
  133.         formatex(szItem, charsmax(szItem), "\y%s - \d[\r%d\d]", szName, ze_get_escape_coins(i))
  134.  
  135.         menu_additem(iMenuID, szItem, "0", 0)
  136.  
  137.     }
  138.  
  139.     menu_display(id, iMenuID)
  140.  
  141. }
  142.  
  143.  
  144.  
  145. public ChooseCoinsPlayerHandle(id, iMenuID, iItem)
  146.  
  147. {
  148.  
  149.     g_PlayerInfo[id][g_iChoosen] = g_PlayerInfo[iItem][g_iPlayer]
  150.  
  151.     if(!is_user_connected(g_PlayerInfo[id][g_iChoosen]))
  152.  
  153.     {
  154.  
  155.     ColorChat(id, TEAM_COLOR, "^4[Admin Menu] ^1Target Not Founded In The Server.")
  156.  
  157.         return 1
  158.  
  159.     }
  160.  
  161.     client_cmd(id, "messagemode ENTER_Coins_NUMBER")
  162.  
  163.     menu_destroy(iMenuID)
  164.  
  165.     return 0
  166.  
  167. }
  168.  
  169.  
  170.  
  171. public CoinsEntered(id)
  172.  
  173. {
  174.  
  175.     new szNumber[32], iNumber, g_aName[33]
  176.  
  177.     get_user_name(id, g_aName, 32)
  178.  
  179.     read_argv(1, szNumber, charsmax(szNumber))
  180.  
  181.     iNumber = str_to_num(szNumber)
  182.  
  183.     if(!iNumber) return 1
  184.  
  185.     if(!is_user_connected(g_PlayerInfo[id][g_iChoosen]))
  186.  
  187.     {
  188.  
  189.         ColorChat(id, TEAM_COLOR, "^4[Admin Menu] ^1Target Not Founded In The Server.")
  190.  
  191.         return 1
  192.  
  193.     }
  194.  
  195.     switch(g_PlayerInfo[id][g_iOption])
  196.  
  197.     {
  198.  
  199.         case 1:
  200.  
  201.         {
  202.  
  203.             ze_set_escape_coins(g_PlayerInfo[id][g_iChoosen], ze_get_escape_coins(g_PlayerInfo[id][g_iChoosen]) + iNumber)
  204.  
  205.             ColorChat(0, TEAM_COLOR, "^4[Admin Menu] ^1Admin ^3%s ^1have Gaved ^4%i ^1Escape Coins To ^3%s.", g_aName, iNumber, g_PlayerInfo[g_PlayerInfo[id][g_iChoosen]][g_szName])
  206.  
  207.             ze_log("ADMIN %s Gaved %i Coins To %s", g_aName, iNumber, g_PlayerInfo[g_PlayerInfo[id][g_iChoosen]][g_szName])
  208.  
  209.         }
  210.  
  211.         case 2:
  212.  
  213.         {
  214.  
  215.             ze_set_escape_coins(g_PlayerInfo[id][g_iChoosen], ze_get_escape_coins(g_PlayerInfo[id][g_iChoosen]) - iNumber)
  216.  
  217.             ColorChat(0, TEAM_COLOR, "^4[Admin Menu] ^1Admin ^3%s ^1have Taked ^4%i ^1Escape Coins From ^3%s.", g_aName, iNumber, g_PlayerInfo[g_PlayerInfo[id][g_iChoosen]][g_szName])
  218.  
  219.             ze_log("ADMIN %s Taked %i Coins From %s", g_aName, iNumber, g_PlayerInfo[g_PlayerInfo[id][g_iChoosen]][g_szName])
  220.  
  221.         }
  222.  
  223.         case 3:
  224.  
  225.         {
  226.  
  227.             ze_set_escape_coins(g_PlayerInfo[id][g_iChoosen], iNumber)
  228.  
  229.             ColorChat(0, TEAM_COLOR, "^4[Admin Menu] ^1Admin ^3%s ^1have Set Coins Of ^3%s ^1To ^4%i ^1Escape Coins.", g_aName, g_PlayerInfo[g_PlayerInfo[id][g_iChoosen]][g_szName], iNumber)
  230.  
  231.             ze_log("ADMIN %s Have Set Coins Of %s To %i", g_aName, g_PlayerInfo[g_PlayerInfo[id][g_iChoosen]][g_szName], iNumber)
  232.  
  233.         }
  234.  
  235.     }
  236.  
  237.     return 0
  238.  
  239. }
  240.  
  241.  
  242.  
  243. public CoinsReset(id)
  244.  
  245. {
  246.  
  247.     new szNumber[32], iNumber, g_aName[33]
  248.  
  249.     get_user_name(id, g_aName, 32)
  250.  
  251.     read_argv(1, szNumber, charsmax(szNumber))
  252.  
  253.     iNumber = str_to_num(szNumber)
  254.  
  255.     if(!iNumber) return 1
  256.  
  257.     new iPlayers[32], iPlayerCount, i, player
  258.  
  259.     get_players(iPlayers, iPlayerCount, "a")
  260.  
  261.     for(i = 0; i < iPlayerCount; i++)
  262.  
  263.     {
  264.  
  265.         player = iPlayers[i]
  266.  
  267.         if(ze_get_escape_coins(player) >= iNumber)
  268.  
  269.             continue
  270.  
  271.         ze_set_escape_coins(player, iNumber)
  272.  
  273.     }
  274.  
  275.     ColorChat(0, TEAM_COLOR, "^4[Admin Menu] ^1Admin ^3%s ^1have Reset Coins To ^3^%i ^4Escape Coins.", g_aName, iNumber)
  276.  
  277.     ze_log("ADMIN %s Have Set Coins To %i Escape Coins", g_aName, iNumber)
  278.  
  279.     return 0
  280.  
  281. }
  282.  
  283.  
  284.  
  285. stock ze_log(const message_fmt[], any:...)
  286.  
  287. {
  288.  
  289.     static message[256], filename[32]
  290.  
  291.     vformat(message, charsmax(message), message_fmt, 2)
  292.  
  293.     formatex(filename, charsmax(filename), "ze_Adminmenu.log")
  294.  
  295.     log_to_file(filename, "%s", message)
  296.  
  297. }
DragonsXtreme Zombie-Escape V1.4
IP : 81.2.247.149:27015

User avatar
Muhammet20
Veteran Member
Veteran Member
Syria
Posts: 399
Joined: 1 Year Ago
Location: Turkey
Has thanked: 36 times
Been thanked: 5 times
Age: 13
Contact:

#2

Post by Muhammet20 » 2 Months Ago

Luxurious wrote:
2 Months Ago
i tried to convert "zp ammo menu" to ze v1.4 but i found this problems
  1. //// ze_admin_coins_menu.sma
  2. //
  3. // D:\ze v1.4\include\colorchat.inc(23) : error 021: symbol already defined: "TeamName"
  4. // D:\ze v1.4\include\colorchat.inc(74) : error 028: invalid subscript (not an array or too many subscripts): "TeamName"
  5. // D:\ze v1.4\include\colorchat.inc(74) : warning 215: expression has no effect
  6. // D:\ze v1.4\include\colorchat.inc(74) : error 001: expected token: ";", but found "]"
  7. // D:\ze v1.4\include\colorchat.inc(74) : error 029: invalid expression, assumed zero
  8. // D:\ze v1.4\include\colorchat.inc(74) : fatal error 107: too many error messages on one line
  9. //
  10. // Compilation aborted.
  11. // 5 Errors.
  12. // Could not locate output file D:\ze v1.4\compiled\ze_admin_coins_menu.amx (compile failed).
  13. //
  14. // Compilation Time: 2.98 sec
  15. // ----------------------------------------
Here is the code
  1. #include <zombie_escape>
  2. #include <colorchat>
  3.  
  4.  
  5.  
  6. enum _:PlayerData
  7.  
  8. {
  9.  
  10.     g_szName[32],
  11.  
  12.     g_szSteamID[32],
  13.  
  14.     g_iOption,
  15.  
  16.     g_iPlayer,
  17.  
  18.     g_iChoosen
  19.  
  20. }
  21.  
  22.  
  23.  
  24. new g_PlayerInfo[33][PlayerData]
  25.  
  26.  
  27.  
  28. new const g_szCoinsMenuItems[][] =
  29.  
  30. {
  31.  
  32.     "\yGive Coins",
  33.  
  34.     "\yTake Coins",
  35.  
  36.     "\ySet Coins^n",
  37.  
  38.     "\yReload Coins"
  39.  
  40. }
  41.  
  42.  
  43.  
  44. public plugin_init()
  45.  
  46. {
  47.  
  48.     register_plugin("Admin Menu", "3.6", "Luxurious")
  49.  
  50.     register_concmd("zecoinsmenu", "CoinsMenu")
  51.  
  52.    
  53.  
  54.     register_concmd("ENTER_Coins_NUMBER", "CoinsEntered")
  55.  
  56.     register_concmd("ENTER_Coins_Reset", "CoinsReset")
  57.  
  58. }
  59.  
  60.  
  61.  
  62. public client_authorized(id)
  63.  
  64. {
  65.  
  66.     get_user_name(id, g_PlayerInfo[id][g_szName], charsmax(g_PlayerInfo[][g_szName]))
  67.     get_user_authid(id, g_PlayerInfo[id][g_szSteamID], charsmax(g_PlayerInfo[][g_szSteamID]))
  68.  
  69. }
  70.  
  71.  
  72.  
  73. public CoinsMenu(id)
  74.  
  75. {
  76.  
  77.     new iMenuID = menu_create("\rCoins Menu \w:", "CoinsMenuHandle")
  78.  
  79.     for(new i=0; i<sizeof(g_szCoinsMenuItems); i++) menu_additem(iMenuID, g_szCoinsMenuItems[i])
  80.  
  81.     menu_display(id, iMenuID)
  82.  
  83. }
  84.  
  85.  
  86.  
  87. public CoinsMenuHandle(id, iMenuID, iItem)
  88.  
  89. {
  90.  
  91.     switch(iItem)
  92.  
  93.     {
  94.  
  95.         case 0, 1, 2:
  96.  
  97.         {
  98.  
  99.             g_PlayerInfo[id][g_iOption] = iItem+1
  100.  
  101.             ChooseCoinsPlayer(id)
  102.  
  103.         }
  104.  
  105.         case 3: client_cmd(id, "messagemode ENTER_COINS_Reset")
  106.  
  107.     }
  108.  
  109.     menu_destroy(iMenuID)
  110.  
  111.     return 0
  112.  
  113. }
  114.  
  115.  
  116.  
  117. public ChooseCoinsPlayer(id)
  118.  
  119. {
  120.  
  121.     new szItem[64], szName[33], iMenuID = menu_create("\rChoose Target \w:", "ChooseCoinsPlayerHandle")
  122.  
  123.     for(new i=0, n=0; i<=32; i++)
  124.  
  125.     {
  126.  
  127.         if(!is_user_connected(i)) continue
  128.  
  129.         g_PlayerInfo[n++][g_iPlayer] = i
  130.  
  131.         get_user_name(i, szName, charsmax(szName))
  132.  
  133.         formatex(szItem, charsmax(szItem), "\y%s - \d[\r%d\d]", szName, ze_get_escape_coins(i))
  134.  
  135.         menu_additem(iMenuID, szItem, "0", 0)
  136.  
  137.     }
  138.  
  139.     menu_display(id, iMenuID)
  140.  
  141. }
  142.  
  143.  
  144.  
  145. public ChooseCoinsPlayerHandle(id, iMenuID, iItem)
  146.  
  147. {
  148.  
  149.     g_PlayerInfo[id][g_iChoosen] = g_PlayerInfo[iItem][g_iPlayer]
  150.  
  151.     if(!is_user_connected(g_PlayerInfo[id][g_iChoosen]))
  152.  
  153.     {
  154.  
  155.     ColorChat(id, TEAM_COLOR, "^4[Admin Menu] ^1Target Not Founded In The Server.")
  156.  
  157.         return 1
  158.  
  159.     }
  160.  
  161.     client_cmd(id, "messagemode ENTER_Coins_NUMBER")
  162.  
  163.     menu_destroy(iMenuID)
  164.  
  165.     return 0
  166.  
  167. }
  168.  
  169.  
  170.  
  171. public CoinsEntered(id)
  172.  
  173. {
  174.  
  175.     new szNumber[32], iNumber, g_aName[33]
  176.  
  177.     get_user_name(id, g_aName, 32)
  178.  
  179.     read_argv(1, szNumber, charsmax(szNumber))
  180.  
  181.     iNumber = str_to_num(szNumber)
  182.  
  183.     if(!iNumber) return 1
  184.  
  185.     if(!is_user_connected(g_PlayerInfo[id][g_iChoosen]))
  186.  
  187.     {
  188.  
  189.         ColorChat(id, TEAM_COLOR, "^4[Admin Menu] ^1Target Not Founded In The Server.")
  190.  
  191.         return 1
  192.  
  193.     }
  194.  
  195.     switch(g_PlayerInfo[id][g_iOption])
  196.  
  197.     {
  198.  
  199.         case 1:
  200.  
  201.         {
  202.  
  203.             ze_set_escape_coins(g_PlayerInfo[id][g_iChoosen], ze_get_escape_coins(g_PlayerInfo[id][g_iChoosen]) + iNumber)
  204.  
  205.             ColorChat(0, TEAM_COLOR, "^4[Admin Menu] ^1Admin ^3%s ^1have Gaved ^4%i ^1Escape Coins To ^3%s.", g_aName, iNumber, g_PlayerInfo[g_PlayerInfo[id][g_iChoosen]][g_szName])
  206.  
  207.             ze_log("ADMIN %s Gaved %i Coins To %s", g_aName, iNumber, g_PlayerInfo[g_PlayerInfo[id][g_iChoosen]][g_szName])
  208.  
  209.         }
  210.  
  211.         case 2:
  212.  
  213.         {
  214.  
  215.             ze_set_escape_coins(g_PlayerInfo[id][g_iChoosen], ze_get_escape_coins(g_PlayerInfo[id][g_iChoosen]) - iNumber)
  216.  
  217.             ColorChat(0, TEAM_COLOR, "^4[Admin Menu] ^1Admin ^3%s ^1have Taked ^4%i ^1Escape Coins From ^3%s.", g_aName, iNumber, g_PlayerInfo[g_PlayerInfo[id][g_iChoosen]][g_szName])
  218.  
  219.             ze_log("ADMIN %s Taked %i Coins From %s", g_aName, iNumber, g_PlayerInfo[g_PlayerInfo[id][g_iChoosen]][g_szName])
  220.  
  221.         }
  222.  
  223.         case 3:
  224.  
  225.         {
  226.  
  227.             ze_set_escape_coins(g_PlayerInfo[id][g_iChoosen], iNumber)
  228.  
  229.             ColorChat(0, TEAM_COLOR, "^4[Admin Menu] ^1Admin ^3%s ^1have Set Coins Of ^3%s ^1To ^4%i ^1Escape Coins.", g_aName, g_PlayerInfo[g_PlayerInfo[id][g_iChoosen]][g_szName], iNumber)
  230.  
  231.             ze_log("ADMIN %s Have Set Coins Of %s To %i", g_aName, g_PlayerInfo[g_PlayerInfo[id][g_iChoosen]][g_szName], iNumber)
  232.  
  233.         }
  234.  
  235.     }
  236.  
  237.     return 0
  238.  
  239. }
  240.  
  241.  
  242.  
  243. public CoinsReset(id)
  244.  
  245. {
  246.  
  247.     new szNumber[32], iNumber, g_aName[33]
  248.  
  249.     get_user_name(id, g_aName, 32)
  250.  
  251.     read_argv(1, szNumber, charsmax(szNumber))
  252.  
  253.     iNumber = str_to_num(szNumber)
  254.  
  255.     if(!iNumber) return 1
  256.  
  257.     new iPlayers[32], iPlayerCount, i, player
  258.  
  259.     get_players(iPlayers, iPlayerCount, "a")
  260.  
  261.     for(i = 0; i < iPlayerCount; i++)
  262.  
  263.     {
  264.  
  265.         player = iPlayers[i]
  266.  
  267.         if(ze_get_escape_coins(player) >= iNumber)
  268.  
  269.             continue
  270.  
  271.         ze_set_escape_coins(player, iNumber)
  272.  
  273.     }
  274.  
  275.     ColorChat(0, TEAM_COLOR, "^4[Admin Menu] ^1Admin ^3%s ^1have Reset Coins To ^3^%i ^4Escape Coins.", g_aName, iNumber)
  276.  
  277.     ze_log("ADMIN %s Have Set Coins To %i Escape Coins", g_aName, iNumber)
  278.  
  279.     return 0
  280.  
  281. }
  282.  
  283.  
  284.  
  285. stock ze_log(const message_fmt[], any:...)
  286.  
  287. {
  288.  
  289.     static message[256], filename[32]
  290.  
  291.     vformat(message, charsmax(message), message_fmt, 2)
  292.  
  293.     formatex(filename, charsmax(filename), "ze_Adminmenu.log")
  294.  
  295.     log_to_file(filename, "%s", message)
  296.  
  297. }
your problem is not from the code
it's from the colorchat.inc include file
try to change it:
colorchat.inc
(2.48 KiB) Downloaded 9 times
colorchat.inc
(2.48 KiB) Downloaded 9 times
.::Kaya Gaming || Never Give Up || Zombie Escape::. [Server is Under The Work]
https://kaya-gaming.ga/

I just believe in two things, First thing is who i see in the mirror, second thing is who i don't see in the sky.

User avatar
Luxurious
Senior Member
Senior Member
Egypt
Posts: 144
Joined: 1 Year Ago
Location: Egypt
Has thanked: 3 times
Been thanked: 4 times
Contact:

#3

Post by Luxurious » 2 Months Ago

Muhammet20 wrote:
2 Months Ago
Luxurious wrote:
2 Months Ago
i tried to convert "zp ammo menu" to ze v1.4 but i found this problems
  1. //// ze_admin_coins_menu.sma
  2. //
  3. // D:\ze v1.4\include\colorchat.inc(23) : error 021: symbol already defined: "TeamName"
  4. // D:\ze v1.4\include\colorchat.inc(74) : error 028: invalid subscript (not an array or too many subscripts): "TeamName"
  5. // D:\ze v1.4\include\colorchat.inc(74) : warning 215: expression has no effect
  6. // D:\ze v1.4\include\colorchat.inc(74) : error 001: expected token: ";", but found "]"
  7. // D:\ze v1.4\include\colorchat.inc(74) : error 029: invalid expression, assumed zero
  8. // D:\ze v1.4\include\colorchat.inc(74) : fatal error 107: too many error messages on one line
  9. //
  10. // Compilation aborted.
  11. // 5 Errors.
  12. // Could not locate output file D:\ze v1.4\compiled\ze_admin_coins_menu.amx (compile failed).
  13. //
  14. // Compilation Time: 2.98 sec
  15. // ----------------------------------------
Here is the code
  1. #include <zombie_escape>
  2. #include <colorchat>
  3.  
  4.  
  5.  
  6. enum _:PlayerData
  7.  
  8. {
  9.  
  10.     g_szName[32],
  11.  
  12.     g_szSteamID[32],
  13.  
  14.     g_iOption,
  15.  
  16.     g_iPlayer,
  17.  
  18.     g_iChoosen
  19.  
  20. }
  21.  
  22.  
  23.  
  24. new g_PlayerInfo[33][PlayerData]
  25.  
  26.  
  27.  
  28. new const g_szCoinsMenuItems[][] =
  29.  
  30. {
  31.  
  32.     "\yGive Coins",
  33.  
  34.     "\yTake Coins",
  35.  
  36.     "\ySet Coins^n",
  37.  
  38.     "\yReload Coins"
  39.  
  40. }
  41.  
  42.  
  43.  
  44. public plugin_init()
  45.  
  46. {
  47.  
  48.     register_plugin("Admin Menu", "3.6", "Luxurious")
  49.  
  50.     register_concmd("zecoinsmenu", "CoinsMenu")
  51.  
  52.    
  53.  
  54.     register_concmd("ENTER_Coins_NUMBER", "CoinsEntered")
  55.  
  56.     register_concmd("ENTER_Coins_Reset", "CoinsReset")
  57.  
  58. }
  59.  
  60.  
  61.  
  62. public client_authorized(id)
  63.  
  64. {
  65.  
  66.     get_user_name(id, g_PlayerInfo[id][g_szName], charsmax(g_PlayerInfo[][g_szName]))
  67.     get_user_authid(id, g_PlayerInfo[id][g_szSteamID], charsmax(g_PlayerInfo[][g_szSteamID]))
  68.  
  69. }
  70.  
  71.  
  72.  
  73. public CoinsMenu(id)
  74.  
  75. {
  76.  
  77.     new iMenuID = menu_create("\rCoins Menu \w:", "CoinsMenuHandle")
  78.  
  79.     for(new i=0; i<sizeof(g_szCoinsMenuItems); i++) menu_additem(iMenuID, g_szCoinsMenuItems[i])
  80.  
  81.     menu_display(id, iMenuID)
  82.  
  83. }
  84.  
  85.  
  86.  
  87. public CoinsMenuHandle(id, iMenuID, iItem)
  88.  
  89. {
  90.  
  91.     switch(iItem)
  92.  
  93.     {
  94.  
  95.         case 0, 1, 2:
  96.  
  97.         {
  98.  
  99.             g_PlayerInfo[id][g_iOption] = iItem+1
  100.  
  101.             ChooseCoinsPlayer(id)
  102.  
  103.         }
  104.  
  105.         case 3: client_cmd(id, "messagemode ENTER_COINS_Reset")
  106.  
  107.     }
  108.  
  109.     menu_destroy(iMenuID)
  110.  
  111.     return 0
  112.  
  113. }
  114.  
  115.  
  116.  
  117. public ChooseCoinsPlayer(id)
  118.  
  119. {
  120.  
  121.     new szItem[64], szName[33], iMenuID = menu_create("\rChoose Target \w:", "ChooseCoinsPlayerHandle")
  122.  
  123.     for(new i=0, n=0; i<=32; i++)
  124.  
  125.     {
  126.  
  127.         if(!is_user_connected(i)) continue
  128.  
  129.         g_PlayerInfo[n++][g_iPlayer] = i
  130.  
  131.         get_user_name(i, szName, charsmax(szName))
  132.  
  133.         formatex(szItem, charsmax(szItem), "\y%s - \d[\r%d\d]", szName, ze_get_escape_coins(i))
  134.  
  135.         menu_additem(iMenuID, szItem, "0", 0)
  136.  
  137.     }
  138.  
  139.     menu_display(id, iMenuID)
  140.  
  141. }
  142.  
  143.  
  144.  
  145. public ChooseCoinsPlayerHandle(id, iMenuID, iItem)
  146.  
  147. {
  148.  
  149.     g_PlayerInfo[id][g_iChoosen] = g_PlayerInfo[iItem][g_iPlayer]
  150.  
  151.     if(!is_user_connected(g_PlayerInfo[id][g_iChoosen]))
  152.  
  153.     {
  154.  
  155.     ColorChat(id, TEAM_COLOR, "^4[Admin Menu] ^1Target Not Founded In The Server.")
  156.  
  157.         return 1
  158.  
  159.     }
  160.  
  161.     client_cmd(id, "messagemode ENTER_Coins_NUMBER")
  162.  
  163.     menu_destroy(iMenuID)
  164.  
  165.     return 0
  166.  
  167. }
  168.  
  169.  
  170.  
  171. public CoinsEntered(id)
  172.  
  173. {
  174.  
  175.     new szNumber[32], iNumber, g_aName[33]
  176.  
  177.     get_user_name(id, g_aName, 32)
  178.  
  179.     read_argv(1, szNumber, charsmax(szNumber))
  180.  
  181.     iNumber = str_to_num(szNumber)
  182.  
  183.     if(!iNumber) return 1
  184.  
  185.     if(!is_user_connected(g_PlayerInfo[id][g_iChoosen]))
  186.  
  187.     {
  188.  
  189.         ColorChat(id, TEAM_COLOR, "^4[Admin Menu] ^1Target Not Founded In The Server.")
  190.  
  191.         return 1
  192.  
  193.     }
  194.  
  195.     switch(g_PlayerInfo[id][g_iOption])
  196.  
  197.     {
  198.  
  199.         case 1:
  200.  
  201.         {
  202.  
  203.             ze_set_escape_coins(g_PlayerInfo[id][g_iChoosen], ze_get_escape_coins(g_PlayerInfo[id][g_iChoosen]) + iNumber)
  204.  
  205.             ColorChat(0, TEAM_COLOR, "^4[Admin Menu] ^1Admin ^3%s ^1have Gaved ^4%i ^1Escape Coins To ^3%s.", g_aName, iNumber, g_PlayerInfo[g_PlayerInfo[id][g_iChoosen]][g_szName])
  206.  
  207.             ze_log("ADMIN %s Gaved %i Coins To %s", g_aName, iNumber, g_PlayerInfo[g_PlayerInfo[id][g_iChoosen]][g_szName])
  208.  
  209.         }
  210.  
  211.         case 2:
  212.  
  213.         {
  214.  
  215.             ze_set_escape_coins(g_PlayerInfo[id][g_iChoosen], ze_get_escape_coins(g_PlayerInfo[id][g_iChoosen]) - iNumber)
  216.  
  217.             ColorChat(0, TEAM_COLOR, "^4[Admin Menu] ^1Admin ^3%s ^1have Taked ^4%i ^1Escape Coins From ^3%s.", g_aName, iNumber, g_PlayerInfo[g_PlayerInfo[id][g_iChoosen]][g_szName])
  218.  
  219.             ze_log("ADMIN %s Taked %i Coins From %s", g_aName, iNumber, g_PlayerInfo[g_PlayerInfo[id][g_iChoosen]][g_szName])
  220.  
  221.         }
  222.  
  223.         case 3:
  224.  
  225.         {
  226.  
  227.             ze_set_escape_coins(g_PlayerInfo[id][g_iChoosen], iNumber)
  228.  
  229.             ColorChat(0, TEAM_COLOR, "^4[Admin Menu] ^1Admin ^3%s ^1have Set Coins Of ^3%s ^1To ^4%i ^1Escape Coins.", g_aName, g_PlayerInfo[g_PlayerInfo[id][g_iChoosen]][g_szName], iNumber)
  230.  
  231.             ze_log("ADMIN %s Have Set Coins Of %s To %i", g_aName, g_PlayerInfo[g_PlayerInfo[id][g_iChoosen]][g_szName], iNumber)
  232.  
  233.         }
  234.  
  235.     }
  236.  
  237.     return 0
  238.  
  239. }
  240.  
  241.  
  242.  
  243. public CoinsReset(id)
  244.  
  245. {
  246.  
  247.     new szNumber[32], iNumber, g_aName[33]
  248.  
  249.     get_user_name(id, g_aName, 32)
  250.  
  251.     read_argv(1, szNumber, charsmax(szNumber))
  252.  
  253.     iNumber = str_to_num(szNumber)
  254.  
  255.     if(!iNumber) return 1
  256.  
  257.     new iPlayers[32], iPlayerCount, i, player
  258.  
  259.     get_players(iPlayers, iPlayerCount, "a")
  260.  
  261.     for(i = 0; i < iPlayerCount; i++)
  262.  
  263.     {
  264.  
  265.         player = iPlayers[i]
  266.  
  267.         if(ze_get_escape_coins(player) >= iNumber)
  268.  
  269.             continue
  270.  
  271.         ze_set_escape_coins(player, iNumber)
  272.  
  273.     }
  274.  
  275.     ColorChat(0, TEAM_COLOR, "^4[Admin Menu] ^1Admin ^3%s ^1have Reset Coins To ^3^%i ^4Escape Coins.", g_aName, iNumber)
  276.  
  277.     ze_log("ADMIN %s Have Set Coins To %i Escape Coins", g_aName, iNumber)
  278.  
  279.     return 0
  280.  
  281. }
  282.  
  283.  
  284.  
  285. stock ze_log(const message_fmt[], any:...)
  286.  
  287. {
  288.  
  289.     static message[256], filename[32]
  290.  
  291.     vformat(message, charsmax(message), message_fmt, 2)
  292.  
  293.     formatex(filename, charsmax(filename), "ze_Adminmenu.log")
  294.  
  295.     log_to_file(filename, "%s", message)
  296.  
  297. }
your problem is not from the code
it's from the colorchat.inc include file
try to change it:
colorchat.inc
i did but still the same problem
DragonsXtreme Zombie-Escape V1.4
IP : 81.2.247.149:27015

User avatar
Muhammet20
Veteran Member
Veteran Member
Syria
Posts: 399
Joined: 1 Year Ago
Location: Turkey
Has thanked: 36 times
Been thanked: 5 times
Age: 13
Contact:

#4

Post by Muhammet20 » 2 Months Ago

ask @Raheem
.::Kaya Gaming || Never Give Up || Zombie Escape::. [Server is Under The Work]
https://kaya-gaming.ga/

I just believe in two things, First thing is who i see in the mirror, second thing is who i don't see in the sky.

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

#5

Post by Raheem » 2 Months Ago

Compiling without problems:
You don't know? Learn and you will know.

User avatar
Luxurious
Senior Member
Senior Member
Egypt
Posts: 144
Joined: 1 Year Ago
Location: Egypt
Has thanked: 3 times
Been thanked: 4 times
Contact:

#6

Post by Luxurious » 2 Months Ago

Raheem wrote:
2 Months Ago
Compiling without problems:
  • compiled.amxx
so what`s problem in my compail ?
DragonsXtreme Zombie-Escape V1.4
IP : 81.2.247.149:27015

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

#7

Post by Raheem » 2 Months Ago

Use this include:
You don't know? Learn and you will know.

User avatar
Luxurious
Senior Member
Senior Member
Egypt
Posts: 144
Joined: 1 Year Ago
Location: Egypt
Has thanked: 3 times
Been thanked: 4 times
Contact:

#8

Post by Luxurious » 2 Months Ago

Thx , Its Worked !
DragonsXtreme Zombie-Escape V1.4
IP : 81.2.247.149:27015

User avatar
Muhammet20
Veteran Member
Veteran Member
Syria
Posts: 399
Joined: 1 Year Ago
Location: Turkey
Has thanked: 36 times
Been thanked: 5 times
Age: 13
Contact:

#9

Post by Muhammet20 » 1 Month Ago

@Raheem or @Mohamed Alaa Mark this as Resolved

[ Post made via Android ]
.::Kaya Gaming || Never Give Up || Zombie Escape::. [Server is Under The Work]
https://kaya-gaming.ga/

I just believe in two things, First thing is who i see in the mirror, second thing is who i don't see in the sky.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests