16.10.2017, 14:23
Anti-SpeedHack
Anti-SpeedCar
Anti-SpeedSkin
Anti-SpeedCar
Код:
const VEHICLE_SYNC = 200;
IPacket:VEHICLE_SYNC(playerid, BitStream:bs)
{
new inCarData[PR_InCarSync];
BS_IgnoreBits(bs, 8);
BS_ReadInCarSync(bs, inCarData);
static Float:S = floatsqroot(floatpower(floatabs(inCarData[PR_velocity][0]), 2.0) + floatpower(floatabs(inCarData[PR_velocity][1]), 2.0) + floatpower(floatabs(inCarData[PR_velocity][2]), 2.0)) * 253.3;
if(S > 350.0) {
new string[144],name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string,sizeof(string),"{FF0000}[Anti-SpeedCar]: {FFFF00}%s {999999}(ID:%d) {00FF00}auto-kicked {FF0000}[Reason: SpeedCar]", name,playerid);
SendClientMessageToAll(-Unu, string);
string[0] = EOS;
Kick(playerid);
return false;
}
return true;
}
Код:
const PLAYER_SYNC = 207;
IPacket:PLAYER_SYNC(playerid, BitStream:bs)
{
new onFootData[PR_OnFootSync];
BS_IgnoreBits(bs, 8);
BS_ReadInCarSync(bs, onFootData);
static Float:S = floatsqroot(floatpower(floatabs(onFootData[PR_velocity][0]), 2.0) + floatpower(floatabs(onFootData[PR_velocity][1]), 2.0) + floatpower(floatabs(onFootData[PR_velocity][2]), 2.0)) * 253.3;
if(S > 100.0) {
new string[144],name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string,sizeof(string),"{FF0000}[Anti-SpeedSkin]: {FFFF00}%s {999999}(ID:%d) {00FF00}auto-kicked {FF0000}[Reason: SpeedSkin]", name,playerid);
SendClientMessageToAll(-Unu, string);
string[0] = EOS;
Kick(playerid);
return false;
}
return true;
}
