[FilterScript] Clock speedometer
#17

Looks pretty good just wanted to point out a couple improvements.

1.) You shouldn't use player textdraws for any textdraws that are common it's silly to create them everytime
2.) In addition to the first point it is silly to create/destroy the textdraws everytime you enter exit a vehicle
3.) Your velocity calculation is incorrect it should be 181.5 for km/h and 112.747 for mph look here

https://sampforum.blast.hk/showthread.php?tid=364124&page=7
http://gtaforums.com/topic/216347-gt.../#entry3209126

4.) You don't need this line.

pawn Код:
if(GetPlayerVehicleSeat(playerid) == 0 || GetPlayerVehicleSeat(playerid) == 1)
You have already made that check on this line

pawn Код:
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER || GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
5.) No need to call GetSpeed(playerid) multiple times do this instead.

new Float:currspeed = GetSpeed(playerid);

I think that sums up most of the problems I see I'll be honest the TD's look nice but the coding is beyond brutal when it comes to design choices.
Reply


Messages In This Thread
Clock speedometer - by Daddy Yankee - 03.11.2013, 14:17
Re: Clock speedometer - by VivendoVirtual - 03.11.2013, 14:18
Re: Clock speedometer - by Tuntun - 03.11.2013, 14:20
Re: Clock speedometer - by Wizzy951 - 03.11.2013, 14:45
Re: Clock speedometer - by leong124 - 03.11.2013, 15:12
Re: Clock speedometer - by iZN - 03.11.2013, 15:17
Re: Clock speedometer - by serdar189 - 03.11.2013, 15:35
Re: Clock speedometer - by n0minal - 03.11.2013, 16:15
Re: Clock speedometer - by iDuckling - 03.11.2013, 16:38
Re: Clock speedometer - by Meow22 - 03.11.2013, 17:29
Re: Clock speedometer - by Daddy Yankee - 03.11.2013, 17:35
Re: Clock speedometer - by PT - 03.11.2013, 20:55
Respuesta: Clock speedometer - by HarlemSAMP - 03.11.2013, 20:58
Respuesta: Clock speedometer - by adri1 - 03.11.2013, 21:05
Re: Clock speedometer - by Jardell - 03.11.2013, 21:08
Re: Clock speedometer - by iJumbo - 03.11.2013, 21:12
Re: Clock speedometer - by Pottus - 03.11.2013, 22:26
Re: Clock speedometer - by Tuntun - 04.11.2013, 02:36
Respuesta: Clock speedometer - by OTACON - 04.11.2013, 02:51
Re: Clock speedometer - by Excel™ - 04.11.2013, 06:18
Re: Clock speedometer - by Daddy Yankee - 04.11.2013, 06:40
Re: Clock speedometer - by AnGeL_KRAMER - 04.11.2013, 08:11
Re: Clock speedometer - by P1c4550 - 04.11.2013, 10:30
Re: Clock speedometer - by Pottus - 04.11.2013, 12:10
Re: Clock speedometer - by Daddy Yankee - 04.11.2013, 13:10
Re: Clock speedometer - by Pottus - 04.11.2013, 20:22
Re: Clock speedometer - by Mark_Samp - 04.11.2013, 20:37
Re: Clock speedometer - by Scrillex - 06.11.2013, 16:06
Re: Clock speedometer - by Daddy Yankee - 06.11.2013, 18:23
Re: Clock speedometer - by kingcrome - 08.11.2013, 19:00
Re: Clock speedometer - by HitterHitman - 10.11.2013, 10:53
Re: Clock speedometer - by Daddy Yankee - 10.11.2013, 11:26
Re: Clock speedometer - by HitterHitman - 11.11.2013, 08:20
Re: Clock speedometer - by Daddy Yankee - 11.11.2013, 09:22
Re: Clock speedometer - by iDuckling - 11.11.2013, 16:45
Re: Clock speedometer - by Baboon - 11.11.2013, 16:57
Re: Clock speedometer - by Pro_LiZzy - 11.11.2013, 21:38
Re: Clock speedometer - by whatthefuck123 - 11.11.2013, 21:43
Re: Clock speedometer - by Akira297 - 11.11.2013, 21:47

Forum Jump:


Users browsing this thread: 1 Guest(s)