SA-MP Forums Archive
SetPlayerCameraPos & SetPlayerCameraLookAt - 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: SetPlayerCameraPos & SetPlayerCameraLookAt (/showthread.php?tid=467435)



SetPlayerCameraPos & SetPlayerCameraLookAt - AphexCCFC - 03.10.2013

How come this is not working when a player connects to the server?

pawn Код:
SetPlayerCameraPos(playerid, 1768.594482, -1352.606811, 187.123992);
SetPlayerCameraLookAt(playerid, 1765.265502, -1349.681518, 184.808700);



Re: SetPlayerCameraPos & SetPlayerCameraLookAt - newbie scripter - 03.10.2013

Where did u place it?

Place it below.

OnPlayerRequestClass(playerid, classid)


Re: SetPlayerCameraPos & SetPlayerCameraLookAt - AphexCCFC - 04.10.2013

Yeah that's where I placed it, but it still shows the default camera view.


Re : SetPlayerCameraPos & SetPlayerCameraLookAt - FayR - 04.10.2013

You use a dialog?


Re: SetPlayerCameraPos & SetPlayerCameraLookAt - AphexCCFC - 04.10.2013

Actually I tried placing it under OnPlayerRequestSpawm and OnPlayerConnect. I'm using dialogs under both of those functions for register/login yeah.


Re : SetPlayerCameraPos & SetPlayerCameraLookAt - FayR - 04.10.2013

Place the code below dialogs..


Re: SetPlayerCameraPos & SetPlayerCameraLookAt - AphexCCFC - 04.10.2013

This is what I have:

pawn Код:
public OnPlayerRequestSpawn(playerid)
{
    if(!PlayerInfo[playerid][pLoggedIn])
    {
         TogglePlayerSpectating(playerid, true);
         ClearScreen(playerid);
         ToggleMainMenu(playerid, 1); // This is a cutscene textdraw
         CheckAccount(playerid); // This checks whether to show the player the login or register dialog
         <then I have the SetPlayerCameraPos code here>
         <then the SetPlayerCameraLookAt code here>
    }
    return 1;
}
Sorry, typed it out on my phone.


Re: SetPlayerCameraPos & SetPlayerCameraLookAt - Konstantinos - 04.10.2013

I guess you want a properly class selection. That filterscript will help you with that (very useful).

https://sampforum.blast.hk/showthread.php?tid=140360


Re: SetPlayerCameraPos & SetPlayerCameraLookAt - AphexCCFC - 09.10.2013

I don't want an OnPlayerRequestClass though, I just want it so when a player connects to the server and the login or register dialog box shows up, it displays a view of Los Santos with the coords I have above :/


Re: SetPlayerCameraPos & SetPlayerCameraLookAt - AphexCCFC - 10.10.2013

Bump <.<