[BUG] AttachCameraToPlayerObject & UPTIME -
Memoryz - 26.04.2013
Performing an AttachCameraToPlayerObject will crash the player with a "Loading..." screen in GTA:SA.
pawn Код:
TogglePlayerSpectating(playerid, true);
AttachCameraToPlayerObject(playerid, CreatePlayerObject(playerid, 19300, 0.0, 0.0, 2.0, 0, 0, 0));
EDIT:
It's related to uptime, if a SA:MP server's uptime is ~2 weeks or more, this causes the client to crash.
Re: [BUG] AttachCameraToPlayerObject -
Baboon - 26.04.2013
What happens if u remove the spectate function?
Re: [BUG] AttachCameraToPlayerObject -
Pottus - 26.04.2013
Usually when you get that screen the position is at some extreme coordinates what I think is happening is the way your trying to do this instead create the object when they login to the server....
CameraObjects[MAX_PLAYERS];
CameraObject = CreatePlayerObject(playerid, 19300, 0.0, 0.0, 2.0, 0, 0, 0);
Eventually with the code you have would fill up a players object slots anyways.
Re: [BUG] AttachCameraToPlayerObject -
Memoryz - 03.05.2013
Quote:
Originally Posted by Strawhats
What happens if u remove the spectate function?
|
Quote:
Originally Posted by [uL]Pottus
Usually when you get that screen the position is at some extreme coordinates what I think is happening is the way your trying to do this instead create the object when they login to the server....
CameraObjects[MAX_PLAYERS];
CameraObject = CreatePlayerObject(playerid, 19300, 0.0, 0.0, 2.0, 0, 0, 0);
Eventually with the code you have would fill up a players object slots anyways.
|
The issue remains with the spectate function removed.
Re: [BUG] AttachCameraToPlayerObject -
mastermax7777 - 03.05.2013
why did u post the spectate function then? lol
did u try with normal non player objects
Re: [BUG] AttachCameraToPlayerObject -
Memoryz - 04.05.2013
Quote:
Originally Posted by mastermax7777
why did u post the spectate function then? lol
did u try with normal non player objects
|
This needs to work with AttachCameraToPlayerObject, I could care less about Global objects.
Re: [BUG] AttachCameraToPlayerObject -
DRIFT_HUNTER - 03.06.2013
Try to store object id into a variable and use variable in attaching camera to object.
I know that i was attaching camera to a moving object and it worked fine...
Re: [BUG] AttachCameraToPlayerObject -
GiamPy. - 03.06.2013
Quote:
The player-object must be created before attempting to attach the player's camera to it.
|
You attach the camera before the object is created.
Re: [BUG] AttachCameraToPlayerObject -
redreaper666 - 04.06.2013
if you do it with an player object that is attached to the player itself (as i did for my firstperson cam) it will fuck up the coordinates of the camera somehow.
If your using it for cars or attached vehicle objects its working fine.
This solution as you see here works: //even though partly
Код:
new pObject[MAX_PLAYERS];
forward attachcamtohead(playerid);
public attachcamtohead(playerid)
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid,X,Y,Z);
pObject[playerid] = CreatePlayerObject(playerid, 19300, X, Y, Z+0.65, 0.0, 0, 0.0);
SetPlayerAttachedObject(playerid, 3, pObject[playerid], 2, 0.101, -0.0, 0.0, 5.50, 84.60, 83.7, 1, 1, 1);
AttachCameraToPlayerObject(playerid,pObject[playerid]);
return 1;
}
but what is the spectate thingy good for ?
Re: [BUG] AttachCameraToPlayerObject -
Memoryz - 30.06.2013
I've found out the issue, on a Linux (CentOS) server, it is related to the SAMP server uptime.
We've killed the samp process and turned it back on and it works without any issue, so it seems related to uptime.
Re: [BUG] AttachCameraToPlayerObject -
Dragony92 - 09.08.2013
Same problem, and yes, it's related to uptime...
Re: [BUG] AttachCameraToPlayerObject -
Memoryz - 11.05.2014
Exactly, it seems to be after 2 weeks or so, can we please get a response?
Re: [BUG] AttachCameraToPlayerObject -
Mattakil - 13.05.2014
Did you try to maybe set the world bounds, bigger than the map? That Loading screen usually comes up if the player is out of the world.
Re: [BUG] AttachCameraToPlayerObject -
Basssiiie - 13.05.2014
To my knowledge, CreatePlayerObject (and CreateObject too) cannot be called inside AttachCameraToPlayerObject.
This should work just fine:
Код:
new obj = CreatePlayerObject(...);
AttachCameraToPlayerObject(playerid, obj);
Why? I don't know. It works like that for some reason.
Re: [BUG] AttachCameraToPlayerObject -
Johnak - 14.05.2014
I get bugs because of uptime as well, but with timers instead.
Re: [BUG] AttachCameraToPlayerObject -
iFarbod - 15.05.2014
This
Loading ... also comes if you set the
Gravity to a
very high value.
EDIT: View the
Flymode by h02. You can obtain the fix.