Available Prefix only for VIP

Unpaid Requests, Public Plugins
Locked
neverminddw
Member
Member
Posts: 32
Joined: 6 years ago
Contact:

Prefix only for VIP

#1

Post by neverminddw » 5 years ago

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.

User avatar
Night Fury
Mod Developer
Mod Developer
Posts: 677
Joined: 7 years ago
Contact:

#2

Post by Night Fury » 5 years ago

As you don't want other features, edit this as you like:
https://forums.alliedmods.net/showpost. ... ostcount=3
Want your own mod edition? PM me.
Accepting private projects.
Discord: Fury#7469
Image

neverminddw
Member
Member
Posts: 32
Joined: 6 years ago
Contact:

#3

Post by neverminddw » 5 years ago

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?

User avatar
Night Fury
Mod Developer
Mod Developer
Posts: 677
Joined: 7 years ago
Contact:

#4

Post by Night Fury » 5 years ago

On Friday will be done.
Want your own mod edition? PM me.
Accepting private projects.
Discord: Fury#7469
Image

neverminddw
Member
Member
Posts: 32
Joined: 6 years ago
Contact:

#5

Post by neverminddw » 4 years ago

And? =D where are u...

User avatar
Night Fury
Mod Developer
Mod Developer
Posts: 677
Joined: 7 years ago
Contact:

#6

Post by Night Fury » 4 years ago

  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. }
Want your own mod edition? PM me.
Accepting private projects.
Discord: Fury#7469
Image

Muhammet20
Veteran Member
Veteran Member
Posts: 408
Joined: 5 years ago
Contact:

#7

Post by Muhammet20 » 4 years ago

why not mark as Plugin Available ?

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

#8

Post by Raheem » 4 years ago

Muhammet20 wrote: 4 years ago why not mark as Plugin Available ?
Is it working?
He who fails to plan is planning to fail

User avatar
sPe3doN
Senior Member
Senior Member
Algeria
Posts: 258
Joined: 7 years ago
Contact:

#9

Post by sPe3doN » 4 years ago

Muhammet20 wrote: 4 years ago why not mark as Plugin Available ?
It's right here: viewtopic.php?f=15&t=3617
Image

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

#10

Post by Raheem » 4 years ago

OK, then will be marked as plugin available and locked, and discussion will be in the new topic viewtopic.php?f=15&t=3617.
He who fails to plan is planning to fail

Locked

Who is online

Users browsing this forum: No registered users and 0 guests