Page 6 of 7

Re: Chat Prefix

Posted: 27 Aug 2018, 01:51
by Mark
Jack GamePlay wrote:
11 Months Ago
czirimbolo wrote:
11 Months Ago
here is my ini. file, I didnt change anything, just uploaded his file

Code: Select all

// Zombie escape chat prefixes
// Syntax is:
// "Prefix" "Access for it"

// Notes:
// Check users.ini for the access letters
// Don't add any custom characters in access such as:
// #, ; , % , etc.. or even space
// Those are some examples i've provided.

"Owner" "g"
"Admin" "bcde"
"VIP" "t"
"User" "z"
Try this AMXX file.
Where the sma for this amxx file?

Also

How can i set it to read from vip.ini so if someone has vip if will give them that tag?

Re: Chat Prefix

Posted: 27 Aug 2018, 17:18
by Spir0x
Jack GamePlay wrote:
11 Months Ago
czirimbolo wrote:
11 Months Ago
here is my ini. file, I didnt change anything, just uploaded his file

Code: Select all

// Zombie escape chat prefixes
// Syntax is:
// "Prefix" "Access for it"

// Notes:
// Check users.ini for the access letters
// Don't add any custom characters in access such as:
// #, ; , % , etc.. or even space
// Those are some examples i've provided.

"Owner" "g"
"Admin" "bcde"
"VIP" "t"
"User" "z"
Try this AMXX file.
Jack please give me the SMA file !! you're sma one in the rar showing only levels without the other prefixes.

Re: Chat Prefix

Posted: 28 Aug 2018, 15:01
by Jack GamePlay
RapidFlush wrote:
10 Months Ago

Where the sma for this amxx file?

Also

