Page 1 of 1

Prefix only for VIP

Posted: 17 Apr 2019, 09:47
by neverminddw
Tried a lot of things, still haven't stepped on the right one...

Anyone who can create a VIP tag plugin.
Ex: if (ze_get_vip_flags(id) & VIP_A) to have prefix !y[ !gVIP !y] !tplayer !y: msg

And also that it should work with Reset Score plugin.
Thank u.

Re: Prefix only for VIP

Posted: 19 Apr 2019, 05:28
by Mohamed Alaa
As you don't want other features, edit this as you like:
https://forums.alliedmods.net/showpost. ... ostcount=3

Re: Prefix only for VIP

Posted: 21 Apr 2019, 12:49
by neverminddw
Doesn't work.
Indeed, it's very very complicated and bugged.

Is it that hard to add a ^01[ ^04VIP ^01] prefix on chat to VIP_A flag users?

Re: Prefix only for VIP

Posted: 22 Apr 2019, 11:28
by Mohamed Alaa
On Friday will be done.

Re: Prefix only for VIP

Posted: 26 Apr 2019, 22:14
by neverminddw
And? =D where are u...

Re: Prefix only for VIP

Posted: 16 Jun 2019, 14:32
by Mohamed Alaa
  1. #include <zombie_escape>
  2. #include <ze_vip>
  3.  
  4. #define VIP_PREFIX_FLAG VIP_A
  5. #define VIP_PREFIX_TAG "!n[!gVIP!n] "
  6.  
  7. public plugin_init()
  8. {
  9.     register_plugin("[ZE] VIP Prefix", "1.0", "Jack")
  10.     register_clcmd("say", "cmd_say")
  11. }
  12.  
  13. public cmd_say(id)
  14. {
  15.     if (!is_user_connected(id))
  16.         return
  17.  
  18.     if (ze_get_vip_flags(id) & VIP_PREFIX_FLAG)
  19.     {
  20.         new szMessage[256], szName[32]
  21.         read_args(szMessage, charsmax(szMessage))
  22.         remove_quotes(szMessage)
  23.         trim(szMessage)
  24.         get_user_name(id, szName, charsmax(szName))
  25.  
  26.         for (new iChar = 0; iChar <= charsmax(szMessage); iChar++)
  27.         {
  28.             if (szMessage[iChar] == '^2' || szMessage[iChar] == '^3' || szMessage[iChar] == '^4')
  29.                 szMessage[iChar] = '^1'
  30.         }
  31.  
  32.         if (!is_valid_msg(szMessage))
  33.             return
  34.  
  35.         formatex(szMessage, charsmax(szMessage), "%s!g%s!n: !t%s", VIP_PREFIX_TAG, szName, szMessage)
  36.  
  37.         for (new i = 1; i <= get_member_game(m_nMaxPlayers); i++)
  38.         {
  39.             if (!is_user_connected(i))
  40.                 continue
  41.  
  42.             message_begin(MSG_ONE, get_user_msgid("SayText"), {0, 0, 0}, i)
  43.             write_byte(id)
  44.             write_string(szMessage)
  45.             message_end()
  46.         }
  47.     }
  48. }
  49.  
  50. bool:is_valid_msg(const szMessage[])
  51. {
  52.     if (szMessage[0] == '@' || !strlen(szMessage) || szMessage[0] == '/' || szMessage[0] == '#')
  53.         return false
  54.        
  55.     return true
  56. }

Re: Prefix only for VIP

Posted: 03 Jul 2019, 14:52
by Muhammet20
why not mark as Plugin Available ?

Re: Prefix only for VIP

Posted: 03 Jul 2019, 15:04
by Raheem
Muhammet20 wrote:
3 Months Ago
why not mark as Plugin Available ?
Is it working?

Re: Prefix only for VIP

Posted: 03 Jul 2019, 15:12
by sPe3doN
Muhammet20 wrote:
3 Months Ago
why not mark as Plugin Available ?
It's right here: viewtopic.php?f=15&t=3617

Re: Prefix only for VIP

Posted: 03 Jul 2019, 15:14
by Raheem
OK, then will be marked as plugin available and locked, and discussion will be in the new topic viewtopic.php?f=15&t=3617.