SA-MP Forums

Go Back   SA-MP Forums > SA-MP > Bug Reports

Reply
 
Thread Tools Display Modes
Old 03/03/2015, 07:10 PM   #1
BeckzyBoi
Beta Tester
 
Join Date: Dec 2006
Posts: 1,666
Reputation: 112
Default 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.
BeckzyBoi is online now   Reply With Quote
Old 03/03/2015, 08:26 PM   #2
Abagail
High-roller
 
Join Date: Dec 2013
Location: GetPlayerPos(playerid, pos); Scripter/Mapper.
Posts: 3,456
Reputation: 414
Default 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.
Abagail is offline   Reply With Quote
Old 04/03/2015, 12:22 AM   #3
BeckzyBoi
Beta Tester
 
Join Date: Dec 2006
Posts: 1,666
Reputation: 112
Default Re: streamed in paused players facing north

Quote:
Originally Posted by Abagail View Post
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.
BeckzyBoi is online now   Reply With Quote
Old 04/03/2015, 03:53 AM   #4
ikey07
High-roller
 
ikey07's Avatar
 
Join Date: Jul 2010
Location: Latvia,Riga
Posts: 1,363
Reputation: 180
Default Re: streamed in paused players facing north

It returns last received angle I believe.
__________________
ikey07 is offline   Reply With Quote
Old 04/03/2015, 03:59 AM   #5
BeckzyBoi
Beta Tester
 
Join Date: Dec 2006
Posts: 1,666
Reputation: 112
Default 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.
BeckzyBoi is online now   Reply With Quote
Old 05/03/2015, 05:15 AM   #6
muzammilfreeman
Huge Clucker
 
muzammilfreeman's Avatar
 
Join Date: Dec 2014
Location: In The World Of Roleplay.
Posts: 304
Reputation: 41
Default Re: streamed in paused players facing north

Er.. seems to be criticel
__________________
Server Information:

SA-MP: samp.ne-rp.net
FORUMS: www.ne-rp.net/forums
TeamSpeak3: ts.ne-rp.net
UCP: cp.ne-rp.net
Shop: shop.ne-rp.net

JOIN NOW TO EXPLORE AMAZING FEATURES[STABLE 40+ DAILY PLAYERBASE]
muzammilfreeman is offline   Reply With Quote
Old 02/02/2017, 11:39 AM   #7
~Error
Big Clucker
 
~Error's Avatar
 
Join Date: Nov 2011
Location: Kongeriket Norge
Posts: 67
Reputation: 5
Default Re: streamed in paused players facing north

Sorry for bump
I actually wondered if someone have a solutions
__________________
Viva La PAWN!
~Error is offline   Reply With Quote
Old 02/02/2017, 04:49 PM   #8
Lordzy
High-roller
 
Join Date: Mar 2012
Location: NetherRealm
Posts: 2,783
Reputation: 1113
Default 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.
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.
__________________
[Include]safeDialogs - Complete protection against dialog responses! (dialog ids, list-items, input-text of list-item and user)

Currently inactive - I don't play at any SA-MP servers nor work on anything in PAWN for now. The projects that I've done so far in PAWN, which requires updates will be taking some time.
Lordzy is offline   Reply With Quote
Old 02/02/2017, 05:32 PM   #9
Sew_Sumi
Godfather
 
Join Date: Jun 2008
Posts: 5,008
Reputation: 378
Default Re: streamed in paused players facing north

Quote:
Originally Posted by Lordzy View Post
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...
Sew_Sumi is offline   Reply With Quote
Old 03/02/2017, 04:26 AM   #10
Lordzy
High-roller
 
Join Date: Mar 2012
Location: NetherRealm
Posts: 2,783
Reputation: 1113
Default Re: streamed in paused players facing north

Quote:
Originally Posted by Sew_Sumi View Post
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.
__________________
[Include]safeDialogs - Complete protection against dialog responses! (dialog ids, list-items, input-text of list-item and user)

Currently inactive - I don't play at any SA-MP servers nor work on anything in PAWN for now. The projects that I've done so far in PAWN, which requires updates will be taking some time.
Lordzy is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Registration Causes Lag [ MYSQL ]. 50-100 Players getting Paused at a time iAnonymous Scripting Help 13 05/08/2014 01:00 AM
paused players.... burnuk General 5 01/04/2013 02:46 AM
Is it possible to auto kick paused players without using onplayerupdate? 101 Scripting Help 13 17/01/2013 07:19 PM
Detecting paused players? Twisted_Insane Scripting Help 6 14/04/2012 06:24 PM
Kicking Paused Players Michael[NBK] Scripting Help 3 11/11/2011 09:53 PM


All times are GMT. The time now is 12:26 AM.


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