Raised This Month: $51 Target: $400
 12% 

Say /vips


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ZEDD_Intensity
Senior Member
Join Date: Jun 2016
Old 11-15-2017 , 15:00   Say /vips
Reply With Quote #1

Greetings,

Any player who will have access to ADMIN_FLAG B (Reserved Slots) will be considered as a VIP.

Saying /vips in chat will say :
ONLINE VIPS : VIP1, VIP2, VIP3, VIP4. (As many players with access to admin_flag_b)

Regards,
ZEDD

Last edited by ZEDD_Intensity; 05-01-2018 at 18:30.
ZEDD_Intensity is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 11-15-2017 , 16:09   Re: Say /vips
Reply With Quote #2

Found this in a folder.
PHP Code:
#include <amxmodx>

#define VIP_FLAG ADMIN_RESERVATION

new gmsgSayText;

static const 
COLOR[] = "^x04"

public plugin_init() {
register_clcmd("say /vips""print_adminlist");
gmsgSayText get_user_msgid("SayText")
}

public 
print_adminlist(user
{
    new 
maxplayers get_maxplayers()
    new 
vipnames[33][32]
    new 
message[256]
    new 
idcountxlen
    
    
for(id id <= maxplayers id++)
        if(
is_user_connected(id))
            if(
get_user_flags(id) & VIP_FLAG)
                
get_user_name(idvipnames[count++], 31)

    
len format(message255"%sConnected V.I.P's: ",COLOR)
    
    if(
count 0)
    {
        for(
count x++) {
            
len += format(message[len], 255-len"%s%s "vipnames[x], < (count-1) ? ", ":"")
            if(
len 96 ) {
                
print_message(usermessage)
                
len format(message255"%s ",COLOR)
            }
        }
        
print_message(usermessage)
    }
    else
    {
        
len += format(message[len], 255-len,"No One Connected!")
        
print_message(usermessage)
    }
}

print_message(idmsg[])
{
    
message_begin(MSG_ONEgmsgSayText, {0,0,0}, id)
    
write_byte(id)
    
write_string(msg)
    
message_end()

__________________
edon1337 is offline
Old 11-15-2017, 16:14
Alber9091
This message has been deleted by Alber9091. Reason: Edon1337 Already Helped.
Old 11-16-2017, 02:00
ZEDD_Intensity
This message has been deleted by ZEDD_Intensity.
WhiteFang1319
Senior Member
Join Date: Jan 2017
Old 11-16-2017 , 09:06   Re: Say /vips
Reply With Quote #3

Quote:
Originally Posted by ZEDD_Intensity View Post

Or they're already there the way they should be? As I'm not quite sure about
PHP Code:
get_user_msgid("SayText"
Please correct me if I"m wrong.

Also...
PHP Code:
len += format(message[len], 255-len,"No One Connected!"
...Will be shown when there will be NO VIPs Online/Connected at the time, is that true?

ZEDD
You can edit the line for No One Connected if you want. Other than that get_user_msgid is used for getting id of player to give him the the chat msg.

Last edited by WhiteFang1319; 11-16-2017 at 09:08.
WhiteFang1319 is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 11-16-2017 , 19:21   Re: Say /vips
Reply With Quote #4

Quote:
Originally Posted by ZEDD_Intensity View Post
Greetings Edon1337,

Thanks for the help!

Just wanted to make sure, that I'll be needing to edit a couple lines like,


Or they're already there the way they should be? As I'm not quite sure about
PHP Code:
get_user_msgid("SayText"
Please correct me if I"m wrong.

Also...
PHP Code:
len += format(message[len], 255-len,"No One Connected!"
...Will be shown when there will be NO VIPs Online/Connected at the time, is that true?

Will await your cooperative response.

Thanks again and Regards,
ZEDD
I don't get what you're trying to do with SayText message. Could you please explain? Yes, 'No One Connected' will appear when there aren't any VIPs in the server.
__________________

Last edited by edon1337; 11-16-2017 at 19:22.
edon1337 is offline
Old 11-17-2017, 05:39
ZEDD_Intensity
This message has been deleted by ZEDD_Intensity.
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:22.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode