DIalog not showing up
#1

hey guys im having a weird thing going on i made this command but these are not showing up cant guess why

Код:
public OnPlayerConnect(playerid)
{
	if(PlayerInfo[playerid][Registered] == 0)
	{
		new params[128];
		GameTextForPlayer(playerid,"~r~Before you can play, you must register!",4000,3);
		ShowPlayerDialog(playerid, DIALOGID0+1, DIALOG_STYLE_PASSWORD,"Password", params, "OK", "Cancel");
		SetTimerEx("DelayKillPlayer", 2500,0,"d",playerid);
		return 1;
	}
	//
	if(PlayerInfo[playerid][Registered] == 1 && PlayerInfo[playerid][LoggedIn])
	{
		new params[128];
		ShowPlayerDialog(playerid, DIALOGID0+2, DIALOG_STYLE_PASSWORD,"You Must Enter Your Password Below", params, "OK", "Cancel");
		SetTimerEx("DelayKillPlayer", 2500,0,"d",playerid);
		return 1;
	}
.
.
.
.
.
.
but that first game text is comming that you must register no matter if person is registred please help me
Reply
#2

You can't just leave the info[] parameter of your ShowPlayerDialog blank.

Replace your code with this one -

pawn Код:
public OnPlayerConnect(playerid)
{
    if(PlayerInfo[playerid][Registered] == 0)
    {
        GameTextForPlayer(playerid,"~r~Before you can play, you must register!",4000,3);
        ShowPlayerDialog(playerid, 22, DIALOG_STYLE_PASSWORD,"Password", "Please Register in order to play on this server", "OK", "Cancel");
        SetTimerEx("DelayKillPlayer", 2500,0,"d",playerid);
        return 1;
    }

    else if(PlayerInfo[playerid][Registered] == 1)
    {
        ShowPlayerDialog(playerid, 23, DIALOG_STYLE_PASSWORD,"Login", "You must enter your password below to continue.", "OK", "Cancel");
        SetTimerEx("DelayKillPlayer", 2500,0,"d",playerid);
        return 1;
    }
.
.
.
Reply
#3

man but it is even showing me register when i am registred even register one is doing nothing its just a dialog
Reply
#4

wait it is working i didnt noticed that u put id 22 and 23 whicle i was using dialogid0+1 and dialogid0+2 but if im registred it is showing me register dialog not login .../
Reply
#5

pls anyone
Reply
#6

Are you actually using y_ini/mysql or anyother saving system?
If not,no wonder why it keeps prompting the register dialog.
Reply
#7

Код:
public OnPlayerConnect(playerid)
{
	if(PlayerInfo[playerid][Registered] == 0 && PlayerInfo[playerid][LoggedIn] != 1)
	{
		new params[128];
		GameTextForPlayer(playerid,"~r~Before you can play, you must register!",4000,3);
		ShowPlayerDialog(playerid, DIALOGID0+1, DIALOG_STYLE_PASSWORD,"Password", params, "OK", "Cancel");
		SetTimerEx("DelayKillPlayer", 2500,0,"d",playerid);
		return 1;
	}
	//
	else
	{
		new params[128];
		ShowPlayerDialog(playerid, DIALOGID0+2, DIALOG_STYLE_PASSWORD,"You Must Enter Your Password Below", params, "OK", "Cancel");
		SetTimerEx("DelayKillPlayer", 2500,0,"d",playerid);
		return 1;
	}
Reply
#8

Change your dialog line to,

pawn Код:
ShowPlayerDialog(playerid, DIALOG_ID, DIALOG_STYLE_PASSWORD,"Password", "Please Register in order to play on this server", "OK", "Cancel");
Then try.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)