PHP код:
public ModProcessor()
{
CheckProcessorTimer++;
new hour, minute;
gettime(hour,minute,_);
new clock[17];
format(clock, sizeof(clock), "%02d:%02d", hour, minute);
TextDrawSetString(Clock, clock);
for(new i = GetPlayerPoolSize(); i >= 0; i--)
{
//if((!IsPlayerConnected(i)) || (GetPVarInt(i,"IsPlayerSpawned") != 1))return true;
if(!IsPlayerConnected(i)) continue;
if(GetPVarInt(i,"IsPlayerSpawned") == 1)
{
SetPVarInt(i, "AFKTime", GetPVarInt(i, "AFKTime") + 1);
if(GetPVarInt(i, "AFKTime") >= 4)
{
new afkstring[18];
if(GetPVarInt(i, "AFKTime") > 3599) return format(afkstring, sizeof(afkstring), "На паузе %d:%02d:%02d", floatround(GetPVarInt(i, "AFKTime") / 3600), floatround((GetPVarInt(i, "AFKTime") - 3600) / 60), GetPVarInt(i, "AFKTime") - 3600);
else if(GetPVarInt(i, "AFKTime") > 59) format(afkstring, sizeof(afkstring), "На паузе %d:%02d", floatround(GetPVarInt(i, "AFKTime") / 60), GetPVarInt(i, "AFKTime") - 60);
else format(afkstring, sizeof(afkstring), "На паузе %d сек.", GetPVarInt(i, "AFKTime"));
SetPlayerChatBubble(i, afkstring, yellow, 10.0, 1000);
}
if(SI[i][Time] == -1)
return SetPlayerTime(i,hour,minute);
if(GetPVarInt(i,"ACWorld") > 0)
if(GetPlayerVirtualWorld(i) != AW)
return SetPlayerVirtualWorld(i,AW);
if ( GetPVarInt ( i, "Mute" ) > 0 )
{
SetPVarInt ( i, "Mute", GetPVarInt (i, "Mute" ) -1 );
if ( GetPVarInt ( i, "Mute" ) == 0 )
return SendClientMessage (i, red, "Вы снова можете писать в чат!" );
}
if(GetPVarInt(i,"DMZONES") != 1 && GetPVarInt(i,"ACWorld") != 1 && GetPlayerVirtualWorld(i) != AW)
{
if(GetPlayerWeapon(i) == 38 || GetPlayerWeapon(i) == 44 || GetPlayerWeapon(i) == 45 || GetPlayerWeapon(i) == 35 || GetPlayerWeapon(i) == 36 || GetPlayerWeapon(i) == 37)
{
new string[108];
format(string,sizeof(string),"{819FF7}.:: Игрок %s(%d) отправлен в Читерский Мир. Причина: Weapon-Hack ::..",PlayerInfo[i][pName],i);
MessageToAdmins2(orange,string);
SaveIn("Chitmir",string);
SetPlayerVirtualWorld(i,AW);
SetPVarInt(i,"ACWorld",1);
return SendClientMessage(i,yellow,"[RDD]: {81DAF5}Вы были отправлены в Читерский Мир!. Причина: Weapon-Hack");
}
}
switch(GetPlayerScore(i)/100)
{
case 0..19: SetPVarInt(i,"Kills_Lvl",1);
case 20..29: SetPVarInt(i,"Kills_Lvl",2);
case 30..39: SetPVarInt(i,"Kills_Lvl",3);
case 40..49: SetPVarInt(i,"Kills_Lvl",4);
case 50..59: SetPVarInt(i,"Kills_Lvl",5);
case 60..69: SetPVarInt(i,"Kills_Lvl",6);
case 70..79: SetPVarInt(i,"Kills_Lvl",7);
case 80..89: SetPVarInt(i,"Kills_Lvl",8);
case 90..99: SetPVarInt(i,"Kills_Lvl",9);
case 100..119: SetPVarInt(i,"Kills_Lvl",10);
case 120..139: SetPVarInt(i,"Kills_Lvl",11);
case 140..159: SetPVarInt(i,"Kills_Lvl",12);
case 160..179: SetPVarInt(i,"Kills_Lvl",13);
case 180..199: SetPVarInt(i,"Kills_Lvl",14);
case 200..219: SetPVarInt(i,"Kills_Lvl",15);
case 220..239: SetPVarInt(i,"Kills_Lvl",16);
case 240..259: SetPVarInt(i,"Kills_Lvl",17);
case 260..279: SetPVarInt(i,"Kills_Lvl",18);
case 280..299: SetPVarInt(i,"Kills_Lvl",19);
case 300..349: SetPVarInt(i,"Kills_Lvl",20);
case 350..399: SetPVarInt(i,"Kills_Lvl",21);
case 400..449: SetPVarInt(i,"Kills_Lvl",22);
case 450..499: SetPVarInt(i,"Kills_Lvl",23);
case 500..549: SetPVarInt(i,"Kills_Lvl",24);
case 550..599: SetPVarInt(i,"Kills_Lvl",25);
case 600..649: SetPVarInt(i,"Kills_Lvl",26);
case 650..749: SetPVarInt(i,"Kills_Lvl",27);
case 750..899: SetPVarInt(i,"Kills_Lvl",28);
case 900..999: SetPVarInt(i,"Kills_Lvl",29);
case 1000..1599: SetPVarInt(i,"Kills_Lvl",30);
case 1600..2199: SetPVarInt(i,"Kills_Lvl",31);
case 2200..2799: SetPVarInt(i,"Kills_Lvl",32);
case 2800..3399: SetPVarInt(i,"Kills_Lvl",33);
case 3400..3999: SetPVarInt(i,"Kills_Lvl",34);
default: SetPVarInt(i,"Kills_Lvl",35);
}
new str[32];
format(str,sizeof(str),".:SCR: %d / LVL: %d:.",GetPlayerScore(i), GetPVarInt(i,"Kills_Lvl"));
PlayerTextDrawSetString(i,dlscore[3], str);
PlayerTextDrawShow(i,dlscore[3]);
if(GetPlayerDistanceFromPoint(i, 256.8835,-1855.9874,5.8387) <= 70.0)
{
if(GetPVarInt(i,"DISKOTEKA") == 0 && GetPVarInt(i,"DiscoOn") == 1)
{
SetPlayerTime(i,2,0);
SetPlayerWeather(i,17);
SetPVarInt(i,"DISKOTEKA",1);
PlayAudioStreamForPlayer(i, MusicURL, 256.8835,-1855.9874,5.8387,70,true);
}
}
else if(GetPlayerDistanceFromPoint(i, 256.8835,-1855.9874,5.8387) > 70.0)
if(GetPVarInt(i,"DISKOTEKA") == 1)
SetPVarInt(i,"DISKOTEKA",0), StopAudioStreamForPlayer(i);
}
}
if(CheckProcessorTimer % (60*8) == 0) ReklamaAndWeather();
if(CheckProcessorTimer % (60*60) == 0)
{
for(new playerida = GetPlayerPoolSize(); playerida >= 0; playerida--)
if(IsPlayerConnected(playerida))
SavePlayerStats(playerida);
HousePay();
MoneyForBusiness();
}
if(CheckProcessorTimer % (60*60*24) == 0) CheckProcessorTimer = 0;
return 1;
}