[HELP] Speedometer problem
#1

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:
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);
}
why speed increases in bend?? how to fix it?
Reply
#2

pawn Код:
stock
    GetSpeed(playerid, mode = 1) //dark team pt
{
    GetVehicleVelocity(GetPlayerVehicleID(playerid), poskm[0], poskm[1], poskm[2]);
    return IsPlayerInAnyVehicle(playerid) ? floatround(((floatsqroot(((poskm[0] * poskm[0]) + (poskm[1] * poskm[1]) + (poskm[2] * poskm[2]))) * (!mode ? 105.0 : 170.0))) * 1) : 0;
}
Reply
#3

Thaks for replay...

Код:
(41948) : error 017: undefined symbol "poskm"
How to fix that error?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)