Forward létre van hozva.
public OnGameModeInit()
{
SetTimer(\"Timer\", 1000, 1);
return 1;
}
public Timer()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(Belepve == 1 && Mostlepett == 0)
{
new Float:health;
GetPlayerHealth(i, health);
if(health < 20)
{
if(IsPlayerInAnyVehicle(i))
{
RemovePlayerFromVehicle(i);
ApplyAnimation(i, \"SWEET\", \"Sweet_injuredloop\",4.0,1,0,0,0,-1);
Anim = 1;
}
ApplyAnimation(i, \"SWEET\", \"Sweet_injuredloop\",4.0,1,0,0,0,-1);
Anim = 1;
}
}
if(Frakcio(i, 9))
TuzEllenorzes(i);
if(Drog[Lerakva] == 1)
{
Drog[ido] --;
if(Drog[ido] <= 0)
{
Drog[Lerakva] = 0;
Drog[Kierett] = 1;
Drog[ido] = 0;
}
}
if(resitimer >= 0)
{
resitimer--;
format(str, sizeof str, \"SZERVER RESTART: %d\", resitimer);
TextDrawSetString(TDResi, str);
}
new level = Szint;
SetPlayerScore(i, level);
if(Anim != 0)
{
if(IsPlayerInAnyVehicle(i)) RemovePlayerFromVehicle(i);
ApplyAnimation(i, \"SWEET\", \"Sweet_injuredloop\",4.0,1,0,0,0,-1);
}
if(Bilincsben == 1)
{
if(Bilincsido <= 0)
{
TogglePlayerControllable(i, 1);
Bilincsben = 0;
Bilincsido = 0;
if(Sokkolva == 1)
Sokkolva = 0;
}
else
{
Bilincsido -= 1;
}
}
if(EllopTime != 0)
{
EllopTime--;
if(EllopTime < 2)
{
EllopTime = 0;
MotorInditas(EllopKocsi);
EllopKocsi = 0;
TogglePlayerControllable(i, 1);
KozelUzi(i, 15.0, \"* Valaki elkötött egy jármûvet.\", COLOR_PURPLE);
}
}
if(BoltRob != 0)
{
BoltRob --;
if(BoltRob < 2)
{
BoltRob = 0;
BoltRabolva = 0;
}
}
if(ResiTime > 0)
{
ResiTime --;
if(ResiTime < 1)
{
ResiTime = 0;
SendRconCommand(\"gmx\");
}
}
if(BankRob > 0)
{
BankRob --;
if(BankRob < 1)
{
BankRob = 0;
BankRabolva = 0;
}
}
if(Bortonben > 0)
{
Bortonido --;
if(Bortonido <= 0)
{
SetPlayerPos(i, -217.8447,979.2454,19.5042);
Bortonben = 0;
Bortonido = 0;
Msg(i, \"Kikerültél a börtönbõl.\");
}
}
}
return 1;
}