[HELP] Setplayercamera
#1

Hello,

I wanna make a background for the players when they have to log in.

Only the bad news is that it only works when they entered the wrong password.

This picture is from when they just connect and didn't do anything yet



This picture is from when they enter a bad password



Pawno:

From first picture:
pawn Код:
SetPlayerCameraPos(playerid, 1421.2194, -1724.0134, 30.7422);
            SetPlayerCameraLookAt(playerid, 1421.2194, -1724.0134, 30.7422);
            new Sum;
            Sum = 3-Player[playerid][LoginAttempts];
            SendClientMessage(playerid, ADMINORANGE, "The password you have entered does not match your account. Please try again or use the forums.");
            Player[playerid][LoginAttempts]++;
            format(string, sizeof(string), "You have %d remaining login attempts, before you are auto-banned.", Sum);
            SendClientMessage(playerid, WHITE, string);
            ShowPlayerDialog(playerid, 3894, DIALOG_STYLE_PASSWORD, "Authentication", "Welcome to changeme\n\nYou have an account, please enter your password to authenticate.", "Login", "Help");
From second picture:
pawn Код:
SetPlayerCameraPos(playerid, 1421.2194, -1724.0134, 30.7422);
            SetPlayerCameraLookAt(playerid, 1421.2194, -1724.0134, 30.7422);
            ShowPlayerDialog(playerid, 3894, DIALOG_STYLE_PASSWORD, "Authentication", "Welcome to Changeme\n\nYou have an account, please enter your password to authenticate.", "Login", "Help");
            format(string, sizeof(string), "Welcome to changeme, Current Version: %s", Version);
            SendClientMessage(playerid, RED, string);
            SendClientMessage(playerid, WHITE, "This name is registered. If you're the account owner, please login with your account credentials to proceed.");
Reply
#2

Set their camera position once they connect, put camera stuff under OnPlayerConnect
Reply
#3

Already done that ;P

pawn Код:
public OnPlayerConnect(playerid)
{
    SetPlayerCameraPos(playerid, 1421.2194, -1724.0134, 30.7422);
    SetPlayerCameraLookAt(playerid, 1421.2194, -1724.0134, 30.7422);
Reply
#4

how can i make too pls help me i will give u Reputation should i add if(strcmp.... ?? pls tell me the full command
Reply
#5

Hmm, try it under OnPlayerRequestClass
Reply
#6

Still not....
Reply
#7

I shows only when i did ig /gmx
Reply
#8

Can someone give a sulution?
Reply
#9

The first screenshot seems to be taken while the player is in spectate mode (Verona Beach, no class selection box), while the second one is not, as if your wrong password dialog response is removing them from that mode. Remove TogglePlayerSpectating(playerid,1); if you have it anywhere (OnPlayerConnect or OnPlayerRequestClass most likely).
Reply
#10

I made an include to 'fix' this, you have to set it after a few miliseconds:

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


Forum Jump:


Users browsing this thread: 1 Guest(s)