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

say /vips


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
TRUE RED
Senior Member
Join Date: Mar 2012
Location: Ukraine
Old 04-12-2012 , 11:58   say /vips
Reply With Quote #1

Hi. I need plugin that will check vip online. Can someone make /vips command to check vip online. it would be good if someone will add colorchat function in this plugin. I used search and found this:

PHP Code:
#include <amxmodx>

#define VIP_ACCESS            ADMIN_KICK
#define ADMIN_ACCESS            ADMIN_RCON

new g_max_clientsgmsgSayText

public plugin_init() {
    
register_plugin("Admins&Vips Online""0.1""Pop0N")
    
    
g_max_clients get_maxplayers()
    
gmsgSayText get_user_msgid("SayText")
    
register_clcmd("say /admin""ShowVIPs")
    
register_clcmd("say_team /admin""ShowVIPs")
    
register_clcmd("say /admins""ShowVIPs")
    
register_clcmd("say_team /admins""ShowVIPs")
    
register_clcmd("say /vip""ShowVIPs")
    
register_clcmd("say_team /vip""ShowVIPs")
}

public 
ShowVIPs(user)
{
    
ShowAdmins(user)
    new 
message[256]
    new 
adminnames[33][32]
    new 
idcountxlen
    
    
for(id id <= g_max_clients id++)
        if(
is_user_connected(id))
            if(
get_user_flags(id) & VIP_ACCESS)
                
get_user_name(idadminnames[count++], 31)
    
len format(message255"^4Vips Online:^3 ")
    if(
count 0) {
        for(
count x++) {
            
len += format(message[len], 255-len"%s%s "adminnames[x], < (count-1) ? ", ":"")
            if(
len 96) {
                
print_message(usermessage)
                
len format(message255"^4 ")
            }
        }
        
print_message(usermessage)
    }
    else {
        
len += format(message[len], 255-len"^3No VIPs Online.")
        
print_message(usermessage)
    }
}

public 
ShowAdmins(user)
{
    new 
message[256]
    new 
adminnames[33][32]
    new 
idcountxlen
    
    
for(id id <= g_max_clients id++)
        if(
is_user_connected(id))
            if(
get_user_flags(id) & ADMIN_ACCESS)
                
get_user_name(idadminnames[count++], 31)
    
len format(message255"^4Admins Online:^3 ")
    if(
count 0) {
        for(
count x++) {
            
len += format(message[len], 255-len"%s%s "adminnames[x], < (count-1) ? ", ":"")
            if(
len 96) {
                
print_message(usermessage)
                
len format(message255"^4 ")
            }
        }
        
print_message(usermessage)
    }
    else {
        
len += format(message[len], 255-len"^3No Admins Online.")
        
print_message(usermessage)
    }
}

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

Would be great if someone add VIP in scoreboard. I found one but doesn't work

Last edited by TRUE RED; 04-13-2012 at 12:15.
TRUE RED is offline
Send a message via ICQ to TRUE RED Send a message via Skype™ to TRUE RED
Old 04-12-2012, 12:24
TRUE RED
This message has been deleted by TRUE RED.
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 04-12-2012 , 12:48   Re: check online vips
Reply With Quote #2

PHP Code:
public ShowVIPs(user)
{
    new 
text[192] = "^4Vips Online:^3 ";
    new 
len strlen(text);
    
    for (new 
1<= g_max_playersi++)
    {
        if (!
is_user_connected(i) || ~get_user_flags(i) & VIP_ACCESS)
            continue;
            
        
len += get_user_name(itext[len], charsmax(text) - len);
        
len += add(text[len], charsmax(text) - len", ");
    }
    
    
text[len 2] = EOS;
    
    
print_message(usertext);

hleV is offline
Old 04-12-2012, 13:02
TRUE RED
This message has been deleted by TRUE RED.
Old 04-12-2012, 13:21
TRUE RED
This message has been deleted by TRUE RED.
Old 04-12-2012, 13:37
TRUE RED
This message has been deleted by TRUE RED.
Old 04-12-2012, 13:40
Artifact
This message has been deleted by Artifact.
Old 04-12-2012, 13:49
TRUE RED
This message has been deleted by TRUE RED.
Old 04-12-2012, 13:52
Artifact
This message has been deleted by Artifact.
Old 04-12-2012, 13:52
TRUE RED
This message has been deleted by TRUE RED.
Old 04-12-2012, 13:56
Artifact
This message has been deleted by Artifact.
Old 04-12-2012, 16:55
TRUE RED
This message has been deleted by TRUE RED.
Old 04-12-2012, 16:59
TRUE RED
This message has been deleted by TRUE RED.
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 04-12-2012 , 17:07   Re: check online vips
Reply With Quote #3

Quote:
Originally Posted by TRUE RED View Post
i need it without contact message
If you leave the cvar blank, then no contact message will be shown.

Quote:
Originally Posted by TRUE RED View Post
and if someone can make VIP in scoreboard would be good.
Already been made, search.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Old 04-12-2012, 17:09
TRUE RED
This message has been deleted by TRUE RED.
Old 04-12-2012, 17:13
TRUE RED
This message has been deleted by TRUE RED.
Old 04-12-2012, 17:16
TRUE RED
This message has been deleted by TRUE RED.
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 04-12-2012 , 17:20   Re: check online vips
Reply With Quote #4

Yes, I wrote that one.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Old 04-12-2012, 17:27
TRUE RED
This message has been deleted by TRUE RED.
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 04-12-2012 , 17:29   Re: check online vips
Reply With Quote #5

It adds "VIP" in the scoreboard for users who have the given admin flag.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
TRUE RED
Senior Member
Join Date: Mar 2012
Location: Ukraine
Old 04-12-2012 , 17:35   Re: check online vips
Reply With Quote #6

PHP Code:
#include <amxmodx>

#define PLUGIN    "Admin - VIP Status"
#define VERSION    "1.0"
#define AUTHOR    "xPaw"

public plugin_init() {
    
register_pluginPLUGINVERSIONAUTHOR );
    
    
register_messageget_user_msgid"ScoreAttrib" ),    "msgScoreAttrib" );
}

