Kilometers...
#1

Hi scripterzzzz !

I'm making a speedometer but i have a problem... is there any function to calculate the kilometers passed... don't give me Ethan's Distance Traveled Include v1.0 cause it has bad counting function...

Is there any function to calculate radius around you and when you pass that radius to add 1 kilometer (on the speedo ) and that should repeat...

HELP !
Reply
#2

Try this
https://sampforum.blast.hk/showthread.php?tid=349041
Reply
#3

From that you've posted is this the func?

Код:
stock Float:GetDistanceVehicleFromPoint(vehicleid,float:pontox,float:pontoy,float:pontoz)
{
    new Float:x,Float:y,Float:z;
    GetVehiclePos(vehicleid,x,y,z);
    return floatsqroot(floatpower(floatabs(floatsub(pontox,x)),2)+floatpower(floatabs(floatsub(pontoy,y)),2)+floatpower(floatabs(floatsub(pontoz,z)),2));
}
stock GetDistanceTraveled(vehicleid) return Percorreu[vehicleid];
Reply
#4

This is a include: http://pastebin.com/HHAp9LAJ
Put this in a file and save with extension: .inc
Put in you gamemode:
pawn Код:
#include <NameInclude>
And use GetDistanceTraveled(vehicleid) to return the distance traveled from vehicle created at OnGameModeInit. (Vehicles created in-game don't return a real value).
Reply
#5

Код:
D:\PC Igri\GTA\GTA San Andreas\Tomato RPG Macedonia\pawno\include\Speedo.inc(28) : error 017: undefined symbol "vehicleid"
D:\PC Igri\GTA\GTA San Andreas\Tomato RPG Macedonia\pawno\include\Speedo.inc(32) : error 001: expected token: "-identifier-", but found "forward"
D:\PC Igri\GTA\GTA San Andreas\Tomato RPG Macedonia\pawno\include\Speedo.inc(36) : error 010: invalid function or declaration
D:\PC Igri\GTA\GTA San Andreas\Tomato RPG Macedonia\pawno\include\Speedo.inc(47) : error 017: undefined symbol "SetVehiclePos"
D:\PC Igri\GTA\GTA San Andreas\Tomato RPG Macedonia\pawno\include\Speedo.inc(47) : error 010: invalid function or declaration
Reply
#6

I fixed vehicleid, but now i can't fix this
Код:
D:\PC Igri\GTA\GTA San Andreas\Tomato RPG Macedonia\pawno\include\Speedo.inc(3) : error 001: expected token: ")", but found "("
D:\PC Igri\GTA\GTA San Andreas\Tomato RPG Macedonia\pawno\include\Speedo.inc(3) : error 010: invalid function or declaration
D:\PC Igri\GTA\GTA San Andreas\Tomato RPG Macedonia\pawno\include\Speedo.inc(3 -- 6) : error 021: symbol already defined: "GetVehiclePos"
D:\PC Igri\GTA\GTA San Andreas\Tomato RPG Macedonia\pawno\include\Speedo.inc(3 -- 6) : fatal error 107: too many error messages on one line
Reply
#7

Updating the include, please wait.
Reply
#8

you are still updating ?
Reply
#9

Quote:
Originally Posted by NeroX98
Посмотреть сообщение
you are still updating ?
Yeap
http://pastebin.com/HHAp9LAJ
Done
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)