public OnGameModeInit()
{
Connect_To_Database();
//Streamer Settings
Streamer_VisibleItems(0, 800);
Streamer_CellDistance(300.0);
Streamer_CellSize(1000.0);
Streamer_GetMaxItems(STREAMER_TYPE_OBJECT);
Streamer_TickRate(5);
OnGameModeInit2();
}
OnGameModeInit2() {
CollectUnusedAccount();
//HashPasswords();
LoadInfos();
LoadWaffenLager();
LoadFirma();
HouseInteriorLoad();
// HouseLoad(); -> In HouseInteriorLoad
HotelLoad();
AngelLoad();
StaticBizLoad();
BizLoad();
TankeLoad();
LoadFraktionsSafeBox();
InitWerbebanner();
Blinker_Init();
ClearOnlinePlayers();
CreateObj();
#if defined USE_NPCS
ConnectBot(0);
#endif
new action = CAC_ACTION__KICK, max_screenshots, reset_time, status, result[32], type = CAC_GAMERESOURCE_REPORTTYPE__FULL;
for(new i = 0; i != CAC_GLITCH__ALL; ++i)
{
if(getINIString("sampcac_glitch.ini", "glitch", g_szGlitchKeys[i], result))
{
if(!strcmp(result, "on", true, 2))
status = 1;
else
status = 0;
}
else
{
status = 1;
printf(" SAMPCAC: Couldn't read \"%s\" key from \"scriptfiles/sampcac_glitch.ini\"", g_szGlitchKeys[i]);
printf(" SAMPCAC: This glitch is set as enabled by default.");
}
CAC_SetGlitchStatus(i, status);
}
CAC_SetGameResourceReportStatus(CAC_GAMERESOURCE_MODELTYPEFLAG__ALL, 1); // by default, activate all model reports
for(new i = 0; i != sizeof(g_szGameResourceKeys); ++i)
{
if(getINIString("sampcac_gameresource.ini", "gamemodels", g_szGameResourceKeys[i], result))
{
if(i == 0)
{
if(!strcmp(result, "disabled", true, 8))
type = CAC_GAMERESOURCE_REPORTTYPE__DISABLED;
else if(!strcmp(result, "only_if_modded", true, 14))
type = CAC_GAMERESOURCE_REPORTTYPE__ONLY_IF_MODDED;
else
type = CAC_GAMERESOURCE_REPORTTYPE__FULL;
}
else if(i == 1)
{
if(!strcmp(result, "warning", true, 7))
action = CAC_ACTION__WARNING;
else if(!strcmp(result, "ban", true, 3))
action = CAC_ACTION__BAN;
else
action = CAC_ACTION__KICK;
}
else
{
if(!strcmp(result, "off", true, 3))
CAC_SetGameResourceReportStatus(1 << (i-2), 0);
}
}
else
{
printf(" SAMPCAC: Couldn't read \"%s\" key from \"scriptfiles/sampcac_gameresource.ini\"", g_szGameResourceKeys[i]);
if(i == 0)
printf(" SAMPCAC: This option is set as \"full\" by default.");
else if(i == 1)
printf(" SAMPCAC: This option is set as \"kick\" by default.");
else
printf(" SAMPCAC: This option is set as \"enabled\" by default.");
}
}
g_iModAction = action;
CAC_SetGameResourceReportType(type);
for(new i = 0; i != CAC_GAMEOPTION__ALL; ++i)
{
if(getINIString("sampcac_gameoption.ini", "gameoption", g_szGameOptionKeys[i], result))
{
if(i != CAC_GAMEOPTION__SPRINT)
{
if(!strcmp(result, "on", true, 2))
status = 1;
else
status = 0;
}
else
{
if(!strcmp(result, "all_surfaces", true, 12))
status = CAC_GAMEOPTION_STATUS__SPRINT_ALLSURFACES;
else if(!strcmp(result, "disabled", true, 8))
status = CAC_GAMEOPTION_STATUS__SPRINT_DISABLED;
else
status = CAC_GAMEOPTION_STATUS__SPRINT_DEFAULT;
}
}
else
{
status = 0;
printf(" SAMPCAC: Couldn't read \"%s\" key from \"scriptfiles/sampcac_gameoption.ini\"", g_szGameOptionKeys[i]);
printf(" SAMPCAC: This game option is set as disabled by default.");
}
CAC_SetGameOptionStatus(i, status);
}
for(new i = 0; i != CAC_CHEAT__ALL; ++i) //SAMPCAC AntiCheat
{
if(getINIString("sampcac_base.ini", g_szCheatSections[i], "status", result))
{
if(!strcmp(result, "on", true, 2))
status = 1;
else
status = 0;
}
else
{
status = 1;
printf(" SAMPCAC: Couldn't read \"status\" key inside \"%s\" section from \"scriptfiles/sampcac_base.ini\"", g_szCheatSections[i]);
printf(" SAMPCAC: \"status\" for this cheat is set as enabled by default.");
}
if(getINIString("sampcac_base.ini", g_szCheatSections[i], "action", result))
{
if(!strcmp(result, "warning", true, 7))
action = CAC_ACTION__WARNING;
else if(!strcmp(result, "ban", true, 3))
action = CAC_ACTION__BAN;
else
action = CAC_ACTION__KICK;
}
else
{
action = CAC_ACTION__KICK;
printf(" SAMPCAC: Couldn't read \"action\" key inside \"%s\" section from \"scriptfiles/sampcac_base.ini\"", g_szCheatSections[i]);
printf(" SAMPCAC: \"action\" for this cheat is set as \"kick\" by default.");
}
g_iCheatStatus[i] = status;
g_iCheatActions[i] = action;
}
if(getINIString("sampcac_base.ini", "screenshot", "status", result))
{
if(!strcmp(result, "on", true, 2))
status = 1;
else
status = 0;
}
else
{
status = 1;
printf(" SAMPCAC: Couldn't read \"status\" key inside \"screenshot\" section from \"scriptfiles/sampcac_base.ini\"");
printf(" SAMPCAC: \"status\" is set as enabled by default.");
}
if(getINIString("sampcac_base.ini", "screenshot", "max_screenshots", result))
{
max_screenshots = strval(result);
}
else
{
max_screenshots = 1;
printf(" SAMPCAC: Couldn't read \"max_screenshots\" key inside \"screenshot\" section from \"scriptfiles/sampcac_base.ini\"");
printf(" SAMPCAC: \"max_screenshots\" is set to 1.");
}
if(getINIString("sampcac_base.ini", "screenshot", "reset_time", result))
{
reset_time = strval(result);
}
else
{
reset_time = 1000;
printf(" SAMPCAC: Couldn't read \"reset_time\" key inside \"screenshot\" section from \"scriptfiles/sampcac_base.ini\"");
printf(" SAMPCAC: \"reset_time\" is set to 1000 ms.");
}
if(getINIString("sampcac_base.ini", "screenshot", "action", result))
{
if(!strcmp(result, "warning", true, 7))
action = CAC_ACTION__WARNING;
else if(!strcmp(result, "ban", true, 3))
action = CAC_ACTION__BAN;
else
action = CAC_ACTION__KICK;
}
else
{
action = CAC_ACTION__KICK;
printf(" SAMPCAC: Couldn't read \"action\" key inside \"screenshot\" section from \"scriptfiles/sampcac_base.ini\"");
printf(" SAMPCAC: \"action\" for screenshots is set as \"kick\" by default.");
}
g_iScreenshotStatus = status;
g_iScreenshotMax = max_screenshots;
g_iScreenshotResetTime = reset_time;
g_iScreenshotAction = action;
for(new i = 0; i != 256; ++i)
{
if(strcmp(g_szVKNames[i], "NULL") != 0)
{
if(getINIString("sampcac_base.ini", "macro_key_detection", g_szVKNames[i], result))
{
if(!strcmp(result, "on", true, 2))
status = 1;
else
status = 0;
}
else
{
status = 1;
printf(" SAMPCAC: Couldn't read \"%s\" key inside \"macro_key_detection\" section from \"scriptfiles/sampcac_base.ini\"", g_szVKNames[i]);
printf(" SAMPCAC: \"Detection status\" for this key is set as enabled by default.");
}
g_iVKStatus[i] = status;
}
}
SetTimer("Pulse_Banksystem",15013,true);
SetTimer("fraklabeltimer",11941,true);
SetTimer("DetectHacks",11941,true);
SetTimer("Haustier_Follow",631,true);
SetTimer("Pulse_Tickets",5227,true);
SetTimer("Pulse_SInfo",757,true);
SetTimer("gwarentimer",60000*60*3,true);
SetTimer("PayDay",60000,true);
#if defined DEVELOPMENT
SetTimer("SaveAll", ( 2*60*1000 ) + 2161 ,true); // Alle ~10 Minuten
#else
SetTimer("SaveAll", ( 10*60*1000 ) + 2161 ,true); // Alle ~10 Minuten
#endif
SetTimer("World_Pulse",60013 * 59 , true ); // Alle ~60 Minuten
g_EventUhr[EU_tTimer] = INVALID_TIMER_ID;
LoadPlayerColumns();
ExtFire_Init();
InitDrogenPflanzen();
Riesenrad_Init();
Zoll_Init();
ShowPlayerMarkers(0);
LoadFahrzeugVerleih();
InitBallon();
InitWantedKillZones();
SetNameTagDrawDistance(50.0);
SetTimer("HauptTimer", 1013, 1); // Primzahlen
SetTimer("OnPlayerUpdateTacho", 683, 1);
SetTimer("MinuteTimer", 60013, 1); // Primzahlen
SetTimer("FiveMinuteTimer", 60017 * 5, 1); // Primzahlen
SetTimer("Servername", 5003, 1);// Primzahlen
SetTimer("AFK_Check",30851,true);
SetTimer("OnPlayerMoneyCheck",1013,true); // bitte auf 1 Millisekunde
SetTimer("Pulse_Taxi",2281,true);
// SetTimer("FlyHack",8311,true); --> DetectHacks
SetTimer("WantedLabel",15277,true);
SetTimer("FreeLicence",50021,true);
SetTimer("GangZone_Pulse",3221,true);
{
DummyTextDraw = TextDrawCreate(0.0,0.0,"_");
TextDrawFont(DummyTextDraw,1);
TextDrawLetterSize(DummyTextDraw, 0.0, 0.0);
TextDrawUseBox(DummyTextDraw, true);
TextDrawColor(DummyTextDraw,0);
TextDrawBoxColor(DummyTextDraw, 0x00000000);
}
{
BlackBox = TextDrawCreate(0.0,0.0,"_");
TextDrawFont(BlackBox,1);
TextDrawLetterSize(BlackBox, 0.0, 50.0);
TextDrawUseBox(BlackBox, true);
TextDrawColor(BlackBox,0);
TextDrawBoxColor(BlackBox, 0x000000FF);
}
{
tdNoDM = TextDrawCreate(320.000000, 376.000000, "No DM Zone");
TextDrawAlignment(tdNoDM, 2);
TextDrawBackgroundColor(tdNoDM, 255);
TextDrawFont(tdNoDM, 1);
TextDrawLetterSize(tdNoDM, 0.509999, 2.299999);
TextDrawColor(tdNoDM, -16776961);
TextDrawSetOutline(tdNoDM, 1);
TextDrawSetProportional(tdNoDM, 1);
TextDrawUseBox(tdNoDM, 1);
TextDrawBoxColor(tdNoDM, 85);
TextDrawTextSize(tdNoDM, 417.000000, 137.000000);
}
{
tdOffeneTickets = TextDrawCreate( 35.0, 306.0,"Offene Support-Tickets: ~b~~h~2");
TextDrawBackgroundColor(tdOffeneTickets, 255);
TextDrawFont(tdOffeneTickets, 1);
TextDrawLetterSize(tdOffeneTickets, 0.31, 0.31 * 3.5 );
TextDrawColor(tdOffeneTickets,-1);
TextDrawSetOutline(tdOffeneTickets, 1);
}
g_tPulseBank = SetTimer("Pulse_Bankraub",( (BANKRAUB_ZEIT)*1000)+197,false);
g_aiNoDM[0] = CreateDynamicRectangle( 79.0 , 2093.0 , 161.0 , 1516.0 , .interiorid = 6 );
g_aiNoDM[1] = CreateDynamicRectangle( 355.0 , 135.0 , 395.0 , 230.0 , .interiorid = 3 );
g_aiNoDM[2] = CreateDynamicRectangle( 346.0 , -2006.0 , 415.0 , -2191.0, .interiorid = -1 );
g_waiNoDM[0] = CreateDynamicRectangle( 1602.0 , -1864.0 , 1419.0 , -1581.0, .interiorid = -1 );
g_waiNoDM[1] = CreateDynamicRectangle( 1284.0 , -1776.0 , 1157.0 , -1846.0, .interiorid = -1 );
g_waiNoDM[2] = CreateDynamicRectangle( 788.0 , -1388.0 , 849.0 , -1331.0, .interiorid = -1 );
g_iWantedHackerZone = CreateDynamicRectangle( 1405.9171 , -1752.7811 , 1649.2175 , -1563.5104 , .interiorid = 0 ,.worldid = 0);
g_iAlhambra = CreateDynamicCube(470.0,-27.0,998.0,510.0,5.0,1010.0,.interiorid = 17);
//g_iCasino = CreateDynamicCube(1969.0,981.0,996.0,2020.0,1040.0,996.0,.interiorid = 10);
EnableStuntBonusForAll(0);
//ChangeWeather();
// SetTimer("ChangeWeather", 60000*30, 1);
for(new at = 0;at<sizeof(ATM);at++)
{
CreateDynamic3DTextLabel(COLOR_HEX_BLUE"Bankautomat tippe:"COLOR_HEX_WHITE"\n{FFFFFF}/ATM",0xFFFFFFFF, ATM[at][0], ATM[at][1], ATM[at][2]+1, 10.0);
}
new lagerstr[128];
format(lagerstr, sizeof(lagerstr), COLOR_HEX_BLUE"Lagerbestand\n"COLOR_HEX_WHITE"%d Pakete\nTippe /Paketeinladen"COLOR_HEX_BLUE"/"COLOR_HEX_WHITE" um Pakete zu entnehmen\n"COLOR_HEX_BLUE"500$ pro Paket", lagerbestand);
lager3d = CreateDynamic3DTextLabel(lagerstr, COLOR_WHITE, -38.4148,56.1184,3.1172, 10.0);
CreateDynamicPickup(1239, 1, -38.4148,56.1184,3.1172,0);
CreateDynamicPickup(1239, 1, 2348.1086,-2302.4243,13.5469);
CreateDynamic3DTextLabel(COLOR_HEX_BLUE"Waffenteile-Pakete\n"COLOR_HEX_WHITE"Tippe /Paketeinladen um Pakete zu entnehmen", COLOR_WHITE, 2348.1086,-2302.4243,13.5469, 15.0);
SetTimer("CheckGas", RunOutTime, 1);
OnUpdateUhr();
OnUpdateDatum();
AntiDeAMX();
ManualVehicleEngineAndLights();
SetGameModeText("German Roleplay");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
DisableInteriorEnterExits();
OAB_OnGameModeInit();
InitZentralMeldung();
//fWheel_init();
for(new i ; i < MAX_PLAYERS ; i++) {
Spieler[i][pKopfgeld] = 0;
Spieler[i][pKopfgeldID] = INVALID_PLAYER_ID;
Spieler[i][pJailed] = INVALID_PLAYER_ID;
Spieler[i][iKidnapID] = INVALID_PLAYER_ID;
}