[HELP] Speedometer problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] Speedometer problem (
/showthread.php?tid=188604)
[HELP] Speedometer problem -
Pooh7 - 08.11.2010
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?
Re: [HELP] Speedometer problem -
ipsBruno - 08.11.2010
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;
}
Re: [HELP] Speedometer problem -
Pooh7 - 08.11.2010
Thaks for replay...
Код:
(41948) : error 017: undefined symbol "poskm"
How to fix that error?