Dialog help - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Dialog help (
/showthread.php?tid=185403)
Dialog help -
Cedricn - 24.10.2010
I have a problem:
if(dialogid == 3)
{
if(response)
{
SendClientMessage(playerid,FARBE_GELB2, "you are male!");
dini_IntSet(accFormat,"sex",Player[playerid][sex]=0);
SpawnPlayer(playerid);
}
else
{
SendClientMessage(playerid,FARBE_GELB2, "you are female!");
dini_IntSet(accFormat,"Sex",Player[playerid][Sex]=1);
SpawnPlayer(playerid);
}
}
here the problem:
if i click male comes the text:you are male
but if i click female nothing happens
thanks for help
Re: Dialog help -
HyperZ - 24.10.2010
Try this:
pawn Код:
ShowPlayerDialog(playerid,3,DIALOG_STYLE_MSGBOX,"Gender","You're Male or Female?","Male","Female");
//OnDialogResponse
if (dialogid == 3)
{
if(response == 0)
{
SendClientMessage(playerid,FARBE_GELB2, "you are male!");
dini_IntSet(accFormat,"sex",Player[playerid][sex]=0);
SpawnPlayer(playerid);
}
if(response)
{
SendClientMessage(playerid,FARBE_GELB2, "you are female!");
dini_IntSet(accFormat,"Sex",Player[playerid][Sex]=1);
SpawnPlayer(playerid);
}
return 1;
}
Re: Dialog help -
Cedricn - 24.10.2010
thank you