Radar Command Sending Wrong Message
#3

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
Your calculations is way off. Try this:

pawn Код:
new Float:pos[3], Float:speed, speed_int;
GetVehicleVelocity(GetPlayerVehicleID(playerid), pos[0], pos[1], pos[2]);
speed = floatsqroot(((pos[0] * pos[0]) + (pos[1] * pos[1])) + (pos[2] * pos[2])) * 181.1166672;
speed_int = floatround(speed, floatround_round);
How would that affect my issue? Plus, 181.1166672 makes the speed look very unrealistic.

EDIT: I fixed it by changing the "if(final_speed_int > 0)" line to:
pawn Код:
if(final_speed_int == 0) return SendClientMessage(playerid, COLOR_YELLOW, "(RADAR) No vehicles in range.");
Reply


Messages In This Thread
Radar Command Sending Wrong Message - by austin070 - 01.09.2014, 04:48
Re: Radar Command Sending Wrong Message - by SickAttack - 01.09.2014, 04:59
Re: Radar Command Sending Wrong Message - by austin070 - 01.09.2014, 05:01
Re: Radar Command Sending Wrong Message - by SickAttack - 01.09.2014, 05:21

Forum Jump:


Users browsing this thread: 1 Guest(s)