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

[SNIPPET][CSS] Adding the VIP Tag


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
blodia
Veteran Member
Join Date: Sep 2009
Location: UK
Old 05-21-2010 , 15:03   [SNIPPET][CSS] Adding the VIP Tag
Reply With Quote #1

take note that only 1 person can have the VIP tag at anytime and only the team of the person with the tag can see it. you also need sdkhooks.

PHP Code:
#include <sourcemod>
#include <sdktools>
#include <sdkhooks>

#pragma semicolon 1

new VIPIndex;

public 
OnMapStart()
{
    new 
PMIndex FindEntityByClassname(0"cs_player_manager");
    
SDKHook(PMIndexSDKHook_ThinkPostOnThinkPost);
}

public 
OnThinkPost(entity)
{
    if ((
VIPIndex 0) && (VIPIndex <= MaxClients) && IsClientInGame(VIPIndex) && IsPlayerAlive(VIPIndex))
    {
        
SetEntProp(entityProp_Send"m_iPlayerVIP"VIPIndex);
    }

VIPIndex in the index of the player you want to have the tag, set it some where in your script.

Last edited by blodia; 05-21-2010 at 15:36.
blodia is offline
L. Duke
Veteran Member
Join Date: Apr 2005
Location: Walla Walla
Old 07-07-2010 , 17:45   Re: [SNIPPET][CSS] Adding the VIP Tag
Reply With Quote #2

That's cool. I wish I had known that when I was working on the VIP mod. A couple of the guys at Valve/Turtlerock who came and played VIP Mod when we were first testing it added a concommand to do the same thing. Haven't tested it on the OB update yet, but
PHP Code:
cs_make_vip <IndexOfEntity
as a server command should do the same thing.

He was even shown on the radar at the time, but when they did the radar updates to CSS a year or two later they didn't put in the VIP stuff
__________________
"Good grammar is essential, Robin."
- Batman
L. Duke is offline
blodia
Veteran Member
Join Date: Sep 2009
Location: UK
Old 07-07-2010 , 19:05   Re: [SNIPPET][CSS] Adding the VIP Tag
Reply With Quote #3

when i found how to add the tag i thought thats what you used in the vip mod. i tried that cvar and it works but since the new scoreboard uses icons it shows the round time stop watch icon, guess its the same for my method. vip doesn't show on radar either

Last edited by blodia; 07-13-2010 at 16:54.
blodia 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 08:53.


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