08.11.2010, 11:18
hi
i'm maked speedometer for my RP server. it works, and Infernus have max speed 170 km/h.
but when i enter in bend with max speed, speed increases up to 220-230 km/h. i'm set max speed on 200 km/h. so, my anticheat report that i'm cheater
here is code for getting vehicle speed:
why speed increases in bend?? how to fix it?
i'm maked speedometer for my RP server. it works, and Infernus have max speed 170 km/h.
but when i enter in bend with max speed, speed increases up to 220-230 km/h. i'm set max speed on 200 km/h. so, my anticheat report that i'm cheater
here is code for getting vehicle speed:
pawn Код:
stock GetSpeed(playerid, bool:velo)
{
new
Float:Vx,
Float:Vy,
Float:Vz,
Float:SNAGA;
if(IsPlayerInAnyVehicle(playerid)) GetVehicleVelocity(GetPlayerVehicleID(playerid),Vx,Vy,Vz);
else GetPlayerVelocity(playerid,Vx,Vy,Vz);
SNAGA = floatsqroot(floatabs(floatpower(Vx + Vy + Vz,2)));
return velo?floatround(SNAGA* 100 * 1.28):floatround(SNAGA* 100);
}