ConnectAnnounceNewPlayers: small fixes
This commit is contained in:
parent
39e55a630d
commit
fca4cb19bb
@ -3,7 +3,7 @@
|
|||||||
#include <sourcemod>
|
#include <sourcemod>
|
||||||
#include <multicolors>
|
#include <multicolors>
|
||||||
|
|
||||||
bool NewPlayer[MAXPLAYERS + 1] = { false, ... };
|
bool g_bNewPlayer[MAXPLAYERS + 1] = { false, ... };
|
||||||
|
|
||||||
Database g_hDatabase;
|
Database g_hDatabase;
|
||||||
|
|
||||||
@ -77,7 +77,7 @@ public void SQL_OnQueryCompleted(Database db, DBResultSet results, const char[]
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
NewPlayer[client] = true;
|
g_bNewPlayer[client] = true;
|
||||||
NewPlayerMessage(client);
|
NewPlayerMessage(client);
|
||||||
char sQuery[512];
|
char sQuery[512];
|
||||||
Format(sQuery, sizeof(sQuery), "INSERT INTO connections (auth) VALUES ('%s')" , sAuthID);
|
Format(sQuery, sizeof(sQuery), "INSERT INTO connections (auth) VALUES ('%s')" , sAuthID);
|
||||||
@ -90,6 +90,11 @@ public Action NewPlayerMessage(int client)
|
|||||||
char sName[128];
|
char sName[128];
|
||||||
GetClientName(client, sName, sizeof(sName));
|
GetClientName(client, sName, sizeof(sName));
|
||||||
|
|
||||||
CPrintToChatAll("{cyan}Player {midnightblue}%s {cyan}has just connected an Unloze Server for the first time! Welcome!", sName);
|
CPrintToChatAll("{cyan}Player {midnightblue}%s {cyan}has just connected an UNLOZE Server for the first time! Welcome!", sName);
|
||||||
CPrintToChat(client, "{cyan}Hi %s. Welcome to the {midnightblue}Unloze Zombie Escape Server{cyan}! We hope you enjoy your stay here and add our server to your favorites. Make sure to check out our website at {midnightblue}www.unloze.com{cyan}.", sName);
|
CPrintToChat(client, "{cyan}Hi %s. Welcome to the {midnightblue}Unloze Zombie Escape Server{cyan}! We hope you enjoy your stay here and add our server to your favorites. Make sure to check out our website at {midnightblue}www.unloze.com{cyan}.", sName);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnClientDisconnect(int client)
|
||||||
|
{
|
||||||
|
g_bNewPlayer[client] = false;
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user