Moving Camera On Login The Camera On Player Spawn Does Not Go Back.
#1

I have a moving camera on my login screen and when ever i spawn it does not place the camera behind the player and when i first start the server it wont glitch up but after a hour or so it does. I also added setcamerabehindplayer on player spawn but this does not help the bug.
pawn Код:
public OnPlayerConnect(playerid)
{
    //Spawn Camera
    new rand = random(sizeof(RequestCamera));
    cordinatex = RequestCamera[rand][0];
    cordinatey = RequestCamera[rand][1];
    cordinatez = RequestCamera[rand][2];
    cordinateangle = RequestCamera[rand][3];
    PlayerPlaySound(playerid, 1185, cordinatex, cordinatey, cordinatez);
    SetPlayerFacingAngle(playerid, cordinateangle);
    SetPlayerCameraPos(playerid,cordinatex+(10*floatsin(-cordinateangle,degrees)),cordinatey+(10*floatcos(-cordinateangle,degrees)),cordinatez);//0.8 is a test
    SetPlayerCameraLookAt(playerid, cordinatex,cordinatey,cordinatez);
    SpawnCam[playerid][SpawnTimer] = SetTimerEx("MoveCamera", 50, true, "i", playerid);// 2 to reduce lagg change if wanted
    SetCameraBehindPlayer(playerid);
Reply
#2

Bump I need some help guys really bad.
Reply
#3

try putting the
pawn Код:
SetCameraBehindPlayer(playerid);
Under OnPlayerSpawn
Reply
#4

I have does not work /
Also one thing that happens it speeds way up
Reply
#5

Did u forgot to kill the timer ? So the camera would stop moving ?
Reply
#6

The timer is killed under player spawn. I'm thinking of moving it to on player connect.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)