SA-MP Forums Archive
DIalog not showing up - 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: DIalog not showing up (/showthread.php?tid=518938)



DIalog not showing up - CBCandyBoy - 12.06.2014

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


Re: DIalog not showing up - Adityz - 12.06.2014

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;
    }
.
.
.



Re: DIalog not showing up - CBCandyBoy - 12.06.2014

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


Re: DIalog not showing up - CBCandyBoy - 12.06.2014

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


Re: DIalog not showing up - CBCandyBoy - 12.06.2014

pls anyone


Re: DIalog not showing up - DavidBilla - 12.06.2014

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


Re: DIalog not showing up - Rittik - 12.06.2014

Код:
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;
	}



Re: DIalog not showing up - Inn0cent - 12.06.2014

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.