SetCamera on connect for login dialog
#1

Hey all,

I have this code under "Onplayerconnect"

pawn Код:
TogglePlayerSpectating(playerid, true);
    SetPlayerCameraPos(playerid, 1415.0320, -1749.1689, 29.9612);
SetPlayerCameraLookAt(playerid, 1415.7621, -1748.4803, 29.7203);
    PlayerPlaySound(playerid, 1062, 0.0, 0.0, 0.0);
But the camera gets set to it's place with a major delay, because the Dialog to login shows after the camera's set scriptwise but IG the dialog is even faster and I can already be logged in before the camera's position is set.

How can I make it to get an instant camera when it connects?
Reply
#2

Have you tried setting a timer for the dialog?
Reply
#3

That shouldn't be the fix, the problem is that the setting the camera is slow, it should SET the camera BEFORE the dialog appears, it's scripted in that order.
Reply
#4

Quote:
Originally Posted by Stefand
Посмотреть сообщение
That shouldn't be the fix, the problem is that the setting the camera is slow, it should SET the camera BEFORE the dialog appears, it's scripted in that order.
I've solved this by using InterpolateCameraPos instead of SetCameraPos.
Reply
#5

Nvm I found the bug, either my loadblocks or loadbans is causing the script to lag.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)