How can i set it to read from vip.ini so if someone has vip if will give them that tag?
Why do you want to do this?
You can already set a default VIP flag in ze_customprefixes & make that's prefix VIP.
Spir0x wrote:
10 Months Ago
Jack please give me the SMA file !! you're sma one in the rar showing only levels without the other prefixes.
Here you both the code.
Try it.
  1. #include <zombie_escape>
  2. #include <ze_levels>
  3.  
  4. // Custom prefixes file
  5. new const ZE_CUSTOMPREFIX[] = "ze_customprefix"
  6.  
  7. // Edit each prefix class here
  8. /* There are 3 colors:
  9.  *  ^1 => Yellow
  10.  *  ^4 => Green
  11.  *  ^3 => Team color => blue for CT, red for T, white/gray for Spec
  12. */
  13.  
  14. new const szCT_Prefix[] = "^3Humans"
  15. new const szT_Prefix[] = "^3Zombies"
  16. new const szSpecT_Prefix[] = "^3Spectators"
  17. new const szDead_Prefix[] = "^4Dead"
  18. new const szLevel_Prefix[] = "^4Level"
  19.  
  20. new g_szPrefixPrefixes[32], g_szFile[64]
  21. new g_iMaxPlayers, g_iSayText
  22. new g_pCvarLogMessages
  23. new Array:g_szPrefixes, Array:g_szFlags
  24.  
  25. new const g_szReservedChars[] = {
  26.     ';', '$', '#', '*', '!',
  27.     '@', '%', '&', '(', ')',
  28.     '[', ']', '>', '<', EOS
  29. }
  30.  
  31. public plugin_init()
  32. {
  33.     register_plugin("[ZE] Addons: Prefixes", "1.3", "Jack GamePlay")
  34.  
  35.     register_clcmd("say", "Hook_Say")
  36.     register_clcmd("say_team", "Hook_SayTeam")
  37.  
  38.     g_pCvarLogMessages = register_cvar("ze_log_messages", "0")
  39.  
  40.     g_iMaxPlayers = get_member_game(m_nMaxPlayers)
  41.     g_iSayText = get_user_msgid("SayText")
  42.  
  43.     register_message(g_iSayText, "BlockDoubleMessages")
  44.  
  45.     get_configsdir(g_szFile, charsmax(g_szFile))
  46.     formatex(g_szFile, charsmax(g_szFile), "%s/%s.ini", g_szFile, ZE_CUSTOMPREFIX)
  47.  
  48.     g_szPrefixes = ArrayCreate(32, 1)
  49.     g_szFlags = ArrayCreate(32, 1)
  50. }
  51.  
  52. public BlockDoubleMessages()
  53. {
  54.     return PLUGIN_HANDLED
  55. }
  56.  
  57. public Hook_Say(id)
  58. {
  59.     if (!is_user_connected(id))
  60.         return PLUGIN_CONTINUE
  61.  
  62.     new szName[32], iLevelNum, szMessage[200], szPrefixes[64]
  63.     get_user_name(id, szName, charsmax(szName))
  64.     iLevelNum = ze_get_user_level(id)
  65.     read_args(szMessage, charsmax(szMessage))
  66.     remove_quotes(szMessage)
  67.     trim(szMessage)
  68.    
  69.     for(new iChar = 0; iChar <= charsmax(szMessage); iChar++)
  70.     {
  71.         if (szMessage[iChar] == '^2' || szMessage[iChar] == '^3' || szMessage[iChar] == '^4')
  72.             szMessage[iChar] = '^1'
  73.     }
  74.  
  75.     if (!is_valid_msg(szMessage))
  76.         return PLUGIN_CONTINUE
  77.  
  78.     LookUPPrefixes(id)
  79.  
  80.     if (strlen(g_szPrefixPrefixes))
  81.         formatex(szPrefixes, charsmax(szPrefixes), "^4%s ^1| %s^1: ^3%i", g_szPrefixPrefixes, szLevel_Prefix, iLevelNum)
  82.     else
  83.         formatex(szPrefixes, charsmax(szPrefixes), "%s^1: ^3%i", szLevel_Prefix, iLevelNum)
  84.  
  85.     // Message format
  86.     if (is_user_alive(id))
  87.         format(szMessage, charsmax(szMessage), "^1[%s^1] ^3%s ^1: ^1%s", szPrefixes, szName, szMessage)
  88.     else
  89.         format(szMessage, charsmax(szMessage), "^1[%s ^1| %s^1] ^3%s ^1: ^1%s", szDead_Prefix, szPrefixes, szName, szMessage)
  90.  
  91.     // Send the message
  92.     for (new i = 1; i <= g_iMaxPlayers; i++)
  93.     {
  94.         if (!is_user_connected(i))
  95.             continue
  96.  
  97.         Send_Message(szMessage, id, i)
  98.     }
  99.  
  100.     // Log messages
  101.     if (get_pcvar_num(g_pCvarLogMessages))
  102.     {
  103.         new szSteamID[36], szIP[16]
  104.         get_user_authid(id, szSteamID, charsmax(szSteamID))
  105.         get_user_ip(id, szIP, charsmax(szIP), 1)
  106.         Log_Messages("[%s|%s] %s", szSteamID, szIP, szMessage)
  107.     }
  108.    
  109.     return PLUGIN_CONTINUE
  110. }
  111.  
  112. public Hook_SayTeam(id)
  113. {  
  114.     if (!is_user_connected(id))
  115.         return PLUGIN_CONTINUE
  116.        
  117.     new szName[32], szMessage[200], szTeamName[32], szPrefixes[64], iLevelNum
  118.     get_user_name(id, szName, charsmax(szName))
  119.     iLevelNum = ze_get_user_level(id)
  120.     read_args(szMessage, charsmax(szMessage))
  121.     remove_quotes(szMessage)
  122.     trim(szMessage)
  123.  
  124.     for(new iChar = 0; iChar <= charsmax(szMessage); iChar++)
  125.     {
  126.         if (szMessage[iChar] == '^2' || szMessage[iChar] == '^3' || szMessage[iChar] == '^4')
  127.             szMessage[iChar] = '^1'
  128.     }
  129.  
  130.     if (!is_valid_msg(szMessage))
  131.         return PLUGIN_CONTINUE
  132.  
  133.     // Team check
  134.     switch(get_member(id, m_iTeam))
  135.     {
  136.         case TEAM_CT: formatex(szTeamName, charsmax(szTeamName), szCT_Prefix)
  137.         case TEAM_TERRORIST: formatex(szTeamName, charsmax(szTeamName), szT_Prefix)
  138.         case TEAM_SPECTATOR: formatex(szTeamName, charsmax(szTeamName), szSpecT_Prefix)
  139.     }
  140.  
  141.     LookUPPrefixes(id)
  142.  
  143.     // Prefixes check
  144.     if (strlen(g_szPrefixPrefixes))
  145.         formatex(szPrefixes, charsmax(szPrefixes), "^4%s ^1| %s^1: ^3%i", g_szPrefixPrefixes, szLevel_Prefix, iLevelNum)
  146.     else
  147.         formatex(szPrefixes, charsmax(szPrefixes), "%s^1: ^3%i", szLevel_Prefix, iLevelNum)
  148.  
  149.     // Message foramt
  150.     if(is_user_alive(id))
  151.         format(szMessage, charsmax(szMessage), "^1(%s^1) [%s^1] ^3%s ^1: ^1%s", szTeamName, szPrefixes, szName, szMessage)
  152.     else
  153.         format(szMessage, charsmax(szMessage), "^1(%s^1) [%s ^1| %s^1] ^3%s ^1: ^1%s", szTeamName, szDead_Prefix, szPrefixes, szName, szMessage)
  154.  
  155.     // Send the message
  156.     for (new i = 1; i <= g_iMaxPlayers; i++)
  157.     {
  158.         if(!is_user_connected(i) || get_user_team(i) != get_user_team(id))
  159.             continue
  160.  
  161.         Send_Message(szMessage, id, i)
  162.     }
  163.  
  164.     // Log messages
  165.     if (get_pcvar_num(g_pCvarLogMessages))
  166.     {
  167.         new szSteamID[36], szIP[16]
  168.         get_user_authid(id, szSteamID, charsmax(szSteamID))
  169.         get_user_ip(id, szIP, charsmax(szIP), 1)
  170.         Log_Messages("[%s|%s] - %s", szSteamID, szIP, szMessage)
  171.     }
  172.    
  173.     return PLUGIN_CONTINUE
  174. }
  175.  
  176. bool:is_valid_msg(const szMessage[])
  177. {
  178.     if (szMessage[0] == '@' || !strlen(szMessage) || szMessage[0] == '/' || szMessage[0] == '#')
  179.         return false
  180.        
  181.     return true
  182. }
  183.  
  184. stock Log_Messages(const szMessage_Fmt[], any:...)
  185. {
  186.     static szMessage[256], szFileName[32], szDate[16]
  187.     vformat(szMessage, charsmax(szMessage), szMessage_Fmt, 2)
  188.     replace_all(szMessage, charsmax(szMessage), "^4", "")
  189.     replace_all(szMessage, charsmax(szMessage), "^1", "")
  190.     replace_all(szMessage, charsmax(szMessage), "^1", "")
  191.     replace_all(szMessage, charsmax(szMessage), "^3", "")
  192.     format_time(szDate, charsmax(szDate), "%d%m%Y")
  193.     formatex(szFileName, charsmax(szFileName), "ZE_Messages_%s.log", szDate)
  194.     log_to_file(szFileName, "%s", szMessage)
  195. }
  196.  
  197. stock Send_Message(const szMessage[], const id, const iIndex)
  198. {
  199.     message_begin(MSG_ONE, g_iSayText, {0, 0, 0}, iIndex)
  200.     write_byte(id)
  201.     write_string(szMessage)
  202.     message_end()
  203. }
  204.  
  205. public ReadLines()
  206. {
  207.     if (file_exists(g_szFile))
  208.     {
  209.         new OpennedFile = fopen(g_szFile, "rt"),
  210.             szLineToRead[129], szPrefixFlags[32], szPrefixPrefix[32]
  211.  
  212.         if (!OpennedFile)
  213.             return
  214.        
  215.         while (!feof(OpennedFile))
  216.         {
  217.             fgets(OpennedFile, szLineToRead, charsmax(szLineToRead))
  218.  
  219.             if ((szLineToRead[0] == '/' && szLineToRead[1] == '/'))
  220.                 continue
  221.  
  222.             for (new iIndex = 0; iIndex <= charsmax(g_szReservedChars); iIndex++)
  223.             {
  224.                 if (equal(szLineToRead[0], g_szReservedChars[iIndex]))
  225.                     continue
  226.             }
  227.            
  228.             remove_quotes(szLineToRead)
  229.             trim(szLineToRead)
  230.             parse(szLineToRead, szPrefixPrefix, charsmax(szPrefixPrefix), szPrefixFlags, charsmax(szPrefixFlags))
  231.             ArrayPushString(g_szPrefixes, szPrefixPrefix)
  232.             ArrayPushString(g_szFlags, szPrefixFlags)
  233.         }
  234.        
  235.         fclose(OpennedFile)
  236.     }
  237.     else
  238.     {
  239.         set_fail_state("File %s is not found.", g_szFile)
  240.     }
  241. }
  242.  
  243. public LookUPPrefixes(id)
  244. {
  245.     ReadLines()
  246.  
  247.     new szPrefixFlags[32], iIndex, szPrefixPrefix[32]
  248.     for (iIndex = 0; iIndex < ArraySize(g_szFlags); iIndex++)
  249.     {
  250.         ArrayGetString(g_szFlags, iIndex, szPrefixFlags, charsmax(szPrefixFlags))
  251.  
  252.         if (access(id, read_flags(szPrefixFlags)))
  253.         {
  254.             ArrayGetString(g_szPrefixes, iIndex, szPrefixPrefix, charsmax(szPrefixPrefix))
  255.             copy(g_szPrefixPrefixes, charsmax(g_szPrefixPrefixes), szPrefixPrefix)
  256.             break
  257.         }
  258.     }
  259. }

