Dialog help -
Youice - 04.04.2012
Hello here is my problem ::
after I connect and fill in my age & sex info. it kicks me here is the code::
Код:
if(dialogid == DIALOG_AGE)
{
if(!response)
{
Kick(playerid);
}
else
{
if(strlen(inputtext))
{
new age = strval(inputtext);
if(age > 100 || age < 16)
{
ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "Age ","How old are you?\n{FF0000}(( 16 - 100 ))","Answer","Quit");
}
else
{
PlayerInfo[playerid][pAge] = age;
new
string[ 64 ]
;
format(string, sizeof(string), "INFO: You're {3BB9FF}%d years old.",age);
SendClientMessage(playerid, -1, string);
SpawnPlayer(playerid);
new file[100];
dini_Create(file);
dini_IntSet(file, "SEX",PlayerInfo[playerid][pSex]);
dini_IntSet(file, "AGE",PlayerInfo[playerid][pAge]);
}
}
else
{
return 0;
}
}
}
if(dialogid == DIALOG_SEX)
{
if(!response)
{
Kick(playerid);
}
if(strlen(inputtext))
{
PlayerInfo[playerid][pSex] = 1;
SendClientMessage(playerid, -1, "INFO: You are {3BB9FF}male.");
ShowPlayerDialog(playerid, DIALOG_SPAWN, DIALOG_STYLE_LIST, "Select Your Shelter", "Grove Street\nJefferson Motel\nMarket Station","Select","Quit");
SetPlayerSkin(playerid, 60);
PlayerInfo[playerid][pSkin] = 60;
ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "- Age -","How old are you??\n{FF0000}(( 16 - 100 ))","Answer","Quit");
}
else
{
PlayerInfo[playerid][pSex] = 2;
SendClientMessage(playerid, -1, "INFO: You are {3BB9FF}female.");
ShowPlayerDialog(playerid, DIALOG_SPAWN, DIALOG_STYLE_LIST, "Select Your Shelter", "Grove Street\nJefferson Motel\nMarket Station","Select","Quit");
SetPlayerSkin(playerid, 233);
PlayerInfo[playerid][pSkin] = 233;
ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "- Age -","How old are you??\n{FF0000}(( 16 - 100 ))","Answer","Quit");
}
}
Re: Dialog help -
.FuneraL. - 04.04.2012
pawn Код:
if(dialogid == DIALOG_AGE)
{
if(!response)
{
Kick(playerid);
}
else
{
if(strlen(inputtext))
{
new age = strval(inputtext);
if(age > 100 || age < 0)
{
ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "Age ","How old are you?\n{FF0000}(( 0 - 100 ))","Answer","Quit");
}
else
{
PlayerInfo[playerid][pAge] = age;
new
string[ 64 ]
;
format(string, sizeof(string), "INFO: You're {3BB9FF}%d years old.",age);
SendClientMessage(playerid, -1, string);
SpawnPlayer(playerid);
new file[100];
dini_Create(file);
dini_IntSet(file, "SEX",PlayerInfo[playerid][pSex]);
dini_IntSet(file, "AGE",PlayerInfo[playerid][pAge]);
}
}
else
{
return 0;
}
}
}
if(dialogid == DIALOG_SEX)
{
if(!response)
{
SendClientMessage(playerid, 0xFFFFFFFF, "Change Your Sex!", pname);
}
if(strlen(inputtext))
{
PlayerInfo[playerid][pSex] = 1;
SendClientMessage(playerid, -1, "INFO: You are {3BB9FF}male.");
ShowPlayerDialog(playerid, DIALOG_SPAWN, DIALOG_STYLE_LIST, "Select Your Shelter", "Grove Street\nJefferson Motel\nMarket Station","Select","Quit");
SetPlayerSkin(playerid, 60);
PlayerInfo[playerid][pSkin] = 60;
ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "- Age -","How old are you??\n{FF0000}(( 16 - 100 ))","Answer","Quit");
}
else
{
PlayerInfo[playerid][pSex] = 2;
SendClientMessage(playerid, -1, "INFO: You are {3BB9FF}female.");
ShowPlayerDialog(playerid, DIALOG_SPAWN, DIALOG_STYLE_LIST, "Select Your Shelter", "Grove Street\nJefferson Motel\nMarket Station","Select","Quit");
SetPlayerSkin(playerid, 233);
PlayerInfo[playerid][pSkin] = 233;
ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "- Age -","How old are you??\n{FF0000}(( 0 - 100 ))","Answer","Quit");
}
}
Try This
Re: Dialog help -
Youice - 04.04.2012
Still same problem you only changed the number of " 16 " minimum to " 0 " minimum , any way thank you for trying
Re: Dialog help -
Youice - 04.04.2012
any help
?
Re: Dialog help -
BrandyPenguin - 04.04.2012
Show how to you open your dialog? Maybe your responding is conflict with displaying.
Re: Dialog help -
jaheem - 04.04.2012
hop this work
pawn Код:
if(dialogid == DIALOG_AGE)
{
if(response)
{
new age = strval(inputtext);
if(age < 16 || age > 100)
{
ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "Age ","How old are you?\n{FF0000}(( 16 - 100 ))","Answer","Quit");
return 1;
}
else
{
new string[ 64 ]
;
format(string, sizeof(string), "INFO: You're {3BB9FF}%d years old.",age);
SendClientMessage(playerid, -1, string);
SpawnPlayer(playerid);
new file[100];
dini_Create(file);
dini_IntSet(file, "SEX",PlayerInfo[playerid][pSex]);
dini_IntSet(file, "AGE",PlayerInfo[playerid][pAge]);
return 1;
}
}
else
{
Kick(playerid);
return 1;
}
}
if(dialogid == DIALOG_SEX)
{
if(response)
{
PlayerInfo[playerid][pSex] = 1;
SendClientMessage(playerid, -1, "INFO: You are {3BB9FF}male.");
ShowPlayerDialog(playerid, DIALOG_SPAWN, DIALOG_STYLE_LIST, "Select Your Shelter", "Grove Street\nJefferson Motel\nMarket Station","Select","Quit");
SetPlayerSkin(playerid, 60);
PlayerInfo[playerid][pSkin] = 60;
ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "- Age -","How old are you??\n{FF0000}(( 16 - 100 ))","Answer","Quit");
}
else
{
PlayerInfo[playerid][pSex] = 2;
SendClientMessage(playerid, -1, "INFO: You are {3BB9FF}female.");
ShowPlayerDialog(playerid, DIALOG_SPAWN, DIALOG_STYLE_LIST, "Select Your Shelter", "Grove Street\nJefferson Motel\nMarket Station","Select","Quit");
SetPlayerSkin(playerid, 233);
PlayerInfo[playerid][pSkin] = 233;
ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "- Age -","How old are you??\n{FF0000}(( 16 - 100 ))","Answer","Quit");
}
}