Простенький античит на SpeedHack.
Ко всем new
new MaxSpeed[MAX_PLAYERS];
static const stock VehicleNames[212][] = {
"Landstalker","Bravura","Buffalo","Linerunner","Pereniel","Sentinel","Dumper","Firetruck","Trashmaster","Stretch","Manana","Infernus",
"Voodoo","Pony","Mule","Cheetah","Ambulance","Leviathan","Moonbeam","Esperanto","Taxi","Washington","Bobcat","Mr Whoopee","BF Injection",
"Hunter","Premier","Enforcer","Securicar","Banshee","Predator","Bus","Rhino","Barracks","Hotknife","Trailer","Previon","Coach","Cabbie",
"Stallion","Rumpo","RC Bandit","Romero","Packer","Monster","Admiral","Squalo","Seasparrow","Pizzaboy","Tram","Trailer","Turismo","Speeder",
"Reefer","Tropic","Flatbed","Yankee","Caddy","Solair","Berkley's RC Van","Skimmer","PCJ-600","Faggio","Freeway","RC Baron","RC Raider",
"Glendale","Oceanic","Sanchez","Sparrow","Patriot","Quad","Coastguard","Dinghy","Hermes","Sabre","Rustler","ZR3 50","Walton","Regina",
"Comet","BMX","Burrito","Camper","Marquis","Baggage","Dozer","Maverick","News Chopper","Rancher","FBI Rancher","Virgo","Greenwood",
"Jetmax","Hotring","Sandking","Blista Compact","Police Maverick","Boxville","Benson","Mesa","RC Goblin","Hotring A","Hotring B",
"Bloodring Banger","Rancher","Super GT","Elegant","Journey","Bike","Mountain Bike","Beagle","Cropdust","Stunt","Tanker","RoadTrain",
"Nebula","Majestic","Buccaneer","Shamal","Hydra","FCR-900","NRG-500","HPV1000","Cement Truck","Tow Truck","Fortune","Cadrona","FBI Truck",
"Willard","Forklift","Tractor","Combine","Feltzer","Remington","Slamvan","Blade","Freight","Streak","Vortex","Vincent","Bullet","Clover",
"Sadler","Firetruck","Hustler","Intruder","Primo","Cargobob","Tampa","Sunrise","Merit","Utility","Nevada","Yosemite","Windsor","Monster A",
"Monster B","Uranus","Jester","Sultan","Stratum","Elegy","Raindance","RC Tiger","Flash","Tahoma","Savanna","Bandito","Freight","Trailer",
"Kart","Mower","Duneride","Sweeper","Broadway","Tornado","AT-400","DFT-30","Huntley","Stafford","BF-400","Newsvan","Tug","Trailer A","Emperor",
"Wayfarer","Euros","Hotdog","Club","Trailer B","Trailer C","Andromada","Dodo","RC Cam","Launch","Police Car","Police Car",
"Police Car","Police Ranger","Picador","S.W.A.T","Alpha","Phoenix","Glendale","Sadler","L Trailer A","L Trailer B",
"Stair Trailer","Boxville","Farm Plow","U Trailer" };
========================================================================================
В OnPlayerStateChange
switch(GetVehicleModel(tacha))
{
case 400,409,516,517,526,535,551,575,576,579,599:{ MaxSpeed[playerid] = 88; } // 88
case 401,466:{ MaxSpeed[playerid] = 82; }// 82
case 402,477:{ MaxSpeed[playerid] = 104; } // 104
case 403,433,471,532,601:{ MaxSpeed[playerid] = 61; } // 61
case 404:{ MaxSpeed[playerid] = 74; }// 74
case 405,445,518,542:{ MaxSpeed[playerid] = 91; } // 91
case 410:{ MaxSpeed[playerid] = 72; } // 72
case 411:{ MaxSpeed[playerid] = 123; } // 123
case 412,439,560,534,602,603:{ MaxSpeed[playerid] = 94; }// 94
case 415,451:{ MaxSpeed[playerid] = 108; } // 108
case 416,421:{ MaxSpeed[playerid] = 86; }// 86
case 419,436,474,527,529,540,546:{ MaxSpeed[playerid] = 83; }// 83
case 420,550,568:{ MaxSpeed[playerid] = 81; }// 81
case 422,467,489,492,500:{ MaxSpeed[playerid] = 78; }// 78
case 424:{ MaxSpeed[playerid] = 75; }// 75
case 426,522,596,597,598:{ MaxSpeed[playerid] = 98; }// 98
case 427,507,565,587:{ MaxSpeed[playerid] = 92; }// 92
case 429,541:{ MaxSpeed[playerid] = 113; } // 113
case 434:{ MaxSpeed[playerid] = 93; } // 93
case 438,505,515,547:{ MaxSpeed[playerid] = 79; } // 79
case 440,582:{ MaxSpeed[playerid] = 76; } // 76
case 461,521,524,566:{ MaxSpeed[playerid] = 90; } // 90
case 462,463,468,586:{ MaxSpeed[playerid] = 80; }// 80
case 558,470,482,490:{ MaxSpeed[playerid] = 87; } // 87
case 475,536,567:{ MaxSpeed[playerid] = 96; }// 96
case 478:{ MaxSpeed[playerid] = 65; } // 65
case 480:{ MaxSpeed[playerid] = 103; } // 103
case 491:{ MaxSpeed[playerid] = 83; } // 83
case 494,502,503:{ MaxSpeed[playerid] = 120; }// 120
case 523,580,581,585,600:{ MaxSpeed[playerid] = 85; } // 85
case 506,559,562:{ MaxSpeed[playerid] = 100; } // 100
case 571:{ MaxSpeed[playerid] = 52; } // 52
case 514:{ MaxSpeed[playerid] = 67; } // 67
default: { MaxSpeed[playerid] = 124; }
}
========================================================================================
В таймер обновления спидометра
if(SpeedVehicle(playerid) > MaxSpeed[playerid]+5 && GetPlayerState(playerid) != PLAYER_STATE_PASSENGER)
{
if(PlayerInfo[playerid][bAdmin] >= 1)return 1;
if(GetPVarInt(playerid, "Fly30") > gettime()) { return 0; }
format(string, sizeof(string), "<Warning> Игрок %s[%d] возможно SpeedHack. Транспорт: [%s]. Скорость: [%d/%d].",PlayerInfo[playerid][pNames],playerid,VehicleNames[GetVehicleModel(GetPlayerVehicleID(playerid))-400],SpeedVehicle(playerid), MaxSpeed[playerid]);
ABroadCast(0xFF0000AA, string, 1);
SetPVarInt(playerid, "Fly30", gettime()+30);
}
========================================================================================
В конец мода
stock SpeedVehicle(playerid)
{
new Float:ST[4];
if(IsPlayerInAnyVehicle(playerid))
GetVehicleVelocity(GetPlayerVehicleID(playerid),ST[0],ST[1],ST[2]);
else GetPlayerVelocity(playerid,ST[0],ST[1],ST[2]);
ST[3] = floatsqroot(floatpower(floatabs(ST[0]), 2.0) + floatpower(floatabs(ST[1]), 2.0) + floatpower(floatabs(ST[2]), 2.0)) * 100.3;
return floatround(ST[3]);
}