No, the following code didn't worked out:
public void OnPluginStart()
HookEvent("player_team", PlayerTeam_Pre, EventHookMode_Pre);
public Action PlayerTeam_Pre(Handle event, const char name, bool dontBroadcast)
Handle new_event = CreateEvent("player_team", true);
SetEventInt(new_event, "userid", GetEventInt(event, "userid"));
SetEventInt(new_event, "team", GetEventInt(event, "team"));
SetEventInt(new_event, "oldteam", GetEventInt(event, "oldteam"));
SetEventBool(new_event, "disconnect", GetEventBool(event, "disconnect"));
The message was deleted, but
- The Team-Choose-Screen didn't close!
- The server crashed shortly after choosing a team!
edit: Just want to say thanks to illusion9 for all the suggestions, also it is not fixing the problem untill now.