You can look server events with:
sm_cvar net_showevents 2
To log those:
Code:
sm_cvar con_logtimestamp 1
sm_cvar con_logfile mylogs.log // use .log file name extension
Sometimes server not follow all events in some cases.
Use plugin for that.
Here is one of those plugins, it will print in server console events with parameters.
-Snip- Hook Events From Files
But use above things only for testing debug/purpose, these will lag server a lot (because lot of printing in console)
Quote:
Originally Posted by alasfourom
Hello guys,
When trying to detect winners team for l4d2 while hooking round_end event, winners team will be equal to 0 ???
If this method doesnt work, is there any other way to do so?
Thanks
PHP Code:
#pragma semicolon 1#pragma newdecls required#include <sourcemod>#include <sdkhooks>#include <sdktools>public void OnPluginStart(){ HookEvent("round_end", Event_RoundEnd);}void Event_RoundEnd(Event event, const char[] name, bool dontBroadcast){ int WinnerTeam = GetEventInt(event, "winner"); for (int i = 1; i <= MaxClients; i++) { if(GetClientTeam(i) == WinnerTeam) PrintToChat(i, "Winner Team == %d", WinnerTeam); else PrintToChat(i, "Losing Team != %d", WinnerTeam); }}
|
__________________