Raised This Month: $32 Target: $400
 8% 

VIP on scoreboard


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ramiax
Member
Join Date: Mar 2009
Location: Lithuania
Old 11-17-2009 , 06:18   VIP on scoreboard
Reply With Quote #1

Hi guys! ;D I have a problem with a plugin...
Code:
#include <amxmodx>
#include <cstrike>
 
#define VIP ADMIN_LEVEL_A // "m" flag
 
new amx_adminvip
 
public plugin_init()
{
        register_plugin("Admin VIP", "1.1", "hleV")
 
        amx_adminvip = register_cvar("amx_adminvip", "1")
 
        register_event("HLTV", "newRound", "a", "1=0", "2=0")
}
 
public newRound()
        set_task(0.1, "setVip")
 
public setVip()
{
        new players[32], pNum
        get_players(players, pNum, "a")
 
        for (new i = 0; i < pNum; i++)
        {
                new id = players[i]
 
                if (get_pcvar_num(amx_adminvip) && get_user_flags(id) & VIP)
                {
 
                        message_begin(MSG_ALL, get_user_msgid("ScoreAttrib"))
                        write_byte(id)
                        write_byte(4)
                        message_end()
                }
        }
 
        return PLUGIN_HANDLED
}
I have a zombie mod server. And i'm making a vip plugin. The thing is that im trying to make a plugin that when player press tab, there shows a VIP text in the place were *DEAD* or BOMB is. And im trying 2 hours to make that VIP text work on zombies and humans, but it shows VIP text only when you are a human. So can anybody tell me a hint or somthing to do that? ;]
ramiax is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 11-17-2009 , 13:59   Re: VIP on scoreboard
Reply With Quote #2

Code:
#include < amxmodx > #include < amxmisc > #define ADMIN_VIP ADMIN_LEVEL_A enum {     SCOREATTRIB_ARG_PLAYERID = 1,     SCOREATTRIB_ARG_FLAGS }; enum ( <<= 1 ) {     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_message( get_user_msgid( "ScoreAttrib" ), "MessageScoreAttrib" );         pCvar_AdminVIP = register_cvar( "amx_adminvip", "1" ); } public MessageScoreAttrib( iMsgId, iDest, iReceiver ) {     if( get_pcvar_num( pCvar_AdminVIP ) ) {         new iPlayer = get_msg_arg_int( SCOREATTRIB_ARG_PLAYERID );                 if( access( iPlayer, ADMIN_VIP ) ) {             set_msg_arg_int( SCOREATTRIB_ARG_FLAGS, ARG_BYTE, SCOREATTRIB_FLAG_VIP );         }     } }
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!

Last edited by Exolent[jNr]; 11-18-2009 at 12:24.
Exolent[jNr] is offline
ramiax
Member
Join Date: Mar 2009
Location: Lithuania
Old 11-18-2009 , 00:58   Re: VIP on scoreboard
Reply With Quote #3

Your plugin failed to compile! Read the errors below:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

/home/groups/amxmodx/tmp3/phptdUiyO.sma(33) : error 088: number of arguments does not match definition

1 Error.
Could not locate output file /home/groups/amxmodx/public_html/websc3/phptdUiyO.amx (compile failed).
ramiax is offline
madeitout
Member
Join Date: Jun 2008
Old 11-18-2009 , 02:31   Re: VIP on scoreboard
Reply With Quote #4

vip is hard coded to only work for the ct team, i believe it is impossible with amxx to make a t show as vip on the scoreboard
madeitout is offline
ramiax
Member
Join Date: Mar 2009
Location: Lithuania
Old 11-18-2009 , 03:11   Re: VIP on scoreboard
Reply With Quote #5

It's possible! ;] On my server when they are 2 vips 1 on ct 1 on t it shows good, but when the round starts(like 1st infection) the vip text just dissapear from t's... ;( On cts everything works good
ramiax is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 11-18-2009 , 05:24   Re: VIP on scoreboard
Reply With Quote #6

problem is at line 33:
Code:
set_msg_arg_int( SCOREATTRIB_ARG_FLAGS, SCOREATTRIB_FLAG_VIP );
->
Code:
set_msg_arg_int( SCOREATTRIB_ARG_FLAGS, ARG_BYTE, SCOREATTRIB_FLAG_VIP );
but still, doesn't seem to work on terrorist's team.
__________________

Last edited by Hunter-Digital; 11-18-2009 at 05:31.
Hunter-Digital is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 11-18-2009 , 12:25   Re: VIP on scoreboard
Reply With Quote #7

It seems like there is something in the zombie plugin conflicting with this issue.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
avril-lavigne
Banned
Join Date: Apr 2009
Old 08-18-2010 , 21:42   Re: VIP on scoreboard
Reply With Quote #8

yes but cs_set_user_vip(id,1,1,1) do the same ?
__________________
VDS in Europe 1 gb/s unmetered.Any configurations.
I accept Paypal, Moneybookers,etc
avril-lavigne is offline
Kreation
Veteran Member
Join Date: Jan 2010
Location: Illinois
Old 08-18-2010 , 22:05   Re: VIP on scoreboard
Reply With Quote #9

You do realize this is over a year old, right?
__________________
Hi.
Kreation is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-18-2010 , 22:08   Re: VIP on scoreboard
Reply With Quote #10

Quote:
Originally Posted by Kreation View Post
You do realize this is over a year old, right?
He should at least get credit for searching .
__________________
fysiks is offline
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 20:21.


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