PHP код:
public Checker(){
new string[256];
new ora,minuti,secondi;
gettime(ora,minuti,secondi);
for(new b = 0; b < 50; b++)
{
if(Bomb[b][invehicle]!=0)
{
new Float: X, Float: Y, Float: Z;
GetVehiclePos(Bomb[b][invehicle],X,Y,Z);
Bomb[b][bombx]=X;
Bomb[b][bomby]=Y;
Bomb[b][bombz]=Z;
}
}
for (new i = 0; i <= MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && PLAYERLIST_authed[i])
{
SetPlayerScore(i,PlayerInfo[i][playerlvl]);
if(PlayerInfo[i][jail]==1 && PlayerInfo[i][jailtime]>2)
{
new Float:tmpx, Float:tmpy, Float:tmpz;
GetPlayerPos(i,tmpx,tmpy,tmpz);
if(!IsPlayerInSphere(i,2541.0,-3762.0,25.0,10))
{
SetPlayerPos(i,2541.0,-3762.0,25.0);
SetPlayerInterior(i,0);
FreezePlayer(i);
SendClientMessage(i,COLOR_RED,"[JAIL] You must be in jail until the jailtime end!");
}
PlayerInfo[i][jailtime]=PlayerInfo[i][jailtime]-1;
new tmpstr[40];
format(tmpstr,40,"~w~Jail left~n~~r~%d",PlayerInfo[i][jailtime]);
GameTextForPlayer(i,tmpstr,800,1); //INFO TD
// TextDrawSetString(InfoTD[i],tmpstr);
}
if(PlayerInfo[i][jail]==1 && PlayerInfo[i][jailtime]<=3)
{
SendClientMessage(i,COLOR_GREEN,"[JAIL] You are free now, have a nice day and make a good RP");
TextDrawHideForPlayer(i,InfoTD[i]);
UnJail(i);
}
}
if(AttemptToLog[i] > 3)
{
format(string, sizeof(string), " %s typed more times a wrong password. Maybe he attempt to hack account!",PlayerName(i));
SendAdminMessage(COLOR_GREEN,string);
AttemptToLog[i] = 0;
SendClientMessage(i,COLOR_ORANGE,"If you lost your password contact a admin ! If you continue typing wrong passwords you may be banned !");
if(!IsPlayerNPC(i)) Kick(i);
}
new Float:armour;
GetPlayerArmour(i,armour);
if(armour >98 && PlayerTemp[i][ishealing] == 0)
{
if(PlayerInfo[i][power]<10 && !IsPlayerNPC(i))
{
format(string, sizeof(string), " %s was catched with %.0f armour !",PlayerName(i),armour);
SendAdminMessage(COLOR_GREEN,string);
SendClientMessage(i,COLOR_ORANGE,"You have been detected with cheats !");
BanReas("SERVER",i,"Bye Bye Cheater !!!");
dUserSet(PlayerName(i)).("bannedby","Server");
dUserSet(PlayerName(i)).("bannedbyreason","Armour Hack");
}
}
if(Traced[i] != -1 && TracingX[i] != 99999 && TracingY[i] != 99999 && TracingZ[i] != 99999)
{
if(!IsPlayerInAnyInterior(i))
{
GetPlayerPos(Traced[i],TracingX[i],TracingY[i],TracingZ[i]);
SetPlayerCheckpoint(i,TracingX[i],TracingY[i],TracingZ[i],3.0);
}
}
/* if(backup[i] != -1 && backupingX[i] != 99999 && backupingY[i] != 99999 && backupingZ[i] != 99999)
{
if(!IsPlayerInAnyInterior(i))
{
GetPlayerPos(Traced[i],backupingX[i],backupingY[i],backupingZ[i]);
SetPlayerCheckpoint(i,backupingX[i],backupingY[i],backupingZ[i],3.0);
}
}*/
if(PlayerTemp[i][examen] == 1 && ExamCP[i] != 0)
{
new car = GetPlayerVehicleID(i);
if(GetPlayerState(i) != PLAYER_STATE_DRIVER)
{
ExamCP[i] = 0;
SendClientMessage(i,COLOR_ORANGE, "You failed the test because you exited the vehicle during test!");
DisablePlayerCheckpoint(i);
SetVehicleToRespawn(car);
PlayerTemp[i][examen] = 0;
}
}
if(PlayerTemp[i][examen] == 1 && ExamCP[i] != 0)
{
new carinfo = GetPlayerVehicleID(i);
new Float:health;
GetVehicleHealth(carinfo, health);
if(health < 1000.0)
{
PlayerTemp[i][examen] = 0;
ExamCP[i] = 0;
SendClientMessage(i,COLOR_ORANGE, "You failed the test because you damaged the car!");
DisablePlayerCheckpoint(i);
new car = GetPlayerVehicleID(i);
SetVehicleToRespawn(car);
}
}
if(PlayerTemp[i][examen] == 1 && ExamCP[i] != 0)
{
if(PlayerTemp[i][speedvalue]>200)
{
PlayerTemp[i][examen] = 0;
ExamCP[i] = 0;
SendClientMessage(i,COLOR_ORANGE, "You failed the test because you exceeded the speed limit off 200 km/h!");
DisablePlayerCheckpoint(i);
new car = GetPlayerVehicleID(i);
SetVehicleToRespawn(car);
}
}
if(loading[i]> 0 && CollectGuns[i] != 999)
{
loading[i]--;
new lstr[256];
format(lstr,sizeof(lstr),"~r~Collecting Gun: ~g~%d",loading[i]);
GameTextForPlayer(i,lstr,3000,3);
if(loading[i]<1 && GunsCP[i] < 5)
{
loading[i]=0;
UnfreezePlayer(i);
GameTextForPlayer(i,"~r~Gunpart ~g~collected succefully! ~n~ ~y~Go to next Location!",3000,3);
}
if(loading[i]<1 && GunsCP[i] > 4)
{
loading[i]=0;
UnfreezePlayer(i);
GameTextForPlayer(i,"~r~Guns ~g~collected succefully! ~n~ ~y~Go and unload them !",3000,3);
}
}
if(loading[i]>0 && CollectBullets[i] != 999)
{
loading[i]--;
new lstr[256];
format(lstr,sizeof(lstr),"~r~Collecting Bullets Box: ~g~%d",loading[i]);
GameTextForPlayer(i,lstr,3000,3);
if(loading[i]<1 && BulletsCP[i] < 5)
{
loading[i]=0;
UnfreezePlayer(i);
GameTextForPlayer(i,"~r~Bullets Box ~g~collected succefully! ~n~ ~y~Go to next Location!",3000,3);
}
if(loading[i]<1 && BulletsCP[i] > 4)
{
loading[i]=0;
UnfreezePlayer(i);
GameTextForPlayer(i,"~r~Bullets Boxes ~g~collected succefully! ~n~ ~y~Go and unload them !",3000,3);
}
}
if(loading[i]>0 && CollectDrugs[i] != 999)
{
loading[i]--;
new lstr[256];
format(lstr,sizeof(lstr),"~r~Collecting Drugs: ~g~%d",loading[i]);
GameTextForPlayer(i,lstr,3000,3);
if(loading[i]<1 && DrugsCP[i] < 5)
{
loading[i]=0;
UnfreezePlayer(i);
GameTextForPlayer(i,"~r~Drugs ~g~collected succefully! ~n~ ~y~Go to next Location!",3000,3);
}
if(loading[i]<1 && DrugsCP[i] > 4)
{
loading[i]=0;
UnfreezePlayer(i);
GameTextForPlayer(i,"~r~Drugs ~g~collected succefully! ~n~ ~y~Go and unload them !",3000,3);
}
}
if(loading[i]>0 && Unloading[i] != 999)
{
loading[i]--;
new lstr[256];
format(lstr,sizeof(lstr),"~r~Unloading: ~y~%d",loading[i]);
GameTextForPlayer(i,lstr,3000,3);
if(loading[i]<1 && Unloading[i] == 1)
{
Unloading[i] = 999;
UnfreezePlayer(i);
GameTextForPlayer(i,"~r~Stuffs succefully unloaded to ~y~deposit!",3000,3);
}
}
if(loading[i]>0 && LoadingX[i] == 1)
{
loading[i]--;
new lstr[256];
format(lstr,sizeof(lstr),"~r~Loading from Deposit: ~y~%d",loading[i]);
GameTextForPlayer(i,lstr,3000,3);
if(loading[i]<1 && LoadingX[i] == 1)
{
LoadingX[i] = 999;
UnfreezePlayer(i);
GameTextForPlayer(i,"~r~Stuffs succefully loaded from ~y~deposit!",3000,3);
}
}
/*if(JailInTime[i] != 999)
{
JailInTime[i]--;
if(JailInTime[i] < 1)
{
Jail2(i,600,666);
JailInTime[i] = 999;
}
}*/
if(loading[i]>0 && CreatingGun[i] == 1)
{
loading[i]--;
new lstr[256];
format(lstr,sizeof(lstr),"~r~Creating Gun: ~y~%d",loading[i]);
GameTextForPlayer(i,lstr,3000,3);
if(loading[i]<1 &&CreatingGun[i] ==1)
{
UnfreezePlayer(i);
CreatingGun[i] = 999;
GameTextForPlayer(i,"~r~Gun succefully created !",3000,3);
format(lstr,sizeof(lstr),"(( %s )) have a gun in hand.",PlayerName(i));
NearMessage(i,lstr,COLOR_LIGHTBLUE);
}
}
if(loading[i]>0 && IsInRobery[i] == 1)
{
loading[i]--;
new lstr[256],nomefile[64];
new robcash,newbizcash;
new stringz[MAX_STRING];
format(lstr,sizeof(lstr),"~r~Time Till Rob is Done: ~y~%d",loading[i]);
GameTextForPlayer(i,lstr,3000,3);
if(loading[i]<1 && IsInRobery[i] == 1)
{
format(nomefile,sizeof(nomefile),"Businesses/%s.txt",biz[RobbedBiz[i]][bizname]);
new tmpcash = dini_Int(nomefile,"bizcash");
dini_IntSet(nomefile,"closed",0);
if(tmpcash > 10000)
{
if(RobbedBizBy[i]==1)
{
new randomx = random(10);
if(randomx <=5)
{
GivePlayerMoneyEx(i, tmpcash/10);
format(stringz,sizeof(stringz),"You succefully robbed %d $ !",tmpcash/10);
SendClientMessage(i,COLOR_LIGHTGREEN,stringz);
RobbedBizBy[i]=-1;
robcash = tmpcash/10;
newbizcash = tmpcash-robcash;
dini_IntSet(nomefile,"bizcash",newbizcash);
}
if(randomx <=8 && randomx >5)
{
GivePlayerMoneyEx(i, tmpcash/9);
format(stringz,sizeof(stringz),"You succefully robbed %d $ !",tmpcash/9);
SendClientMessage(i,COLOR_LIGHTGREEN,stringz);
RobbedBizBy[i]=-1;
robcash = tmpcash/9;
newbizcash = tmpcash-robcash;
dini_IntSet(nomefile,"bizcash",newbizcash);
}
if(randomx <=10 && randomx>8)
{
GivePlayerMoneyEx(i, tmpcash/8);
format(stringz,sizeof(stringz),"You succefully robbed %d $ !",tmpcash/8);
SendClientMessage(i,COLOR_LIGHTGREEN,stringz);
RobbedBizBy[i]=-1;
robcash = tmpcash/8;
newbizcash = tmpcash-robcash;
dini_IntSet(nomefile,"bizcash",newbizcash);
}
new xstri[MAX_STRING];
if(!strlen(dini_Get(nomefile,"name")))
{
format(xstri,sizeof(xstri),"-= %s businesses has been robbed! Cops are heading over there!",biz[RobbedBiz[i]][bizname]);
}
else
{
format(xstri,sizeof(xstri),"-= %s businesses has been robbed! Cops are heading over there!",dini_Get(nomefile,"name"));
}
SendClientMessageToAll(COLOR_WHITE,"-------------------[ ROBBERY ]--------------------");
SendClientMessageToAll(COLOR_LIGHTGREEN,xstri);
new xtra[MAX_STRING];
format(xtra,sizeof(xtra),"%s opens the businesses doors !",PlayerName(i));
NearMessage(i,xtra,COLOR_ME);
}
IsInRobery[i]=0;
RobbedBiz[i]=-1;
GameTextForPlayer(i,"~r~Robery complete !",3000,3);
}
else return SendClientMessage(i,COLOR_RED,"Faillll... No money inside business!");
}
}
if(loading[i]>0 && PlayerTemp[i][wforfish] == 1)
{
loading[i]--;
new lstr[256];
new stringa[MAX_STRING];
format(lstr,sizeof(lstr),"~g~Waiting ... ~y~%d",loading[i]);
GameTextForPlayer(i,lstr,3000,3);
if(loading[i]<1 && PlayerTemp[i][wforfish] == 1)
{
UnfreezePlayer(i);
PlayerTemp[i][wforfish] = 0;
new fishtype = random(4);
new fishweight = random(140)+40;
if(fishtype == 0)
{
format(stringa,sizeof(stringa),"%s rolls rod line back and sees that he caught a Shark",PlayerName(i));
NearMessage(i,stringa,COLOR_ME);
format(stringa,sizeof(stringa),"You have caught a Shark, which weights %d Lbs.",fishweight);
SendClientInfo(i,stringa);
new ffish = PlayerTemp[i][myfish];
ffish = ffish+fishweight;
PlayerTemp[i][myfish] = ffish;
if(PlayerTemp[i][fishplace] != 3)
{
SendClientMessage(i,COLOR_YELLOW,"Go fish in another place !");
}
if(PlayerTemp[i][fishplace] == 3 && PlayerTemp[i][myfish] > 1499)
{
SendClientMessage(i,COLOR_YELLOW,"Go fish in another place !");
PlayerTemp[i][fishplace] = 2;
DisablePlayerCheckpoint(i);
SetPlayerCheckpoint(i,1738.3591,512.1741,-0.1867,60);
}
}
if(fishtype == 1)
{
format(stringa,sizeof(stringa),"%s rolls rod line back and sees that he caught a Tuna",PlayerName(i));
NearMessage(i,stringa,COLOR_ME);
format(stringa,sizeof(stringa),"You have caught a Tuna, which weights %d Lbs.",fishweight);
SendClientInfo(i,stringa);
new ffish = PlayerTemp[i][myfish];
ffish = ffish+fishweight;
PlayerTemp[i][myfish] = ffish;
if(PlayerTemp[i][fishplace] != 3)
{
SendClientMessage(i,COLOR_YELLOW,"Go fish in another place !");
}
if(PlayerTemp[i][fishplace] == 3 && PlayerTemp[i][myfish] > 1499)
{
SendClientMessage(i,COLOR_YELLOW,"Go fish in another place !");
PlayerTemp[i][fishplace] = 2;
DisablePlayerCheckpoint(i);
SetPlayerCheckpoint(i,1738.3591,512.1741,-0.1867,60);
}
}
if(fishtype == 2)
{
format(stringa,sizeof(stringa),"%s rolls rod line back and sees that he caught a Swordfish",PlayerName(i));
NearMessage(i,stringa,COLOR_ME);
format(stringa,sizeof(stringa),"You have caught a Swordfish, which weights %d Lbs.",fishweight);
SendClientInfo(i,stringa);
new ffish = PlayerTemp[i][myfish];
ffish = ffish+fishweight;
PlayerTemp[i][myfish] = ffish;
if(PlayerTemp[i][fishplace] != 3)
{
SendClientMessage(i,COLOR_YELLOW,"Go fish in another place !");
}
if(PlayerTemp[i][fishplace] == 3 && PlayerTemp[i][myfish] > 1499)
{
SendClientMessage(i,COLOR_YELLOW,"Go fish in another place !");
PlayerTemp[i][fishplace] = 2;
DisablePlayerCheckpoint(i);
SetPlayerCheckpoint(i,1738.3591,512.1741,-0.1867,60);
}
}
if(fishtype == 3)
{
format(stringa,sizeof(stringa),"%s rolls rod line back and sees that he caught a Murena",PlayerName(i));
NearMessage(i,stringa,COLOR_ME);
format(stringa,sizeof(stringa),"You have caught a Murena, which weights %d Lbs.",fishweight);
SendClientInfo(i,stringa);
new ffish = PlayerTemp[i][myfish];
ffish = ffish+fishweight;
PlayerTemp[i][myfish] = ffish;
if(PlayerTemp[i][fishplace] != 3)
{
SendClientMessage(i,COLOR_YELLOW,"Go fish in another place !");
}
if(PlayerTemp[i][fishplace] == 3 && PlayerTemp[i][myfish] > 1499)
{
SendClientMessage(i,COLOR_YELLOW,"Go fish in another place !");
PlayerTemp[i][fishplace] = 2;
DisablePlayerCheckpoint(i);
SetPlayerCheckpoint(i,1738.3591,512.1741,-0.1867,60);
}
}
if(fishtype == 4)
{
SendClientError(i,"You didnt catched nothing!");
if(PlayerTemp[i][fishplace] != 3)
{
SendClientMessage(i,COLOR_YELLOW,"Go fish in another place !");
}
}
}
}
if(JustDied[i]!=0)
{
JustDied[i]--;
}
if(JustDied[i]<1)
{
JustDied[i]=0;
}
if(PlayerTemp[i][quarrystarted] ==1)
{
if(IsPlayerInAnyVehicle(i))
{
if(IsPlayerInSphere(i,808.8862,842.8525,9.9567,20) || IsPlayerInSphere(i,540.4312,727.8328,12.8627,20) || IsPlayerInSphere(i,370.3582,983.9329,30.1614,20))
{
new car = GetPlayerVehicleID(i);
SetVehicleToRespawn(car);
SendClientMessage(i,COLOR_ORANGE,"You're not allowed to exit the quarry with the quarry cars!");
}
}
}
if(HideTD[i]>0)
{
HideTD[i]--;
if(HideTD[i]==0)
{
TextDrawHideForPlayer(i,BizTD[i]);
}
}
if(HideInfo[i]>0)
{
HideInfo[i]--;
if(HideInfo[i]==0)
{
TextDrawHideForPlayer(i,InfoTD[i]);
}
}
if(BuyTicketTime[i] >0 && BoughtTicket[i] == 0 && GetPlayerVehicleID(i) == 404)
{
BuyTicketTime[i]--;
}
if(BuyTicketTime[i] <1 && BoughtTicket[i] == 0 && GetPlayerVehicleID(i) == 404 && KickedOut[i]==1)
{
new stringg[MAX_STRING];
BuyTicketTime[i] = 0;
KickedOut[i]=0;
RemovePlayerFromVehicle(i);
format(stringg,sizeof(stringg),"Bus Driver kicks out %s because he didnt payed the ticket!",PlayerName(i));
NearMessage(i,stringg,COLOR_ME);
ShowPlayerDialog(i,68,DIALOG_STYLE_MSGBOX,"Kicked","You have been kicked out of bus!","Fuck You","Nothing");
}
if(BuyTicketTime[i] >0 && BoughtTicket2[i] == 0 && GetPlayerVehicleID(i) == 450)
{
BuyTicketTime[i]--;
}
if(BuyTicketTime[i] <1 && BoughtTicket2[i] == 0 && GetPlayerVehicleID(i) == 450 && KickedOut[i]==1)
{
new stringg[MAX_STRING];
BuyTicketTime[i] = 0;
KickedOut[i]=0;
RemoveDriverFromCar(i);
format(stringg,sizeof(stringg),"Train Driver kicks out %s because he didnt payed the ticket!",PlayerName(i));
NearMessage(i,stringg,COLOR_ME);
ShowPlayerDialog(i,68,DIALOG_STYLE_MSGBOX,"Kicked","You have been kicked out of train!","Fuck You","Nothing");
}
if(IsPlayerNPC(i))
{
new npcname[MAX_PLAYER_NAME];
GetPlayerName(i, npcname, sizeof(npcname));
if(!strcmp(npcname, "Bus_Driver", true))
{
if(GetPlayerVehicleID(i) != 404)
{
PutPlayerInVehicle(i, 404, 0);
}
}
if(!strcmp(npcname, "Airplane_Driver", true))
{
if(GetPlayerVehicleID(i) != 405)
{
PutPlayerInVehicle(i, 405, 0);
}
}
if(!strcmp(npcname, "Train_Driver", true))
{
if(GetPlayerVehicleID(i) != 450)
{
PutPlayerInVehicle(i, 450, 0);
}
}
}
if(IsTackled[i]==1 && FreezeTime[i]!=0 && IsKnockouted[i]==0)
{
FreezePlayer(i);
FreezeTime[i]--;
new lstr[256];
format(lstr,sizeof(lstr),"~r~You can get up in: ~y~%d",FreezeTime[i]);
GameTextForPlayer(i,lstr,3000,3);
if(IsTackled[i]==1 && FreezeTime[i]<1)
{
IsTackled[i]=0;
UnfreezePlayer(i);
FreezeTime[i]=0;
}
}
if(IsKnockouted[i] == 1 && FreezeTime[i]!=0)
{
FreezeTime[i]--;
IsTackled[i]=0;
FreezePlayer(i);
if(IsKnockouted[i] == 1 && FreezeTime[i]<1)
{
new stringg[MAX_STRING];
IsKnockouted[i]=0;
UnfreezePlayer(i);
FreezeTime[i]=0;
format(stringg,sizeof(stringg),"%s opens his eyes and feels bad. He doest remember what happened",PlayerName(i));
NearMessage(i,stringg,COLOR_ME);
SetPlayerDrunkLevel(i, 5000);
}
}
}
return 1;
}