SA-MP Forums Archive
Strange camera attachment bug - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Strange camera attachment bug (/showthread.php?tid=441858)



Strange camera attachment bug - CaHbKo - 04.06.2013

So I have been scripting this map script, and when I first tested it on our VPS, it started behaving like this.

This video compares LOCAL SERVER and VPS servers. Both are copies and have the same gamemode.
I have no timers with AttachCameraToObject or any other camera functions.

[ame]http://www.youtube.com/watch?v=P3QAf0Fo5X4[/ame]

As you have seen, even attaching to a random object causes this flickering.

/attachme:
pawn Код:
CMD:attachme(p, par[])
{
    if(pInfo[p][pAdminLevel] > 5)
    {
        new obj = strval(par);
        if(obj > 0) AttachCameraToObject(p, obj);
        else SetCameraBehindPlayer(p);
    }
    return 1;
}
Map code:
pawn Код:
pInfo[p][p_miCameraObj] = CreatePlayerObject(p, mi_MAP_CAMERA_MODEL, pos[0], pos[1], pos[2], 0.0, 0.0, pos[3], 3000.0);
    AttachCameraToPlayerObject(p, pInfo[p][p_miCameraObj]);

What could cause this strange behavior?
Thanks.