SA-MP Forums Archive
Need help with ShowPlayerDialog - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Need help with ShowPlayerDialog (/showthread.php?tid=234769)



Need help with ShowPlayerDialog - Audiophr3ak - 04.03.2011

My dialog wont lem my camera and player spawn settings work, here is the code:

public OnPlayerConnect(playerid)
{
SetPlayerColor(playerid,0x8000FFAA);
PlayerPlaySound(playerid,1185,0,0,0);
SetSpawnInfo(playerid,0,0,1672.5366,1447.8903,10.7 881,0,0,0,0,0,0,0);
SpawnPlayer(playerid);
TogglePlayerControllable(playerid,1);
SetPlayerCameraPos(playerid, 958.3814, 2567.5860, 20.6);
SetPlayerCameraLookAt(playerid, 971.9352, 2559.0544, 20.6);

new pname[MAX_PLAYER_NAME], file[64], msg[256];
GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
format(file, sizeof(file), "/Users/%s.ini", pname);
if(!dini_Exists(file))
{
format(msg, sizeof(msg), "You do not have a registered account %s.\nPlease insert your desired password into the line below and click \"Register\".", pname);
ShowPlayerDialog(playerid, REG, DIALOG_STYLE_INPUT, "Account Registration", msg, "Register", "Cancel");
}
else
{
format(msg, sizeof(msg), "Welcome back %s. Please login to your account.\nPlease insert your password into the line below and click \"Login\".", pname);
ShowPlayerDialog(playerid, LOG, DIALOG_STYLE_INPUT, "Login Panel", msg, "Login", "Cancel");
}
return 1;
}


Re: Need help with ShowPlayerDialog - Hashski - 04.03.2011

Put it under OnPlayerRequestClass, Not OnPlayerSpawn..


Re: Need help with ShowPlayerDialog - Sasino97 - 04.03.2011

And also use a var that detects if it's the first Requestclass

And I use OnplayeRSpawn