Hello, I want to change the position of the camera when the register/log in box appears, I need some help cause I tried something,but didn't worked. Also I've tried to change the coordinates where new players will spawn after they register, that didn't worked either, what I am doing wrong ?
Код:
public OnPlayerSpawn(playerid)
{
TogglePlayerSpectating(playerid, false);
// Anti F4 Bug - Logging/Registering
if(!PlayerInfo[playerid][pLoggedIn] && !IsPlayerNPC(playerid))
{
if(IsPlayerNPC(playerid)) return 1;
SetPlayerPos(playerid, -2197.6575,-2376.3530,30.6250);
SetPlayerCameraPos(playerid, -2190.9714,-2374.7695,30.4688);
SetPlayerCameraLookAt(playerid, -2190.9714,-2374.7695,30.4688);
SetSpawnInfo( playerid, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
new file[64];
format(file, sizeof(file), "users/%s.ini", RPNU(playerid));
// Player isn't banned
if(dini_Int(file, "AdminAccount") == 1)
{
format(file, sizeof(file), "users/%s.ini",RPNU(playerid));
SetPlayerName(playerid, dini_Get(file, "OldName"));
format(file, sizeof(file), "users/%s.ini", RPNU(playerid));
SSSShowDialog(playerid, 2);
}
if(!dini_Exists(file))
{
SSSShowDialog(playerid, 1);
return 1;
}
else
{
SSSShowDialog(playerid, 2);
}
return 1;
}
I think you are doing this when they already spawn (OnPlayerSpawn). You should change camera position under OnPlayerRequestClass I believe.