18.04.2009, 22:35
Its fully working on me, i tried that one.
The only problem is that, if you are steering left or right, it will not detect you.
pawn Код:
public OnPlayerUpdate(playerid)
{
if(IsPlayerInAnyVehicle(playerid))
{
new currentveh, Float:angle;
currentveh = GetPlayerVehicleID(playerid);
GetVehicleZAngle(currentveh, angle);
new str[32];
format(str,32,"%f",angle);
SendClientMessage(playerid,COLOR_ZOMBIE,str);
if(floatround(angle) == floatround(LastA[playerid])+180 || floatround(angle) == floatround(LastA[playerid])-180)
{
SendClientMessage(playerid,COLOR_ZOMBIE," You did 180 !");
//Kick(playerid);
return 1;
}
LastA[playerid] = angle;
}
return 1;
}