SA-MP Forums Archive
[how] car trip - 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: [how] car trip (/showthread.php?tid=188933)



[how] car trip - kakalakamakapaka - 09.11.2010

I dont know how to make car trip meter (u know what i mean?)...Please can u tell me or make for me simple script about car trip meter, because i dont know how to make that....i dont have idea....



i know that my english is too bad....sorry for that...


Re: [how] car trip - Kwarde - 09.11.2010

Sorry, but I don't really get it. What's a "car trip meter" :P
Is it something that record the length that a car is driving?


Re: [how] car trip - lameguy - 09.11.2010

You know equation v=s/t? (velocity=lenght divided by time)
Change it to another format:
s=v/t (lenght = speed/time)

With this you can count the lenght of driven route.


Re: [how] car trip - kakalakamakapaka - 09.11.2010

i try something like that, but i cant...everytime is milion errors :S


kwarde yes it is


Re: [how] car trip - Bessensap - 09.11.2010

DistanceBetweenPoints?
not mine, credits in there
pawn Код:
stock Float:GetDistanceBetweenPoints(Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2) //By Gabriel "Larcius" Cordes
{
    return floatadd(floatadd(floatsqroot(floatpower(floatsub(x1,x2),2)),floatsqroot(floatpower(floatsub(y1,y2),2))),floatsqroot(floatpower(floatsub(z1,z2),2)));
}



Re: [how] car trip - kakalakamakapaka - 10.11.2010

can u give me direct link ?


Re: [how] car trip - Bessensap - 10.11.2010

Just use that stock.

Then u get the coords of the player and the coords of the place ur going and fill them in the stock.