18.04.2009, 22:08
some cheat programs have a hotkey that will automatically turn you car 180 degrees. im making a code to detect that but need some help.. im not that familiar with the floatound and floatpower things.
Heres what i got so far. It DOES work but its just not that accurate and it only detects if your going strait. of your turning while you press the hotkey to turn you 180 it doesn't detect
note: timer is going at 1000 milliseconds and is looping.
Heres what i got so far. It DOES work but its just not that accurate and it only detects if your going strait. of your turning while you press the hotkey to turn you 180 it doesn't detect
pawn Код:
public AntiAutoTurn()
{
new Float:angle;
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerInAnyVehicle(i))
{
new currentveh;
currentveh = GetPlayerVehicleID(i);
GetVehicleZAngle(currentveh, angle);
//new str[32];
//format(str,32,"%f",angle);
//SendClientMessage(i,COLOR_RED,str);
if(floatround(angle) == floatround(LastA[i])+180 || floatround(angle) == floatround(LastA[i])-180)
{
Kick(i);
break;
}
LastA[i] = angle;
}
}
}
}