04.12.2012, 23:07
pawn Код:
}
public OnGameModeInit()
{
InitMapSystem();
EnableStuntBonusForAll(0);
DisableInteriorEnterExits();
SetTimer("UpdateTextdraw", 1000, true);
SetTimer("AntiCheat", 1000, true);
SetTimer("timer_update",14400,true);
gettime(ghour, gminute, gsecond);
FixHour(ghour);
ghour = shifthour;
//------ Textdraws
//------ clock
Clockzz = TextDrawCreate(549.000000,38.000000,"00:00");
TextDrawAlignment(Clockzz,0);
TextDrawBackgroundColor(Clockzz,0x000000ff);
TextDrawFont(Clockzz,2);
TextDrawLetterSize(Clockzz,0.499999,3.199999);
TextDrawColor(Clockzz,0x00ffff99);
TextDrawSetOutline(Clockzz,1);
TextDrawSetProportional(Clockzz,1);
TextDrawSetShadow(Clockzz,1);
//------ Advertisement
AdTextdraw = TextDrawCreate(1.000000, 433.000000, "[Ad] Make an advertisement via /advertisement!");
TextDrawBackgroundColor(AdTextdraw, 0x000000ff);
TextDrawFont(AdTextdraw, 1);
TextDrawLetterSize(AdTextdraw, 0.300000, 1.500000);
TextDrawColor(AdTextdraw, -1);
TextDrawSetOutline(AdTextdraw, 0);
TextDrawSetProportional(AdTextdraw, 1);
TextDrawSetShadow(AdTextdraw, 1);
TextDrawUseBox(AdTextdraw, 1);
TextDrawBoxColor(AdTextdraw, 0x00000033);
TextDrawTextSize(AdTextdraw, 653.000000, 0.000000);
//-----End of textdraws
SetTimer("UpdateClock", 1000, true); //ANTI-CHEAT IN THIS.
SetTimer("ChangeWeather", 720000, true);
SetTimer("RandomMsg", 600000, true);
ConnectMySQL();
new mapname[75];
format(mapname,sizeof(mapname),"mapname %s",revision);
SendRconCommand(mapname);
SetGameModeText("Life of Flying");
new SendCommand[156]; // I don't want to count the letters, do it yourself
format(SendCommand, sizeof(SendCommand), "hostname %s", HOSTNAME); // Format the command into a string.
SendRconCommand(SendCommand); // Execute the command through Rcon.
LoadAirline(1);
LoadAirline(2);
LoadAirline(3);
LoadAirline(4);
LoadAirline(5);
new tmphour;
new tmpminute;
new tmpsecond;
gettime(tmphour, tmpminute, tmpsecond);
FixHour(tmphour);
tmphour = shifthour;
SetWorldTime(tmphour);
randomtimer = SetTimer("RandomTimer", 1000, 1);
onlinetimer = SetTimer("OnlineTimer", 60000, 1); //DYNAMIC SIG TIMER IS IN THIS!!
LoadObjects();
AddAirlineVehiclesSTART();
AddHousesFromSQL();
AddVehiclesFromSQL();
AddPlayerVehicles();
AddMapIcons();
LoadStuff(); // Load the data, MOTD, etc.
LoadTextdraws();
for(new i=0;i<MAX_VEHICLES;i++) {
vfuel[i] = 100; //set fuel to 100 percent
}
SetTimer("UpdateIRC", 5000, true);
return 1;