Pausing feature.
#1

Hello everyone, i wanna make that everytime someone pauses,
his blip should dissapear from the minimap(radar)
and his name colour should turn into a grey colour,
when he comes back from AFK everything should turn to normal,
his colour and his blip should be visible again on the minimap.
Can somebody tell me how to do it?
Thanks, regards.
Reply
#2

I would love to see someone do this I would also use this script for my RP.
Reply
#3

It's been done on one server, but I'm not sure how. I'd like to see some working code on this too!
Reply
#4

OnPlayerUpdate doesn't get called, when player is paused.

So make a timer and check if OnPlayerUpdate isn't called for example 5 seconds then hide the marker and set player color.
Reply
#5

You could use the fps counter code to achieve the paused effect. Less intensive than OnPlayerUpdate.
Reply
#6

Hint: OnPlayerUpdate returns 0 if the player is in Escape/ Alt+Tab (minimized game) mode.

You can work something based on that.

Maybe setting a variable on onplayerupdate... and a timer sets it to normal after it checks it's value.

Or using unix time, if more then 2 seconds passed and the unix isn't updated then it's paused.
Reply
#7

Quote:
Originally Posted by cmg4life
Посмотреть сообщение
Hint: OnPlayerUpdate returns 0 if the player is in Escape/ Alt+Tab (minimized game) mode.

You can work something based on that.

Maybe setting a variable on onplayerupdate... and a timer sets it to normal after it checks it's value.

Or using unix time, if more then 2 seconds passed and the unix isn't updated then it's paused.
No it does not pass 0, that's your own choice to do that, and it desync you from other players if you do.
Reply
#8

You could try the search feature these forums have, it's pretty cool thing.

Try YUP.
Reply
#9

OOOps.

I meant it's not called. Sorry.



PS: I'll look on that fps counter code.
Reply
#10

or maybe when a player preses the esc key, could it be posible that way?
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)