Quote:
Originally Posted by the_chaoz
Well looks like won't get this pice of code working like I want:
pawn Код:
stock StartEditor(playerid) { new Float:P[3]; TogglePlayerSpectating(playerid, true); GetPlayerCameraPos(playerid, P[0], P[1], P[2]); gPlayers[playerid][CameraObject] = CreateDynamicObject(19300, P[0], P[1], P[2], 0.0, 0.0, 0.0, .playerid = playerid); AttachCameraToDynamicObject(playerid, gPlayers[playerid][CameraObject]); gPlayers[playerid][Mode] = PLAYER_MODE_EDITOR; return 1; }
Yes I know, the object must be streamed in in order to AttachCameraToDynamicObject work. I've tryed from a timer to make a delay, to re-order so the camera coords are obtained after the player enter on spec mode, etc. And nothing work.
Does anyone have any clue?
|
Use Streamer_Update(playerid) after you create the dynamic object, only then edit it.