SA-MP Forums Archive
Camera problem - 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: Camera problem (/showthread.php?tid=598393)



Camera problem - Squirrel - 11.01.2016

So I tried changing the CameraLookAt and pos but seems not to work

PHP код:
public OnPlayerRequestClass(playeridclassid)
{
    
SetPlayerCameraPos(playerid1486.9767,-1579.1045,67.2109);
    
SetPlayerCameraLookAt(playerid1483.6805,-1671.0867,15.9783);
    
SetSpawnInfo(playerid000030000000); 
    
TogglePlayerSpectating(playeridtrue);
    return 
1;

I still have the default camera view


Re: Camera problem - itsCody - 11.01.2016

Spectating will change the camera. Enable upon connecting, disable after logging in.


Re: Camera problem - Squirrel - 11.01.2016

Yes but how do I disable the "Spawn" button then?


Re: Camera problem - itsCody - 11.01.2016

Toggling spectating, but you cant change the camera when it's enabled though :/


Re: Camera problem - Squirrel - 11.01.2016

OnPlayerConnect > disable spectating & set camera pos
OnPlayerRequestClass > Enable spectating

Correct?


Re: Camera problem - itsCody - 11.01.2016

Still wont work.

You have 2 options
Enable on connect, disable on login and auto spawn

enable on connect, disable on login and do ur stuff under OnPlayerRequestClass and deal with the button.


Re: Camera problem - 1nspire - 12.01.2016

How about enable spectating and make a timer of 0.5 sec which will do the following:

Код:
    SetPlayerPos(playerid, 1486.9767,-1579.1045,67.2109); 
    SetPlayerCameraPos(playerid, 1486.9767,-1579.1045,67.2109); 
    SetPlayerCameraLookAt(playerid, 1483.6805,-1671.0867,15.9783); 
    SetSpawnInfo(playerid, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0);
?