View Single Post
Cruze
Veteran Member
Join Date: May 2017
Old 03-15-2019 , 20:19   Re: Replace the color code with cvar
Reply With Quote #2

PHP Code:
#pragma semicolon 1
#pragma newdecls required

ConVar g_sFontColor;

public 
void OnPluginStart ()
{
    
g_sFontColor CreateConVar ("sm_plugin_fontcolor""ff0000",  "font color lol");
}

public 
void OnClientPostAdminCheck (int i)
{
    
char color[16];
    
char text[16] = "Hello lol";
    
g_sFontColor.GetString(colorsizeof(color));
    
PrintCenterText(i"<font size='24' color='%s'>%s</font>"colortext);

__________________
Taking paid private requests! Contact me
Cruze is offline