SA-MP Forums Archive
Pausing - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Pausing (/showthread.php?tid=151725)



Pausing - potato - 31.05.2010

Hi!
Is it possible to detect if player has pressed ESC?


Re: Pausing - Conroy - 31.05.2010

OnPlayerUpdate isn't called.


Re: Pausing - potato - 31.05.2010

Isn't it skipped from calling also when player isn't moving?


Re: Pausing - azzerking - 31.05.2010

It's possible but why do u need it


Re: Pausing - potato - 31.05.2010

I just found that (well of course they do, just that I didn't think of it) timers go on even when players are paused.
I have a script that allows position change after the timer ends, but when falling people just press ESC and wait until the timer ends, after that... they seem to look like using some hacks, but it is just the script being used with ESC.


Re: Pausing - azzerking - 31.05.2010

Oh Ok good luck with your scripting any more questions just ask


Re: Pausing - potato - 31.05.2010

if I understood right then this should work, but it doesn't:
In a timer:
Код:
	foreach(Player, i) {
	new check;
	check = OnPlayerUpdate(i);
	if(check == 0) {
	SendClientMessage(i, COLOR_BRIGHTRED, "* PASUED!!!");
	}
	}



Re: Pausing - NewTorran - 31.05.2010

Quote:
Originally Posted by potato
if I understood right then this should work, but it doesn't:
In a timer:
Код:
	foreach(Player, i) {
	new check;
	check = OnPlayerUpdate(i);
	if(check == 0) {
	SendClientMessage(i, COLOR_BRIGHTRED, "* PASUED!!!");
	}
	}
Just because the player dosent do anything it dosent mean there paused,
I can be driving and then just get up and go make something to eat. I dont pause it or anything i just leave it


Re: Pausing - Tr1viUm - 31.05.2010

http://forum.sa-mp.com/index.php?topic=168527


Re: Pausing - potato - 31.05.2010

But wait, isn't "returning" something else from "calling"?
I mean, the script actually calls OnPlayerUpdate every time the timer runs... I don't know on what conditions OnPlayerUpdate returns 0, but I think it does that when SA-MP server fails to receive data - not when data isn't received (because it isn't asked).
But this is still weird why doesn't it work.

[EDIT]
Oh, will check this way now.