ConnectAnnounceNewPlayers: fix passing client id
This commit is contained in:
parent
a8964e3cb0
commit
ebdba36347
@ -148,6 +148,8 @@ public void SQL_OnQueryCompleted(Database db, DBResultSet results, const char[]
|
||||
if ((client = GetClientFromSerial(data)) == 0)
|
||||
return;
|
||||
|
||||
int clientid = GetClientSerial(client);
|
||||
|
||||
char sAuthID[32];
|
||||
GetClientAuthId(client, AuthId_Steam2, sAuthID, sizeof(sAuthID));
|
||||
|
||||
@ -165,7 +167,7 @@ public void SQL_OnQueryCompleted(Database db, DBResultSet results, const char[]
|
||||
g_bNewPlayer[client] = true;
|
||||
g_bNewPlayerChatBlock[client] = true;
|
||||
NewPlayerMessage(client);
|
||||
CreateTimer(10.0, BlockChat, client, TIMER_FLAG_NO_MAPCHANGE);
|
||||
CreateTimer(10.0, BlockChat, clientid, TIMER_FLAG_NO_MAPCHANGE);
|
||||
char sQuery[512];
|
||||
Format(sQuery, sizeof(sQuery), "INSERT INTO connections (auth) VALUES ('%s')" , sAuthID);
|
||||
|
||||
@ -199,8 +201,12 @@ public void OnClientDisconnect(int client)
|
||||
g_bNewPlayerChatBlock[client] = false;
|
||||
}
|
||||
|
||||
public Action BlockChat(Handle timer, int client)
|
||||
public Action BlockChat(Handle timer, int clientid)
|
||||
{
|
||||
int client = -1;
|
||||
if ((client = GetClientFromSerial(clientid)) == -1)
|
||||
return;
|
||||
|
||||
g_bNewPlayerChatBlock[client] = false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user