03.11.2013, 22:26
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.
You have already made that check on this line
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.
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)
pawn Код:
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER || GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
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.

