Does anyone got it to work recently ?
Code:
public OnPluginStart()
{
CreateConVar( "testcvar", "1", "Team Scramble version", FCVAR_PLUGIN );
HookEvent("server_cvar", Event_ServerCvar, EventHookMode_Pre);
}
public Action:Event_ServerCvar(Handle:event, const String:name[], bool:dontBroadcast)
{
decl String:cvarName[64];
GetEventString(event, "cvarname", cvarName, sizeof(cvarName));
PrintToChatAll(cvarName);
if (StrEqual(cvarName, "testcvar")) {
PrintToChatAll("string matched and handled");
return Plugin_Handled;
}
return Plugin_Continue;
}
Doesn't work. Also it seems that the whole event isn't even triggered.
Is there another way ?
__________________