05-14-2012, 15:50
Hi guys, I need your help to fix a code. I tried to do a plugin that let you see your ping (hiding ping bars) in the scoreboard (TAB). So Basically what I needed to do is to force 2 client dvars on player connect:
cg_scoreboardpingtext to be 1
cg_scoreboardpinggraph to be 0
I written a code based on a fov plugin (by Tylerd86 & JariZ), compiled with pluginmaker v3:
Then I added this code to my sv_config.cfg...
That plugin doesn't load and, also, makes impossible to use the ingamercontool. I really can't figure out what's wrong with it... Help me please!!!
cg_scoreboardpingtext to be 1
cg_scoreboardpinggraph to be 0
I written a code based on a fov plugin (by Tylerd86 & JariZ), compiled with pluginmaker v3:
Code:
using System;
using Addon;
namespace pingtext
{
public class pingtext : CPlugin
{
public override void OnServerLoad()
{
ServerPrint("PingText Loaded! by b00mSh4k4");
}
public override void OnPlayerConnect(ServerClient Client)
{
SetClientDvar(Client.ClientNum, string.Format("cg_scoreboardpingtext \"{0}\"", GetServerCFG("PING", "text", "1")));
SetClientDvar(Client.ClientNum, string.Format("cg_scoreboardPingGraph \"{0}\"", GetServerCFG("PING", "bars", "0")));
}
}
}
Then I added this code to my sv_config.cfg...
Code:
[PING]
text=1
bars=0
That plugin doesn't load and, also, makes impossible to use the ingamercontool. I really can't figure out what's wrong with it... Help me please!!!