18.04.2009, 22:39
sometimes it does detect if your turning, sometimes it doesn't (for me)
heres my code:
some of the functions are mine so you want have them.
heres my code:
pawn Код:
public OnPlayerUpdate(playerid)
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerSpawned[playerid] == 1)
{
if(IsPlayerInAnyVehicle(playerid))
{
new Float:angle;
new currentveh;
currentveh = GetPlayerVehicleID(playerid);
GetVehicleZAngle(currentveh, angle);
if((floatround(angle) == floatround(LastA[playerid])+180) || (floatround(angle) == floatround(LastA[playerid])-180))
{
AC_Kill(playerid);
}
LastA[playerid] = angle;
}
}
}
return 1;
}