[HELP] I wanna make it better
#1

Hello, I have this:
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
	{
	if(dialogid == JOINSTARS)
		{
		if(!strcmp(inputtext, "password", true))
		{
		team[playerid] = 6;
		ShowPlayerDialog(playerid, JOINSTARS, DIALOG_STYLE_INPUT, "Please enter the password to join S.T.A.R.S.", "Password:", "Submit", "Cancel");
		SendClientMessage(playerid,GREEN,"You may now spawn.");
		SetPlayerColor(playerid,GREEN);
		SetPlayerTeam(playerid, 1);
		SetPlayerPos(playerid,1624.2527,1821.0498,10.8203) ;
		SetPlayerFacingAngle(playerid,5.6779);
		GivePlayerWeapon(playerid,31,300);
		GivePlayerWeapon(playerid,24,300);
		GivePlayerMoney(playerid, 20000);
		SetPlayerInterior(playerid,0);
		SetPlayerArmour(playerid, 100);
  }
but after the player enter the password, the box won't go away until he types something else and click submit. How do I make it go away by itself after he enters the password and click submit ?
Reply
#2

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == JOINSTARS)
    {
        if(response)
        {
            if(!strcmp(inputtext, "password", true))
            {
                team[playerid] = 6;
                SendClientMessage(playerid,GREEN,"You may now spawn.");
                SetPlayerColor(playerid,GREEN);
                SetPlayerTeam(playerid, 1);
                SetPlayerPos(playerid,1624.2527,1821.0498,10.8203) ;
                SetPlayerFacingAngle(playerid,5.6779);
                GivePlayerWeapon(playerid,31,300);
                GivePlayerWeapon(playerid,24,300);
                GivePlayerMoney(playerid, 20000);
                SetPlayerInterior(playerid,0);
                SetPlayerArmour(playerid, 100);
            }
        }
        else SendClientMessage(playerid, 0xff0000FF,"Cancelled");
    }
    return 1;
}
You was showing the dialog inside the dialog
Reply
#3

It is a lot better, it is not going away by itself but it does when clicking cancel
thx man
Reply
#4

Try returning 1 after "SetPlayerArmour(playerid, 100);" might not make a difference but worth a try.
Reply
#5

Will try
Reply
#6

It does the same thing xD
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)