Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnGameModeInit()
- {
- UsePlayerPedAnims();
- SetTimer("ChangeServerName", 1000, 1);
- new oldtime = GetTickCount();
- AntiDeAMX();
- mysql_debug(0);
- print(" ... GamemodeInit");
- GetServerVarAsString("bind",GlobalString,sizeof(GlobalString));
- if(!GlobalString[0] || strcmp(GlobalString,BINDIP,false))
- {
- printf("SERVER: Der Server ist nicht auf der IP '%s' gebinded!",BINDIP);
- print(" Server wird heruntergefahren ...");
- SendRconCommand("exit");
- return 1;
- }
- MySqlConnection = mysql_connect(SQL_HOST,SQL_USER,SQL_DATA,SQL_PASS);
- if(mysql_ping() == 1)
- {
- print("SERVER: Verbindung zur Datenbank wurde erfolgreich hergestellt.");
- printf("Host: %s,User: %s,Datanbank: %s,Passwort: %s",SQL_HOST,SQL_USER,SQL_DATA,SQL_PASS);
- }
- else
- {
- print("SERVER: Es konnte keine Verbindung zur Datenbank hergestellt werden!");
- print(" Es wird erneut versucht eine Verbindung zur Datenbank herzustellen.");
- printf("Host: %s,User: %s,Datanbank: %s,Passwort: %s",SQL_HOST,SQL_USER,SQL_DATA,SQL_PASS);
- MySqlConnection = mysql_connect(SQL_HOST,SQL_USER,SQL_DATA,SQL_PASS);
- if(mysql_ping() == 1)
- {
- print("SERVER: Es konnte im 2 Versuch eine Verbindung hergestellt werden!");
- printf("Host: %s,User: %s,Datanbank: %s,Passwort: %s",SQL_HOST,SQL_USER,SQL_DATA,SQL_PASS);
- }
- else
- {
- print("SERVER: Es konnte keine Verbindung zur Datenbank hergestellt werden!");
- print(" Server wird heruntergefahren ...");
- SendRconCommand("exit");
- return 1;
- }
- }
- CreateTables();
- SendRconCommand("hostname "#HOST"");
- SendRconCommand("gamemodetext "#SERVERVERSION"");
- SendRconCommand("mapname "#MAPVERSION"");
- SendRconCommand("weburl "#WEBURL"");
- SendRconCommand("maxnpc "#MAXNPC"");
- ManualVehicleEngineAndLights();
- DisableInteriorEnterExits();
- EnableStuntBonusForAll(0);
- LimitGlobalChatRadius(0);
- ShowNameTags(1);
- ShowPlayerMarkers(0);
- AllowInteriorWeapons(1);
- SetNameTagDrawDistance(MAX_STREAM_NAME_DISTANCE);
- AddPlayerClass(1,1833.8286,-1683.4785,13.4570,83.7825,0,0,0,0,0,0);
- WeatherChange();
- ResetElevatorQueue();
- Elevator_Initialize();
- RaceStarted = -1;
- RaceCarType = 0;
- RaceMaxCps = 0;
- lchataktiv = true;
- RaceWinner = 0;
- registration = false;
- login = false;
- GeneratedKey = 100000 + random(50000);
- BombState = false;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement