View Single Post
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 04-06-2011 , 09:32   Re: SendConVarValue doesn't seem to work
Reply With Quote #5

SendConVarValue
Quote:
Notes:
Replicates a convar value to a specific client. This does not change the actual convar value.
PHP Code:
bool:SendConVarValue(clientHandle:convar, const String:value[]); 
PHP Code:
new Handle:sv_downloadurl INVALID_HANDLE;

public 
OnPluginStart()
{
    
HookEvent("player_activate"PlayerActiveEventHookMode_Post);
    
sv_downloadurl FindConVar("sv_downloadurl");
}

public 
PlayerActive(Handle:event, const String:name[], bool:dontBroadcast)
{
    
decl client;
    
client GetClientOfUserId(GetEventInt(event"userid"));
    if(!
IsFakeClient(client))
    {
        
SendConVarValue(clientsv_downloadurl"http://webspace/cstrike/");
    }

Hahahaha
Now you can replace your server "fastdownload" address to another from all players.
They still download missing content from your real server sv_downloadurl "address"

Last edited by Bacardi; 04-06-2011 at 09:46.
Bacardi is offline