29.10.2017, 08:27
Anti - InvalidCamera (Anti-Crasher)
This code will block the players, which will attack your server with the invalid camera!
This code will block the players, which will attack your server with the invalid camera!
Code:
const AIM_SYNC = 203;
IPacket:AIM_SYNC(playerid, BitStream:bs)
{
new aimData[PR_AimSync];
BS_IgnoreBits(bs, 8);
BS_ReadAimSync(bs, aimData);
if aimData[PR_camMode] == 45 || aimData[PR_camMode] == 49)
{
new string[144],name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string,sizeof(string),"{FF0000}[Anti-InvalidCamera]: {FFFF00}%s {999999}(ID:%d) {00FF00}auto-kicked {FF0000}[Reason: InvalidCamera]", name,playerid);
SendClientMessageToAll(-1, string);
string[0] = EOS;
Kick(playerid);
return false;
}
return true;
}
