SA-MP Forums Archive
Detecting paused players? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Detecting paused players? (/showthread.php?tid=334235)



Detecting paused players? - Twisted_Insane - 14.04.2012

'Sup y'all?

I wanna create a 3DTextLabel over any player's head which is paused. I just don't know how I gotta do this.


Re: Detecting paused players? - DBan - 14.04.2012

https://sampforum.blast.hk/showthread.php?tid=152645

Maybe that would be any help?


Re: Detecting paused players? - Twisted_Insane - 14.04.2012

That's not the way I'd like; in my case, a text should appear above the player's head only if he "ALT + TAB'd" or pressed "ESC"!


Re: Detecting paused players? - Admigo - 14.04.2012

Thanks! How can i make a label above his head with paused?


Re: Detecting paused players? - Twisted_Insane - 14.04.2012

That's just what I asked above, I wanna know the same, just when he pressed "ESC" or "ALT + TAB".


Re: Detecting paused players? - Shetch - 14.04.2012

Here's a FS i made couple of days ago. It creates a text above your head, witch updates each second showing how many seconds you have been AFK for.

https://sampforum.blast.hk/showthread.php?tid=332924


Re: Detecting paused players? - Admigo - 14.04.2012

Quote:
Originally Posted by DBan
View Post
Why players getting Paused above them head when they are not afk?
Code:
if( GetPVarInt(playerid, "pause") != 0 )
	{
		label=Create3DTextLabel("Paused!",0xFFFFFFFF,30.0,40.0,50.0,40.0,0 ,0);
	    Attach3DTextLabelToPlayer(label, playerid, 0.0, 0.0, 0.7);
 	}
 	else if( GetPVarInt(playerid, "pause") == 0 )
	{
		Delete3DTextLabel(label);
	}
	SetPVarInt(playerid, "pause", 1);
Please,How can i fix this?