Pausing
#1

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

OnPlayerUpdate isn't called.
Reply
#3

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

It's possible but why do u need it
Reply
#5

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.
Reply
#6

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

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!!!");
	}
	}
Reply
#8

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
Reply
#9

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

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)