Was wird im "Haupttimer" alles erledigt?
public HauptTimer()
{
TextDrawSetString(Fight, "Gangfight:~n~_~n~_~n~_~n~_~n~_");
UhrzeitZeiger();
for(new i=1;i<MAX_BIZES;i++)
{
UpdateBizText(i);
}
for(new i=0;i<MAX_HOUSES;i++)
{
UpdateHouseText(i);
}
for(new i=0;i<MAX_TANKEN;i++)
{
UpdateTankeText(i);
}
for(new i=0;i<MAX_APLATZ;i++)
{
UpdateAngelText(i);
}
automsg ++;
if(automsg == 600)
{
SendClientMessageToAll(COLOR_YELLOW, "|______________ Live your Dream ______________|");
SendClientMessageToAll(COLOR_WHITE, "Du möchtest dem Server behilflich sein?");
SendClientMessageToAll(COLOR_WHITE, "Dann kaufe dir ein Clubstatus!");
SendClientMessageToAll(COLOR_WHITE, "Dieser ermöglicht dir einige Bonusse!");
SendClientMessageToAll(COLOR_WHITE, "Weitere Informationen im Forum www.LyD-Roleplay.de");
}
else if(automsg == 1200)
{
SendClientMessageToAll(COLOR_YELLOW, "|______________ Live your Dream ______________|");
SendClientMessageToAll(COLOR_WHITE, "Mit /Help sieht du alle Befehle, mit /Navi");
SendClientMessageToAll(COLOR_WHITE, "findest du alle wichtigen Orte!");
SendClientMessageToAll(COLOR_WHITE, "Hast du Fragen oder Probleme? Dann stelle ein");
SendClientMessageToAll(COLOR_WHITE, "Support Ticket mit /Sup. Weitere Daten die zum");
SendClientMessageToAll(COLOR_WHITE, "Projekt gehören, findest du unter /Serverinfo");
}
else if(automsg == 1800)
{
SendClientMessageToAll(COLOR_YELLOW, "|______________ Live your Dream ______________|");
SendClientMessageToAll(COLOR_WHITE, "Wir besitzen auch ein Forum, dieses findest");
SendClientMessageToAll(COLOR_WHITE, "Du unter folgender URL: www.LyD-Roleplay.de!");
SendClientMessageToAll(COLOR_WHITE, "Dort kannst du dich dann für Fraktionen o.ä bewerben.");
SendClientMessageToAll(COLOR_WHITE, "Unsere Teamspeak IP lautet: Teamspeak.LyD-Roleplay.de");
automsg = 0;
}
UpdateInfos();
IntAndVwWFix();
OnPlayerTachoShowHide();
OnUpdateUhr();
OnPlayerUpdateTacho();
new Float:x, Float:y, Float:z;
for(new i = 0 ; i < g_iMaxPlayers ; i++)
{
if(IsPlayerConnected(i) && gPlayerLogged[i])
{
GetPlayerPos(i, x, y, z);
if(Spieler[i][pWanteds] < 1)
{
// Update3DTextLabelText(Spieler[i][pWantedLabel], COLOR_RED, " ");
UpdateDynamic3DTextLabelText(Spieler[i][pWantedLabel], COLOR_RED, " ");
Spieler[i][pWanteds] = 0;
PlayerTextDrawHide(i, Gesucht[i]);
}
if(IsAFK[i] == 1)
{
Update3DTextLabelText(Spieler[i][pAFKLabel], COLOR_PURPLE, "Im AFK-Modus");
}
else if(IsAFK[i] == 0)
{
Update3DTextLabelText(Spieler[i][pAFKLabel], COLOR_PURPLE, " ");
}
OnPlayerTot(i);
OnPlayerJail(i);
OnPlayerMute(i);
if(!IsAFightFaction(GetPlayerFaction(i)))
{
for(new fs;fs<sizeof(FightSystem);fs++)
{
TextDrawHideForPlayer(i, Fight);
TextDrawHideForPlayer(i, FightUnderline);
TextDrawHideForPlayer(i, FightUnderline2);
TextDrawHideForPlayer(i, FightSystem[fs][fsWinFaction]);
TextDrawHideForPlayer(i, FightSystem[fs][fsLoseFaction]);
TextDrawHideForPlayer(i, FightSystem[fs][fsWinKills]);
TextDrawHideForPlayer(i, FightSystem[fs][fsLoseKills]);
TextDrawHideForPlayer(i, FightSystem[fs][fsTime]);
}
}
new str[30];
new wantedstr[16];
format(str, sizeof(str), "Status: ~y~%s", GetPlayerWantedRang(i) );
if(Spieler[i][pWanteds] > 0)
{
// Update3DTextLabelText(Spieler[i][pWantedLabel], COLOR_RED, "Gesucht");
// Update3DTextLabelText(Spieler[i][pWantedLabel], COLOR_RED, "Gesucht");
format(wantedstr, sizeof(wantedstr), "] %i", Spieler[i][pWanteds]);
//SetPlayerWantedLevel(i,Spieler[i][pWanteds]);
}
else {
format(wantedstr, sizeof(wantedstr), "] 0");
//SetPlayerWantedLevel(i,0);
}
PlayerTextDrawSetString(i, Gesucht[i], str);
PlayerTextDrawSetString(i, WantedBar[i], wantedstr);
PlayerTextDrawShow(i, Gesucht[i]);
PlayerTextDrawShow(i, WantedBar[i]);
if(IsPlayerSpectating[i] == 1)
{
SetPlayerInterior(i, GetPlayerInterior(SpectatedPlayer[i]));
SetPlayerVirtualWorld(i, GetPlayerVirtualWorld(SpectatedPlayer[i]));
new SpecStr[155];
new weaponStr[32];
GetWeaponName(GetPlayerWeapon(SpectatedPlayer[i]), weaponStr, 32);
new Float:pHealth, Float:pArmor;
GetPlayerHealth(SpectatedPlayer[i], pHealth);
GetPlayerArmour(SpectatedPlayer[i], pArmor);
format(SpecStr, sizeof(SpecStr), "~y~Name: ~w~%s~n~~y~Leben:~w~ %.f~n~~y~Ruestung:~w~ %.f~n~~y~Level:~w~ %d~n~~y~Waffe: ~w~%s", GetName(SpectatedPlayer[i]), pHealth, pArmor, Spieler[SpectatedPlayer[i]][pLevel], weaponStr);
PlayerTextDrawSetString(i, Spectate[1][i], SpecStr);
PlayerTextDrawShow(i, Spectate[0][i]);
PlayerTextDrawShow(i, Spectate[1][i]);
PlayerTextDrawShow(i, Spectate[2][i]);
PlayerTextDrawShow(i, Spectate[3][i]);
}
else
{
PlayerTextDrawHide(i, Spectate[0][i]);
PlayerTextDrawHide(i, Spectate[1][i]);
PlayerTextDrawHide(i, Spectate[2][i]);
PlayerTextDrawHide(i, Spectate[3][i]);
}
}
}
for(new vehicleid=0;vehicleid<MAX_VEHICLES;vehicleid++)
{
for(new i=0;i<sizeof(drogen);i++){
if(vehicleid == drogen[i]) {
gGas[drogen[i]] = GetMaxTank(vehicleid);
gMaxGas[drogen[i]] = GetMaxTank(vehicleid);
if(!IsVehicleOccupied(drogen[i]))
{
UnLockCar(drogen[i]);
}
}
}
for(new i=0;i<sizeof(wdealer);i++){
if(vehicleid == wdealer[i]) {
gGas[wdealer[i]] = GetMaxTank(vehicleid);
gMaxGas[wdealer[i]] = GetMaxTank(vehicleid);
if(!IsVehicleOccupied(wdealer[i]))
{
UnLockCar(wdealer[i]);
}
}
}
for(new i=0;i<sizeof(combines);i++){
if(vehicleid == combines[i]) {
gGas[combines[i]] = GetMaxTank(vehicleid);
gMaxGas[combines[i]] = GetMaxTank(vehicleid);
if(!IsVehicleOccupied(combines[i]))
{
UnLockCar(combines[i]);
}
}
}
for(new i=0;i<sizeof(bus);i++){
if(vehicleid == bus[i]) {
gGas[bus[i]] = GetMaxTank(vehicleid);
gMaxGas[bus[i]] = GetMaxTank(vehicleid);
if(!IsVehicleOccupied(bus[i]))
{
UnLockCar(bus[i]);
}
}
}
for(new i=0;i<sizeof(flug);i++){
if(vehicleid == flug[i]) {
gGas[flug[i]] = GetMaxTank(vehicleid);
gMaxGas[flug[i]] = GetMaxTank(vehicleid);
if(!IsVehicleOccupied(flug[i]))
{
UnLockCar(flug[i]);
}
}
}
for(new i=0;i<sizeof(truck);i++){
if(vehicleid == truck[i]) {
gGas[truck[i]] = GetMaxTank(vehicleid);
gMaxGas[truck[i]] = GetMaxTank(vehicleid);
if(!IsVehicleOccupied(truck[i]))
{
UnLockCar(truck[i]);
}
}
}
for(new i=0;i<sizeof(schiff);i++){
if(vehicleid == schiff[i]) {
gGas[schiff[i]] = GetMaxTank(vehicleid);
gMaxGas[schiff[i]] = GetMaxTank(vehicleid);
if(!IsVehicleOccupied(schiff[i]))
{
UnLockCar(schiff[i]);
}
}
}
for(new i=0;i<sizeof(bauarb);i++){
if(vehicleid == truck[i]) {
gGas[bauarb[i]] = GetMaxTank(vehicleid);
gMaxGas[bauarb[i]] = GetMaxTank(vehicleid);
if(!IsVehicleOccupied(bauarb[i]))
{
UnLockCar(bauarb[i]);
}
}
}
for(new i=0;i<sizeof(garten);i++){
if(vehicleid == garten[i]) {
gGas[garten[i]] = GetMaxTank(vehicleid);
gMaxGas[garten[i]] = GetMaxTank(vehicleid);
if(!IsVehicleOccupied(garten[i]))
{
UnLockCar(garten[i]);
}
}
}
for(new i=0;i<sizeof(reinigung);i++){
if(vehicleid == reinigung[i]) {
gGas[reinigung[i]] = GetMaxTank(vehicleid);
gMaxGas[reinigung[i]] = GetMaxTank(vehicleid);
if(!IsVehicleOccupied(reinigung[i]))
{
UnLockCar(reinigung[i]);
}
}
}
for(new i=0;i<sizeof(geldt);i++){
if(vehicleid == geldt[i]) {
gGas[geldt[i]] = GetMaxTank(vehicleid);
gMaxGas[geldt[i]] = GetMaxTank(vehicleid);
if(!IsVehicleOccupied(geldt[i]))
{
UnLockCar(geldt[i]);
}
}
}
for(new i=0;i<sizeof(muell);i++){
if(vehicleid == muell[i]) {
gGas[muell[i]] = GetMaxTank(vehicleid);
gMaxGas[muell[i]] = GetMaxTank(vehicleid);
if(!IsVehicleOccupied(muell[i]))
{
UnLockCar(muell[i]);
}
}
}
for(new i=0;i<sizeof(eismann);i++){
if(vehicleid == eismann[i]) {
gGas[eismann[i]] = GetMaxTank(vehicleid);
gMaxGas[eismann[i]] = GetMaxTank(vehicleid);
if(!IsVehicleOccupied(eismann[i]))
{
UnLockCar(eismann[i]);
}
}
}
for(new i=0;i<sizeof(pizzacar);i++){
if(vehicleid == pizzacar[i]) {
gGas[pizzacar[i]] = GetMaxTank(vehicleid);
gMaxGas[pizzacar[i]] = GetMaxTank(vehicleid);
if(!IsVehicleOccupied(pizzacar[i]))
{
UnLockCar(pizzacar[i]);
}
}
}
for(new i=0;i<sizeof(taxicar);i++){
if(vehicleid == taxicar[i]) {
gGas[taxicar[i]] = GetMaxTank(vehicleid);
gMaxGas[taxicar[i]] = GetMaxTank(vehicleid);
if(!IsVehicleOccupied(taxicar[i]))
{
UnLockCar(taxicar[i]);
}
}
}
for(new i=0;i<sizeof(kfzcars);i++){
if(vehicleid == kfzcars[i]) {
gGas[kfzcars[i]] = GetMaxTank(vehicleid);
gMaxGas[kfzcars[i]] = GetMaxTank(vehicleid);
if(!IsVehicleOccupied(kfzcars[i]))
{
UnLockCar(kfzcars[i]);
}
}
}
}
return 1;
}