Raised This Month: $ Target: $400
 0% 

[SNIPPET][CSS] Adding the VIP Tag


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



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 12:37.


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