public 
msgScoreAttrib( const MsgId, const MsgType, const MsgDest ) {
    static 
id;
    
id get_msg_arg_int);
    
    if( ( 
get_user_flagsid ) & ADMIN_KICK ) && ( get_user_teamid ) == ) && !get_msg_arg_int))
        
set_msg_arg_int2ARG_BYTE, ( << ) ); 
and

PHP Code:
#include < amxmodx >
#include < amxmisc >

#define ADMIN_VIP ADMIN_IMMUNITY

enum {
    
SCOREATTRIB_ARG_PLAYERID 1,
    
SCOREATTRIB_ARG_FLAGS
};

enum ( <<= ) {
    
SCOREATTRIB_FLAG_NONE 0,
    
SCOREATTRIB_FLAG_DEAD 1,
    
SCOREATTRIB_FLAG_BOMB,
    
SCOREATTRIB_FLAG_VIP
};

new 
pCvar_AdminVIP;

public 
plugin_init( ) {
    
register_plugin"Admin VIP ScoreBoard""0.0.1""Exolent" );
    
    
register_messageget_user_msgid"ScoreAttrib" ), "MessageScoreAttrib" );
    
    
pCvar_AdminVIP register_cvar"amx_adminvip""1" );
}

public 
MessageScoreAttribiMsgIdiDestiReceiver ) {
    if( 
get_pcvar_numpCvar_AdminVIP ) ) {
        new 
iPlayer get_msg_arg_intSCOREATTRIB_ARG_PLAYERID );
        
        if( 
accessiPlayerADMIN_VIP ) ) {
            
set_msg_arg_intSCOREATTRIB_ARG_FLAGSARG_BYTESCOREATTRIB_FLAG_VIP );
        }
    }

and also
PHP Code:
#include <amxmodx> 
#include <amxmisc> 

new g_szVIPMap 

public plugin_init() 

    
register_plugin("Admins are VIP's""1.0""PHP++"
    
register_event("ResetHUD""ResetHUD""be"
     
    new 
szMapName[32
    
get_mapname(szMapName31
     
    if (
containi(szMapName"as_") > -1
        
g_szVIPMap 


public 
ResetHUD(id

    
set_task(0.5"VIP"id 6910


public 
VIP(TaskID

    if (
g_szVIPMap
        return 
PLUGIN_HANDLED 
         
    
new id TaskID 6910 
     
    
if (is_user_admin(id)) 
    { 
        
message_begin(MSG_ALLget_user_msgid("ScoreAttrib")) 
        
write_byte(id
        
write_byte(4
        
message_end() 
    } 
     
    return 
PLUGIN_HANDLED 

explain me in two words, please? different code but the same purpose?
TRUE RED is offline
Send a message via ICQ to TRUE RED Send a message via Skype™ to TRUE RED
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 04-12-2012 , 17:36   Re: check online vips
Reply With Quote #7

First and second are the same, except the second has a toggling cvar as well as more readable code.

The third one is just awful.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
TRUE RED
Senior Member
Join Date: Mar 2012
Location: Ukraine
Old 04-12-2012 , 17:41   Re: check online vips
Reply With Quote #8

PHP Code:
#include < amxmodx >
#include < amxmisc >

#define ADMIN_VIP ADMIN_LEVEL_A

enum {
    
SCOREATTRIB_ARG_PLAYERID 1,
    
SCOREATTRIB_ARG_FLAGS
};

enum ( <<= ) {
    
SCOREATTRIB_FLAG_NONE 0,
    
SCOREATTRIB_FLAG_DEAD 1,
    
SCOREATTRIB_FLAG_BOMB,
    
SCOREATTRIB_FLAG_VIP
};

new 
pCvar_AdminVIP;

public 
plugin_init( ) {
    
register_plugin"Admin VIP ScoreBoard""0.0.1""Exolent" );
    
    
register_messageget_user_msgid"ScoreAttrib" ), "MessageScoreAttrib" );
    
    
pCvar_AdminVIP register_cvar"amx_adminvip""1" );
}

public 
MessageScoreAttribiMsgIdiDestiReceiver ) {
    if( 
get_pcvar_numpCvar_AdminVIP ) ) {
        new 
iPlayer get_msg_arg_intSCOREATTRIB_ARG_PLAYERID );
        
        if( 
accessiPlayerADMIN_VIP ) ) {
            
set_msg_arg_intSCOREATTRIB_ARG_FLAGSARG_BYTESCOREATTRIB_FLAG_VIP );
        }
    }

Tested it and it works 100%. Thank you for your plugin and also for quick reply!
TRUE RED is offline
Send a message via ICQ to TRUE RED Send a message via Skype™ to TRUE RED
TRUE RED
Senior Member
Join Date: Mar 2012
Location: Ukraine
Old 04-12-2012 , 17:45   Re: check online vips
Reply With Quote #9

tell me how to find /vips -> shows online vips. I'm searching now still no results.
TRUE RED is offline
Send a message via ICQ to TRUE RED Send a message via Skype™ to TRUE RED
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 04-12-2012 , 17:53   Re: check online vips
Reply With Quote #10

You've had that in this thread like 3 times already.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Old 04-12-2012, 17:58
TRUE RED
This message has been deleted by TRUE RED.
Old 04-12-2012, 18:13
TRUE RED
This message has been deleted by TRUE RED.
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 06:08.


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