mirror of
https://github.com/Jackzmc/sourcemod-plugins.git
synced 2025-05-10 05:53:20 +00:00
identity_fix: Fix error on player disconnect
This commit is contained in:
parent
fd63f7ca8c
commit
d1a09817f1
2 changed files with 5 additions and 3 deletions
Binary file not shown.
|
@ -299,10 +299,12 @@ public Action Event_PlayerFirstSpawn(Event event, const char[] name, bool dontBr
|
||||||
}
|
}
|
||||||
public Action Event_PlayerDisconnect(Event event, const char[] name, bool dontBroadcast) {
|
public Action Event_PlayerDisconnect(Event event, const char[] name, bool dontBroadcast) {
|
||||||
int client = GetClientOfUserId(event.GetInt("userid"));
|
int client = GetClientOfUserId(event.GetInt("userid"));
|
||||||
|
if(client > 0) {
|
||||||
g_Models[client][0] = '\0';
|
g_Models[client][0] = '\0';
|
||||||
if(!IsFakeClient(client) && survivors > 0)
|
if(!IsFakeClient(client) && survivors > 0)
|
||||||
survivors--;
|
survivors--;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
public void Frame_CheckClient(int userid) {
|
public void Frame_CheckClient(int userid) {
|
||||||
int client = GetClientOfUserId(userid);
|
int client = GetClientOfUserId(userid);
|
||||||
if(client > 0 && GetClientTeam(client) == 2 && !IsFakeClient(client)) {
|
if(client > 0 && GetClientTeam(client) == 2 && !IsFakeClient(client)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue