Advertisement
Guest User

Untitled

a guest
Jul 21st, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.99 KB | None | 0 0
  1. public OnGameModeInit()
  2. {
  3. MapAndreas_Init(MAP_ANDREAS_MODE_MINIMAL);
  4. printf("OnGameModeInit started: %s", GetDateAndTime());
  5.  
  6. gConnection = mysql_connect(SQL_HOSTNAME, SQL_USERNAME, SQL_DATABASE, SQL_PASSWORD, 3306);
  7.  
  8. if (!mysql_errno(gConnection))
  9. {
  10. printf("(MySQL) Successfully connected to \"%s\".", SQL_HOSTNAME);
  11.  
  12. LoadServerInformation();
  13.  
  14. new rconMsg[256];
  15.  
  16. format(rconMsg, sizeof(rconMsg), "hostname %s (%s)", Server[serverName], Server[serverWebsite]);
  17. SendRconCommand(rconMsg);
  18.  
  19. format(rconMsg, sizeof(rconMsg), "%s %s", Server[serverShortName], Server[serverRevision]);
  20. SetGameModeText(rconMsg);
  21.  
  22. format(rconMsg, sizeof(rconMsg), "weburl %s", Server[serverWebsite]);
  23. SendRconCommand(rconMsg);
  24.  
  25. ShowNameTags(0);
  26. LimitGlobalChatRadius(0.0);
  27. SetNameTagDrawDistance(15.0);
  28. DisableInteriorEnterExits();
  29. ManualVehicleEngineAndLights();
  30. EnableStuntBonusForAll(0);
  31. ShowPlayerMarkers(PLAYER_MARKERS_MODE_OFF);
  32.  
  33. SetWeather(13);
  34.  
  35. LoadGlobalTextdraws();
  36.  
  37. // Vehicles
  38. LoadDMVVehicles();
  39. LoadSweeperVehicles();
  40. LoadMowerVehicles();
  41.  
  42. // Other
  43. LoadStaticObjects();
  44. LoadDynamicObjects();
  45. LoadAdminSettings();
  46. LoadAdminTeleports();
  47. LoadFactions();
  48. LoadVehicles();
  49. LoadDroppedItems();
  50. LoadConstructions();
  51. LoadFurnitures();
  52. LoadAdminFurnitures();
  53. LoadSafeItems();
  54. LoadRadioStations();
  55. LoadGates();
  56. LoadTags();
  57. LoadLabels();
  58. LoadUnits();
  59. LoadPlayerUnits();
  60. LoadLockers();
  61. LoadPayphones();
  62. LoadWeaponDamages();
  63. LoadObjects();
  64. LoadPumps();
  65. LoadTrashbins();
  66. LoadTrashItems();
  67. LoadAtms();
  68. LoadBankAccounts();
  69. LoadEconomy();
  70. LoadModShops();
  71. LoadBizProducts();
  72. LoadTicketImpounds();
  73. LoadDeployments();
  74. LoadPBolos();
  75. LoadVBolos();
  76. LoadGanja();
  77. LoadServerStats();
  78.  
  79. // Fun stuff
  80. LoadSpookship();
  81. }
  82. else
  83. {
  84. printf("\a(MySQL) Failed to connect to \"%s\"!", SQL_HOSTNAME);
  85. GameModeExit();
  86. }
  87.  
  88. return 1;
  89. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement