ConnectAnnounceNewPlayers: small fixes

This commit is contained in:
Dogan 2019-05-27 12:09:45 +02:00
parent 39e55a630d
commit fca4cb19bb

View File

@ -3,7 +3,7 @@
#include <sourcemod>
#include <multicolors>
bool NewPlayer[MAXPLAYERS + 1] = { false, ... };
bool g_bNewPlayer[MAXPLAYERS + 1] = { false, ... };
Database g_hDatabase;
@ -77,7 +77,7 @@ public void SQL_OnQueryCompleted(Database db, DBResultSet results, const char[]
return;
}
NewPlayer[client] = true;
g_bNewPlayer[client] = true;
NewPlayerMessage(client);
char sQuery[512];
Format(sQuery, sizeof(sQuery), "INSERT INTO connections (auth) VALUES ('%s')" , sAuthID);
@ -90,6 +90,11 @@ public Action NewPlayerMessage(int client)
char sName[128];
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);
}
public void OnClientDisconnect(int client)
{
g_bNewPlayer[client] = false;
}