SA-MP Forums Archive
[HELP] Setplayercamera - 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: [HELP] Setplayercamera (/showthread.php?tid=348185)



[HELP] Setplayercamera - Stefand - 04.06.2012

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.");



Re: [HELP] Setplayercamera - iRage - 04.06.2012

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


Re: [HELP] Setplayercamera - Stefand - 04.06.2012

Already done that ;P

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



Re: [HELP] Setplayercamera - imnoob - 04.06.2012

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


Re: [HELP] Setplayercamera - iRage - 04.06.2012

Hmm, try it under OnPlayerRequestClass


Re: [HELP] Setplayercamera - Stefand - 04.06.2012

Still not....


Re: [HELP] Setplayercamera - Stefand - 04.06.2012

I shows only when i did ig /gmx


Re: [HELP] Setplayercamera - Stefand - 07.06.2012

Can someone give a sulution?


Re: [HELP] Setplayercamera - zDevon - 07.06.2012

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).


Re: [HELP] Setplayercamera - MP2 - 07.06.2012

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

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