Re: Chat Prefix

Posted: 28 Aug 2018, 23:25
by Mark
Jack GamePlay wrote:
10 Months Ago
RapidFlush wrote:
10 Months Ago

Where the sma for this amxx file?

Also

How can i set it to read from vip.ini so if someone has vip if will give them that tag?
Why do you want to do this?
You can already set a default VIP flag in ze_customprefixes & make that's prefix VIP.
Spir0x wrote:
10 Months Ago
Jack please give me the SMA file !! you're sma one in the rar showing only levels without the other prefixes.
Here you both the code.
Try it.
  1. #include <zombie_escape>
  2. #include <ze_levels>
  3.  
  4. // Custom prefixes file
  5. new const ZE_CUSTOMPREFIX[] = "ze_customprefix"
  6.  
  7. // Edit each prefix class here
  8. /* There are 3 colors:
  9.  *  ^1 => Yellow
  10.  *  ^4 => Green
  11.  *  ^3 => Team color => blue for CT, red for T, white/gray for Spec
  12. */
  13.  
  14. new const szCT_Prefix[] = "^3Humans"
  15. new const szT_Prefix[] = "^3Zombies"
  16. new const szSpecT_Prefix[] = "^3Spectators"
  17. new const szDead_Prefix[] = "^4Dead"
  18. new const szLevel_Prefix[] = "^4Level"
  19.  
  20. new g_szPrefixPrefixes[32], g_szFile[64]
  21. new g_iMaxPlayers, g_iSayText
  22. new g_pCvarLogMessages
  23. new Array:g_szPrefixes, Array:g_szFlags
  24.  
  25. new const g_szReservedChars[] = {
  26.     ';', '$', '#', '*', '!',
  27.     '@', '%', '&', '(', ')',
  28.     '[', ']', '>', '<', EOS
  29. }
  30.  
  31. public plugin_init()
  32. {
  33.     register_plugin("[ZE] Addons: Prefixes", "1.3", "Jack GamePlay")
  34.  
  35.     register_clcmd("say", "Hook_Say")
  36.     register_clcmd("say_team", "Hook_SayTeam")
  37.  
  38.     g_pCvarLogMessages = register_cvar("ze_log_messages", "0")
  39.  
  40.     g_iMaxPlayers = get_member_game(m_nMaxPlayers)
  41.     g_iSayText = get_user_msgid("SayText")
  42.  
  43.     register_message(g_iSayText, "BlockDoubleMessages")
  44.  
  45.     get_configsdir(g_szFile, charsmax(g_szFile))
  46.     formatex(g_szFile, charsmax(g_szFile), "%s/%s.ini", g_szFile, ZE_CUSTOMPREFIX)
  47.  
  48.     g_szPrefixes = ArrayCreate(32, 1)
  49.     g_szFlags = ArrayCreate(32, 1)
  50. }
  51.  
  52. public BlockDoubleMessages()
  53. {
  54.     return PLUGIN_HANDLED
  55. }
  56.  
  57. public Hook_Say(id)
  58. {
  59.     if (!is_user_connected(id))
  60.         return PLUGIN_CONTINUE
  61.  
  62.     new szName[32], iLevelNum, szMessage[200], szPrefixes[64]
  63.     get_user_name(id, szName, charsmax(szName))
  64.     iLevelNum = ze_get_user_level(id)
  65.     read_args(szMessage, charsmax(szMessage))
  66.     remove_quotes(szMessage)
  67.     trim(szMessage)
  68.    
  69.     for(new iChar = 0; iChar <= charsmax(szMessage); iChar++)
  70.     {
  71.         if (szMessage[iChar] == '^2' || szMessage[iChar] == '^3' || szMessage[iChar] == '^4')
  72.             szMessage[iChar] = '^1'
  73.     }
  74.  
  75.     if (!is_valid_msg(szMessage))
  76.         return PLUGIN_CONTINUE
  77.  
  78.     LookUPPrefixes(id)
  79.  
  80.     if (strlen(g_szPrefixPrefixes))
  81.         formatex(szPrefixes, charsmax(szPrefixes), "^4%s ^1| %s^1: ^3%i", g_szPrefixPrefixes, szLevel_Prefix, iLevelNum)
  82.     else
  83.         formatex(szPrefixes, charsmax(szPrefixes), "%s^1: ^3%i", szLevel_Prefix, iLevelNum)
  84.  
  85.     // Message format
  86.     if (is_user_alive(id))
  87.         format(szMessage, charsmax(szMessage), "^1[%s^1] ^3%s ^1: ^1%s", szPrefixes, szName, szMessage)
  88.     else
  89.         format(szMessage, charsmax(szMessage), "^1[%s ^1| %s^1] ^3%s ^1: ^1%s", szDead_Prefix, szPrefixes, szName, szMessage)
  90.  
  91.     // Send the message
  92.     for (new i = 1; i <= g_iMaxPlayers; i++)
  93.     {
  94.         if (!is_user_connected(i))
  95.             continue
  96.  
  97.         Send_Message(szMessage, id, i)
  98.     }
  99.  
  100.     // Log messages
  101.     if (get_pcvar_num(g_pCvarLogMessages))
  102.     {
  103.         new szSteamID[36], szIP[16]
  104.         get_user_authid(id, szSteamID, charsmax(szSteamID))
  105.         get_user_ip(id, szIP, charsmax(szIP), 1)
  106.         Log_Messages("[%s|%s] %s", szSteamID, szIP, szMessage)
  107.     }
  108.    
  109.     return PLUGIN_CONTINUE
  110. }
  111.  
  112. public Hook_SayTeam(id)
  113. {  
  114.     if (!is_user_connected(id))
  115.         return PLUGIN_CONTINUE
  116.        
  117.     new szName[32], szMessage[200], szTeamName[32], szPrefixes[64], iLevelNum
  118.     get_user_name(id, szName, charsmax(szName))
  119.     iLevelNum = ze_get_user_level(id)
  120.     read_args(szMessage, charsmax(szMessage))
  121.     remove_quotes(szMessage)
  122.     trim(szMessage)
  123.  
  124.     for(new iChar = 0; iChar <= charsmax(szMessage); iChar++)
  125.     {
  126.         if (szMessage[iChar] == '^2' || szMessage[iChar] == '^3' || szMessage[iChar] == '^4')
  127.             szMessage[iChar] = '^1'
  128.     }
  129.  
  130.     if (!is_valid_msg(szMessage))
  131.         return PLUGIN_CONTINUE
  132.  
  133.     // Team check
  134.     switch(get_member(id, m_iTeam))
  135.     {
  136.         case TEAM_CT: formatex(szTeamName, charsmax(szTeamName), szCT_Prefix)
  137.         case TEAM_TERRORIST: formatex(szTeamName, charsmax(szTeamName), szT_Prefix)
  138.         case TEAM_SPECTATOR: formatex(szTeamName, charsmax(szTeamName), szSpecT_Prefix)
  139.     }
  140.  
  141.     LookUPPrefixes(id)
  142.  
  143.     // Prefixes check
  144.     if (strlen(g_szPrefixPrefixes))
  145.         formatex(szPrefixes, charsmax(szPrefixes), "^4%s ^1| %s^1: ^3%i", g_szPrefixPrefixes, szLevel_Prefix, iLevelNum)
  146.     else
  147.         formatex(szPrefixes, charsmax(szPrefixes), "%s^1: ^3%i", szLevel_Prefix, iLevelNum)
  148.  
  149.     // Message foramt
  150.     if(is_user_alive(id))
  151.         format(szMessage, charsmax(szMessage), "^1(%s^1) [%s^1] ^3%s ^1: ^1%s", szTeamName, szPrefixes, szName, szMessage)
  152.     else
  153.         format(szMessage, charsmax(szMessage), "^1(%s^1) [%s ^1| %s^1] ^3%s ^1: ^1%s", szTeamName, szDead_Prefix, szPrefixes, szName, szMessage)
  154.  
  155.     // Send the message
  156.     for (new i = 1; i <= g_iMaxPlayers; i++)
  157.     {
  158.         if(!is_user_connected(i) || get_user_team(i) != get_user_team(id))
  159.             continue
  160.  
  161.         Send_Message(szMessage, id, i)
  162.     }
  163.  
  164.     // Log messages
  165.     if (get_pcvar_num(g_pCvarLogMessages))
  166.     {
  167.         new szSteamID[36], szIP[16]
  168.         get_user_authid(id, szSteamID, charsmax(szSteamID))
  169.         get_user_ip(id, szIP, charsmax(szIP), 1)
  170.         Log_Messages("[%s|%s] - %s", szSteamID, szIP, szMessage)
  171.     }
  172.    
  173.     return PLUGIN_CONTINUE
  174. }
  175.  
  176. bool:is_valid_msg(const szMessage[])
  177. {
  178.     if (szMessage[0] == '@' || !strlen(szMessage) || szMessage[0] == '/' || szMessage[0] == '#')
  179.         return false
  180.        
  181.     return true
  182. }
  183.  
  184. stock Log_Messages(const szMessage_Fmt[], any:...)
  185. {
  186.     static szMessage[256], szFileName[32], szDate[16]
  187.     vformat(szMessage, charsmax(szMessage), szMessage_Fmt, 2)
  188.     replace_all(szMessage, charsmax(szMessage), "^4", "")
  189.     replace_all(szMessage, charsmax(szMessage), "^1", "")
  190.     replace_all(szMessage, charsmax(szMessage), "^1", "")
  191.     replace_all(szMessage, charsmax(szMessage), "^3", "")
  192.     format_time(szDate, charsmax(szDate), "%d%m%Y")
  193.     formatex(szFileName, charsmax(szFileName), "ZE_Messages_%s.log", szDate)
  194.     log_to_file(szFileName, "%s", szMessage)
  195. }
  196.  
  197. stock Send_Message(const szMessage[], const id, const iIndex)
  198. {
  199.     message_begin(MSG_ONE, g_iSayText, {0, 0, 0}, iIndex)
  200.     write_byte(id)
  201.     write_string(szMessage)
  202.     message_end()
  203. }
  204.  
  205. public ReadLines()
  206. {
  207.     if (file_exists(g_szFile))
  208.     {
  209.         new OpennedFile = fopen(g_szFile, "rt"),
  210.             szLineToRead[129], szPrefixFlags[32], szPrefixPrefix[32]
  211.  
  212.         if (!OpennedFile)
  213.             return
  214.        
  215.         while (!feof(OpennedFile))
  216.         {
  217.             fgets(OpennedFile, szLineToRead, charsmax(szLineToRead))
  218.  
  219.             if ((szLineToRead[0] == '/' && szLineToRead[1] == '/'))
  220.                 continue
  221.  
  222.             for (new iIndex = 0; iIndex <= charsmax(g_szReservedChars); iIndex++)
  223.             {
  224.                 if (equal(szLineToRead[0], g_szReservedChars[iIndex]))
  225.                     continue
  226.             }
  227.            
  228.             remove_quotes(szLineToRead)
  229.             trim(szLineToRead)
  230.             parse(szLineToRead, szPrefixPrefix, charsmax(szPrefixPrefix), szPrefixFlags, charsmax(szPrefixFlags))
  231.             ArrayPushString(g_szPrefixes, szPrefixPrefix)
  232.             ArrayPushString(g_szFlags, szPrefixFlags)
  233.         }
  234.        
  235.         fclose(OpennedFile)
  236.     }
  237.     else
  238.     {
  239.         set_fail_state("File %s is not found.", g_szFile)
  240.     }
  241. }
  242.  
  243. public LookUPPrefixes(id)
  244. {
  245.     ReadLines()
  246.  
  247.     new szPrefixFlags[32], iIndex, szPrefixPrefix[32]
  248.     for (iIndex = 0; iIndex < ArraySize(g_szFlags); iIndex++)
  249.     {
  250.         ArrayGetString(g_szFlags, iIndex, szPrefixFlags, charsmax(szPrefixFlags))
  251.  
  252.         if (access(id, read_flags(szPrefixFlags)))
  253.         {
  254.             ArrayGetString(g_szPrefixes, iIndex, szPrefixPrefix, charsmax(szPrefixPrefix))
  255.             copy(g_szPrefixPrefixes, charsmax(g_szPrefixPrefixes), szPrefixPrefix)
  256.             break
  257.         }
  258.     }
  259. }
