Re: Speedo with Timer -
pmk1 - 05.09.2010
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...
Re: Speedo with Timer -
RoBo - 05.09.2010
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);
Re: Speedo with Timer -
pmk1 - 06.09.2010
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?
Re: Speedo with Timer -
pmk1 - 06.09.2010
haha np :P
Re: Speedo with Timer -
kiwi123 - 12.09.2010
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.
Re: Speedo with Timer -
pmk1 - 12.09.2010
thanks for the comment, but i don't get what you mean with radar :*\
Re: Speedo with Timer -
kiwi123 - 12.09.2010
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.
Re: Speedo with Timer -
pmk1 - 12.09.2010
wooow, you're asking for a script right now, go in script request thread.. not here
Re: Speedo with Timer -
kiwi123 - 12.09.2010
But I want police radar which is compatible with your speedometer. And I dont know how to do it

Please help.
Re: Speedo with Timer -
kiwi123 - 13.09.2010
So can you tell me how can I do if(final_speed_int(i) < 80) please? Thanks very much.
Re: Speedo with Timer -
pmk1 - 13.09.2010
sorry, but go on scripting discussion, ask for a script, refer to my tutorial if you want it to work with my speedo! this is
TUTORIAL section -.- don't spam my comments section with script requests xD thanks
Re: Speedo with Timer -
[Lsrcr]Rafa - 14.09.2010
hell this is so COOL !!!

Thanks and realy this saved me from searching much time
Re: Speedo with Timer -
SloProKiller - 14.09.2010
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.
Re: Speedo with Timer -
pmk1 - 14.09.2010
no problem rafa :P
and slopro, that's not true, the speedo works anyway.. did you tried it?
Re: Speedo with Timer -
Tijger - 15.09.2010
Why must a timer in a speedo :O?
Re: Speedo with Timer -
Hiddos - 15.09.2010
Quote:
Originally Posted by Tijger
Why must a timer in a speedo :O?
|
Obviously something needs to update the textdraw with the correct speed the player drives ^^.
Re: Speedo with Timer -
Legц - 20.09.2010
The timer is set to 100ms but the speedo update is not so fast ca 1,5s why?
Re: Speedo with Timer -
Mike_Peterson - 20.09.2010
hmm, can someone tell me how to do it to MPH?
Re: Speedo with Timer -
pmk1 - 20.09.2010
// 250.666667 = kmph // 199,4166672 = mph in floatsqroot
Re: Speedo with Timer -
WillyP - 20.09.2010
nice
8char