Posts: 351
Threads: 43
Joined: Jan 2010
Reputation:
0
hmm no? i went up to 300-320km/h.... i think in mph it's about 250? try with an hydra, and on car use nos, u'll see it goes much over...
Posts: 377
Threads: 0
Joined: Jan 2008
Reputation:
0
Don't use a timer - run it every couple of times OnPlayerUpdate gets called.
Don't use floatsqroot, it's awfully slow it would probably be much better to use something like this,
floatmul( floatabs(X) + floatabs(Y) + floatabs(Z), 100);
Posts: 351
Threads: 43
Joined: Jan 2010
Reputation:
0
well i think it's alright like it, not slow or no lag, but it's sure that if i'de have over 20timers it would start to, but as i use it i only have 3 timers, not all of them calling at 100ms. And anyway i don't get what you mean with onplayerupdate.... wouldn't it lag much more with more players?
Posts: 21
Threads: 4
Joined: Dec 2009
Reputation:
0
Its the best speedometer what I saw, but how can I do radar: if(IsPlayerInVehicle(playerid) == 296) { if(IsPlayerInRangeOfPoint(i,30, pX,pY,pZ)) { if(IsPlayerInAnyVehicle(i)) { ? Thanks.
Posts: 351
Threads: 43
Joined: Jan 2010
Reputation:
0
thanks for the comment, but i don't get what you mean with radar :*\
Posts: 21
Threads: 4
Joined: Dec 2009
Reputation:
0
I want police radar in police car. When player1 is police and is in police car and near is player2 who is in any car and go 100 km/h so player1 (policeman) get message about his speed. Thanks.
Posts: 21
Threads: 4
Joined: Dec 2009
Reputation:
0
So can you tell me how can I do if(final_speed_int(i) < 80) please? Thanks very much.
Posts: 259
Threads: 6
Joined: Aug 2009
Reputation:
0
If I recall correctly, you need to use SetTimerEx to use playerid in the callback of the timer, if you would use SetTimer, it will return 0.
Posts: 351
Threads: 43
Joined: Jan 2010
Reputation:
0
no problem rafa :P
and slopro, that's not true, the speedo works anyway.. did you tried it?
Posts: 20
Threads: 0
Joined: Jul 2010
Reputation:
0
Why must a timer in a speedo :O?
Posts: 20
Threads: 2
Joined: Apr 2010
Reputation:
0
The timer is set to 100ms but the speedo update is not so fast ca 1,5s why?
Posts: 844
Threads: 32
Joined: Apr 2009
Reputation:
0
hmm, can someone tell me how to do it to MPH?
Posts: 351
Threads: 43
Joined: Jan 2010
Reputation:
0
20.09.2010, 20:33
(
Last edited by pmk1; 30/12/2010 at 05:23 PM.
)
// 250.666667 = kmph // 199,4166672 = mph in floatsqroot