Vehicle Speed
#1

pawn Код:
#define MULTIPLY_SPEED 3
new Float:OldCoordsX[MAX_PLAYERS], Float:OldCoordsY[MAX_PLAYERS];
new Float:x, Float:y, Float:z, Float:health, string[256];
new Float:Dis = floatsqroot(floatpower(floatabs(floatsub(OldCoordsX[i],x)),2) + floatpower(floatabs(floatsub(OldCoordsY[i],y)),2));
new speed = (floatround(Dis)*MULTIPLY_SPEED);
Hey guys i took this from a filterscript in the forum, it's for the vehicle speed.
i made a textdraw shows the vehicle's speed using this method, the textdraw is an integer string (%i)and the definition of the integer is "speed" ..example:
pawn Код:
format(string,sizeof(string),"Speed: %i" ,speed);
but why it doesn't give the right amounts of vehicle's speeds ?? for example: maximum speed of "Infernus" is 247km, it doesn't give 247, it reaches 255 and sometimes gives 247 but it doesn't stop at 247 ..it starts decreasing and increasing the speed between 237 to 255. why it doesn't stop at 247 when the infernus is at maximum speed ?!!
Reply
#2

....
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)