SetPlayerCameraPos & SetPlayerCameraLookAt
#1

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);
Reply
#2

Where did u place it?

Place it below.

OnPlayerRequestClass(playerid, classid)
Reply
#3

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

You use a dialog?
Reply
#5

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

Place the code below dialogs..
Reply
#7

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.
Reply
#8

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
Reply
#9

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 :/
Reply
#10

Bump <.<
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)