SA-MP Forums

SA-MP Forums (https://forum.sa-mp.com/index.php)
-   Bug Reports (https://forum.sa-mp.com/forumdisplay.php?f=20)
-   -   streamed in paused players facing north (https://forum.sa-mp.com/showthread.php?t=566117)

BeckzyBoi 03/03/2015 06:10 PM

streamed in paused players facing north
 
Title says it all. When a player streams in for another player and they are paused they will be facing north (0.0) until they unpause then their facing angle is updated properly for other players.

Abagail 03/03/2015 07:26 PM

Re: streamed in paused players facing north
 
That's because paused players don't send data to the server. That's the reason why AFK systems are able to detect when a player AFK's - OnPlayerUpdate stops being called. Simply, it's meant to be this way.

BeckzyBoi 03/03/2015 11:22 PM

Re: streamed in paused players facing north
 
Quote:

Originally Posted by Abagail (Post 3391445)
That's because paused players don't send data to the server. That's the reason why AFK systems are able to detect when a player AFK's - OnPlayerUpdate stops being called. Simply, it's meant to be this way.

GetPlayerFacingAngle returns the correct angle of the player, not 0.0. So I wouldn't say it's meant to be this way.

ikey07 04/03/2015 02:53 AM

Re: streamed in paused players facing north
 
It returns last received angle I believe.

BeckzyBoi 04/03/2015 02:59 AM

Re: streamed in paused players facing north
 
Yeah so if GetPlayerFacingAngle returns the correct angle there's no reason for the player to be facing north paused or not.

muzammilfreeman 05/03/2015 04:15 AM

Re: streamed in paused players facing north
 
Er.. seems to be criticel

~Error 02/02/2017 10:39 AM

Re: streamed in paused players facing north
 
Sorry for bump
I actually wondered if someone have a solutions

Lordzy 02/02/2017 03:49 PM

Re: streamed in paused players facing north
 
OnPlayerUpdate will not be called for paused players. So you can use the last received angle update of the player.
pawn Code:
new
    Float:g_PlayerLastAngle[MAX_PLAYERS];

public OnPlayerUpdate(playerid) {

    GetPlayerFacingAngle(playerid, g_PlayerLastAngle[playerid]);
    return 1;
}

//if player is paused, use the last received angle.

Sew_Sumi 02/02/2017 04:32 PM

Re: streamed in paused players facing north
 
Quote:

Originally Posted by Lordzy (Post 3838689)
pawn Code:
//if player is paused, use the last received angle.

Read the thread, that is what already happens... If you GetPlayerFacingAngle on a tabbed player, you get the last known angle...

Lordzy 03/02/2017 03:26 AM

Re: streamed in paused players facing north
 
Quote:

Originally Posted by Sew_Sumi (Post 3838714)
Read the thread, that is what already happens... If you GetPlayerFacingAngle on a tabbed player, you get the last known angle...

I only read the first post, my bad.

SetPlayerPos/SetPlayerFacingAngle will not work for paused players AFAIK so there's no way in correcting it. However, I've experienced that setting virtual worlds might work. Even for a paused player, when virtual world is set, it affects them. Try setting the facing angle to last known angle and then switch the virtual world to current once again. I'm not sure if that works but it's only an assumption. Virtual worlds used to be set for older SA-MP versions so I cannot guarantee you about the current version.

If what I said works, you'll have to do it constantly.


All times are GMT. The time now is 02:34 AM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.