Because don't i have to set them up in users.ini for them to get the flag think it was T.

I want to be able to not setup in 2 places. If im wrong let me know.

Also the code you posted up above is the same in the rar file not the one that works that you posted the amxx file for.

Re: Chat Prefix

Posted: 29 Aug 2018, 00:09
by Spir0x
Yes like RapidFlush said. i tested your code jack it never shows admin prefix only levels like in the rar file.

Re: Chat Prefix

Posted: 29 Aug 2018, 12:54
by Spir0x
So ?!

Re: Chat Prefix

Posted: 30 Aug 2018, 12:08
by Jack GamePlay
Spir0x wrote:
10 Months Ago
Yes like RapidFlush said. i tested your code jack it never shows admin prefix only levels like in the rar file.
I've updated the rar with the working code.
It should be fixed now.
RapidFlush wrote:
10 Months Ago

Because don't i have to set them up in users.ini for them to get the flag think it was T.

I want to be able to not setup in 2 places. If im wrong let me know.

Also the code you posted up above is the same in the rar file not the one that works that you posted the amxx file for.
You can do that:
  1. Open vips.ini.
  2. Loop through all connected players & get their names & authids.
  3. Compare them with the registered VIP names/authids & check if they are already VIP or not.
  4. If they are, put them the prefix you want otherwise ignore.

Re: Chat Prefix

Posted: 05 Sep 2018, 10:10
by Rain1153
jack what's the path for message logs?

Re: Chat Prefix

Posted: 05 Sep 2018, 22:27
by Jack GamePlay
Rain1153 wrote:
10 Months Ago
jack what's the path for message logs?
You will find the log file in addons/amxmodx/logs.

Re: Chat Prefix

Posted: 11 Oct 2018, 04:21
by shady101852
is there a version of this without the levels? I only wanted it for the [human] / [zombie] tag since I don't use the levels system. Also how would we make it detect the flag VIP_A and get the prefix [VIP] for vip players? (instead of adding a prefix for each vip manually)