Need help with ShowPlayerDialog
#1

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

Put it under OnPlayerRequestClass, Not OnPlayerSpawn..
Reply
#3

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

And I use OnplayeRSpawn
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)