PlaytimeReward: undo last commit
will fix later
This commit is contained in:
parent
4f03e84096
commit
2751f1b460
@ -21,13 +21,11 @@ public void OnPluginStart()
|
|||||||
CreateTimer(30.0, Timer_CheckConnectionTime, _, TIMER_REPEAT);
|
CreateTimer(30.0, Timer_CheckConnectionTime, _, TIMER_REPEAT);
|
||||||
|
|
||||||
HookEvent("player_disconnect", EventHook_PlayerDisconnect, EventHookMode_Post);
|
HookEvent("player_disconnect", EventHook_PlayerDisconnect, EventHookMode_Post);
|
||||||
HookEvent("player_connect", EventHook_PlayerConnect, EventHookMode_Post);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnPluginEnd()
|
public void OnPluginEnd()
|
||||||
{
|
{
|
||||||
UnhookEvent("player_disconnect", EventHook_PlayerDisconnect, EventHookMode_Post);
|
UnhookEvent("player_disconnect", EventHook_PlayerDisconnect, EventHookMode_Post);
|
||||||
UnhookEvent("player_connect", EventHook_PlayerConnect, EventHookMode_Post);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnMapStart()
|
public void OnMapStart()
|
||||||
@ -47,18 +45,6 @@ public void EventHook_PlayerDisconnect(Event hEvent, const char[] sName, bool bD
|
|||||||
g_iClientConnectionTime[client] = 0;
|
g_iClientConnectionTime[client] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void EventHook_PlayerConnect(Event hEvent, const char[] sName, bool bDontBroadcast)
|
|
||||||
{
|
|
||||||
bool bIsBot = view_as<bool>(hEvent.GetInt("bot"));
|
|
||||||
|
|
||||||
if (bIsBot)
|
|
||||||
return;
|
|
||||||
|
|
||||||
int client = GetClientOfUserId(hEvent.GetInt("userid"));
|
|
||||||
|
|
||||||
g_iClientConnectionTime[client] = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Action Timer_CheckConnectionTime(Handle hThis)
|
public Action Timer_CheckConnectionTime(Handle hThis)
|
||||||
{
|
{
|
||||||
for (int i = 1; i <= MaxClients; i++)
|
for (int i = 1; i <= MaxClients; i++)
|
||||||
|
Loading…
Reference in New Issue
Block a user