pawn Код:
public CheckPlayer()
{
foreach(Player, i)
{
if(IsPlayerConnectedEx(i))
{
if(GetTickCount() - pTick[i] > 1500 )
{
if(IsPaused[i] == 0)
{
Player[i][AFKStat] = 1;
IsPaused[i] = 1;
Player[i][CountAFK] = 1;
Player[i][AFKSeconds] = 0;
fSendClientMessageToAll(NOTICE2, "> %s (%d) has paused the game!", GetName(i), i);
}
}
else
{
if(IsPaused[i] == 1)
{
Player[i][AFKStat] = 0;
IsPaused[i] = 0;
Player[i][AFKSeconds] = 0;
fSendClientMessageToAll(NOTICE2, "> %s (%d) has returned into the game!", GetName(i), i);
if(Player[i][ErrorAFK] == 1)
{
DestroyVehicle(GetPlayerVehicleID(i));
SetPlayerColor(i, DEADRED);
SetPlayerCamera(i, CameraX, CameraY, CameraZ, LCameraX, LCameraY, LCameraZ, false);
TogglePlayerSpectating(i, true);
SetTimerEx("RespawnAfterDeath", 6000, false, "d", i);
Player[i][RespawnTime] = 6;
Player[i][IsActive] = 0;
Player[i][LastCar] = -1;
Player[1][ErrorAFK] = 0;
fSendClientMessageToAll(NOTICE, "> %s (%d) has been kicked out of the ring! (AFK to long)", GetName(i), i);
}
}
}
}
}
return 1;
}
public AntiCheat()
{
foreach(Player, i)
{
if(Authenticated[i] == 1)
{
if(Player[i][AntiCheatExemption] == 0)
{
new PMoney = GetPlayerMoney(i);
if(PMoney > Player[i][Money]+4000){ServerBan(i, "Money Hack");}
if(GetPlayerSpecialAction(i) == SPECIAL_ACTION_USEJETPACK){ServerBan(i, "JetPack Cheat");}
if(GetPlayerSpeed(i, 0) > 250){ServerBan(i, "Speed Hack");}
if(GetPlayerWeapon(i) == 18 || GetPlayerWeapon(i) == 16 || GetPlayerWeapon(i) == 27 || GetPlayerWeapon(i) == 35 || GetPlayerWeapon(i) == 36 || GetPlayerWeapon(i) == 37 || GetPlayerWeapon(i) == 38 || GetPlayerWeapon(i) == 39){ServerBan(i, "Weapon Hack");}
if(GetPlayerWeapon(i) != 0){
if(GetPlayerWeapon(i) == 1) ServerBan(i, "Brass Knuckles Hack");
if(GetPlayerWeapon(i) == 2) ServerBan(i, "Golf Club Hack");
if(GetPlayerWeapon(i) == 3) ServerBan(i, "Nightstick Hack");
if(GetPlayerWeapon(i) == 4) ServerBan(i, "Knife Hack");
if(GetPlayerWeapon(i) == 5) ServerBan(i, "Baseball Bat Hack");
if(GetPlayerWeapon(i) == 6) ServerBan(i, "Shovel Hack");
if(GetPlayerWeapon(i) == 7) ServerBan(i, "Pool Cue Hack");
if(GetPlayerWeapon(i) == 8) ServerBan(i, "Katana Hack");
if(GetPlayerWeapon(i) == 9) ServerBan(i, "Chainsaw Hack");
if(GetPlayerWeapon(i) == 22) ServerBan(i, "Colt-45 Hack");
if(GetPlayerWeapon(i) == 23) ServerBan(i, "Silencer Hack");
if(GetPlayerWeapon(i) == 24) ServerBan(i, "Deagle Hack");
if(GetPlayerWeapon(i) == 25) ServerBan(i, "Shotgun Hack");
if(GetPlayerWeapon(i) == 26) ServerBan(i, "Sawnoff Shotgun Hack");
if(GetPlayerWeapon(i) == 28) ServerBan(i, "Micro Uzi Hack");
if(GetPlayerWeapon(i) == 29) ServerBan(i, "MP5 Hack");
if(GetPlayerWeapon(i) == 32) ServerBan(i, "Tec-9 Hack");
if(GetPlayerWeapon(i) == 30) ServerBan(i, "AK47 Hack");
if(GetPlayerWeapon(i) == 31) ServerBan(i, "M4 Hack");
if(GetPlayerWeapon(i) == 33) ServerBan(i, "Country Rifle Hack");
if(GetPlayerWeapon(i) == 34) ServerBan(i, "Sniper Hack");
if(GetPlayerWeapon(i) == 35) ServerBan(i, "Hacks");
if(GetPlayerWeapon(i) == 36) ServerBan(i, "Hacks");
if(GetPlayerWeapon(i) == 37) ServerBan(i, "Hacks");
if(GetPlayerWeapon(i) == 38) ServerBan(i, "Hacks");
if(GetPlayerWeapon(i) == 17) ServerBan(i, "Tear Gas Hack");
if(GetPlayerWeapon(i) == 41) ServerBan(i, "Spraycan Hack");
if(GetPlayerWeapon(i) == 42) ServerBan(i, "Fire Extinguisher Hack");
if(GetPlayerWeapon(i) == 43) ServerBan(i, "Camera Hack");
if(GetPlayerWeapon(i) == 10) ServerBan(i, "Double-ended Dildo Hack");
if(GetPlayerWeapon(i) == 11) ServerBan(i, "Dildo Hack");
if(GetPlayerWeapon(i) == 12) ServerBan(i, "Vibrator Hack");
if(GetPlayerWeapon(i) == 13) ServerBan(i, "Silver Vibrator Hack");
if(GetPlayerWeapon(i) == 14) ServerBan(i, "Flowers Hack");
if(GetPlayerWeapon(i) == 15) ServerBan(i, "Cane Hack");
if(GetPlayerWeapon(i) == 44) ServerBan(i, "Night Vis Goggles Hack");
if(GetPlayerWeapon(i) == 45) ServerBan(i, "Thermal Goggles Hack");
}
}
}
}
return 1;
}
public IsPlayerInArea()
{
new Float:X, Float:Y, Float:Z; //We use this to store player position
for(new i=0; i < MAX_PLAYERS; i++) //This line defines a name for all player, the name is "i"
{
if(IsPlayerConnectedEx(i) && Player[i][IsActive] == 1)
{
GetPlayerPos(i, X, Y, Z); //Here we are storing the player position on the variables X, Y, and Z defined previously
if(Z <= MapHeight)
{
if(Player[i][AdminDuty] == 0 && MapTime != 1200)
{
DestroyVehicle(GetPlayerVehicleID(i));
SetPlayerColor(i, DEADRED);
SetPlayerCamera(i, CameraX, CameraY, CameraZ, LCameraX, LCameraY, LCameraZ, false);
TogglePlayerSpectating(i, true);
SetTimerEx("RespawnAfterDeath", 6000, false, "d", i);
Player[i][RespawnTime] = 6;
Player[i][IsActive] = 0;
Player[i][LastCar] = -1;
Player[i][AliveTime] = 0;
fSendClientMessageToAll(NOTICE, "> %s (%d) has been kicked out of the ring! (Fell Off)", GetName(i), i);
}
}
}
}
}
public GostergeYenile()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnectedEx(i))
{
if(IsPlayerInAnyVehicle(i))
{
TextDrawShowForPlayer(i, Text:ArkaPlan0);
TextDrawShowForPlayer(i, Text:ArkaPlan1);
TextDrawShowForPlayer(i, Text:ArkaPlan2);
TextDrawShowForPlayer(i, Text:ArkaPlan3);
TextDrawShowForPlayer(i, Text:ArkaPlan4);
TextDrawShowForPlayer(i, Text:ArkaPlan5);
TextDrawShowForPlayer(i, Text:ArkaPlan6);
new HGG[265]; new Float:Can;
GetVehicleHealth(GetPlayerVehicleID(i), Can);
GetPlayerPos(i,Xa,Ya,Za);
KMH = floatsqroot(floatpower(floatabs(floatsub(Xa,Xb[i])),2)+floatpower(floatabs(floatsub(Ya,Yb[i])),2)+floatpower(floatabs(floatsub(Za,Zb[i])),2));
KMH *= 14.2;
Yukseklik = Za;
format(HGG, sizeof(HGG), "~b~~h~~h~Name: ~w~%s~n~~g~~h~Speed: ~w~%0.0f km/h~n~~n~~y~~h~Height: ~w~%.1f m~n~~r~~h~Health: ~w~%.2f", VehicleNames[GetVehicleModel(GetPlayerVehicleID(i))-400], KMH, Yukseklik, Can);
TextDrawSetString(Text:GostergeYazi[i], HGG);
TextDrawShowForPlayer(i, GostergeYazi[i]);
if(KMH >= 250)
{
TextDrawTextSize(Hizg[i],603.000000,0.000000);
}
else
{
TextDrawTextSize(Hizg[i], floatadd(534.0, floatdiv(KMH, 3.900000)),0.000000);
}
TextDrawShowForPlayer(i, Hizg[i]);
if(Can < 0)
{
TextDrawTextSize(Cang[i],538.000000,0.000000);
}
else if(Can >= 1000)
{
TextDrawTextSize(Cang[i],603.000000,0.000000);
}
else
{
TextDrawTextSize(Cang[i],floatadd(534.0, floatdiv(Can, 14.6000000)),0.000000);
}
TextDrawShowForPlayer(i, Cang[i]);
TextDrawShowForPlayer(i, Cizgi);
}
else
{
TextDrawHideForPlayer(i, Text:GostergeYazi[i]);
TextDrawHideForPlayer(i, Text:Hizg[i]);
TextDrawHideForPlayer(i, Text:Cang[i]);
TextDrawHideForPlayer(i, Text:ArkaPlan0);
TextDrawHideForPlayer(i, Text:ArkaPlan1);
TextDrawHideForPlayer(i, Text:ArkaPlan2);
TextDrawHideForPlayer(i, Text:ArkaPlan3);
TextDrawHideForPlayer(i, Text:ArkaPlan4);
TextDrawHideForPlayer(i, Text:ArkaPlan5);
TextDrawHideForPlayer(i, Text:ArkaPlan6);
TextDrawHideForPlayer(i, Text:Cizgi);
GetPlayerPos(i,Xb[i],Yb[i],Zb[i]), Xb[i] = Xa; Yb[i] = Ya; Zb[i] = Za;
}
}
}
}