Showplayerdialog in OnPlayerSpawn doesn't get called. - 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: Showplayerdialog in OnPlayerSpawn doesn't get called. (
/showthread.php?tid=167220)
Showplayerdialog in OnPlayerSpawn doesn't get called. -
Toni - 11.08.2010
Hi, I am having a small problem, and I can't really find the issue.
Apparently, "OnPlayerSpawn" is not getting called, so the script can't show the dialog.
I'm not sure if the Dialog Id's are conflicting but I doubt it since I have no filterscripts loaded, and all my dialog id's are defined next to eachother for organization.
Can anyone help?
Re: Showplayerdialog in OnPlayerSpawn doesn't get called. -
WillyP - 11.08.2010
code?
.
Re: Showplayerdialog in OnPlayerSpawn doesn't get called. -
Toni - 11.08.2010
OnPlayerSpawn:
pawn Код:
ShowPlayerDialog(playerid, DGen, DIALOG_STYLE_INPUT, "RC:RP Gender", "Please enter your gender below", "Submit", "Cancel");
OnDialogReponse:
pawn Код:
if(dialogid == DGen)
{
if(response == 1)
{
new
str2[128]
;
format(str2, sizeof(str2), "UPDATE `playerinfo` SET `Gender` = '%s' WHERE `user` = '%s'", inputtext, pName(playerid));
mysql_query(str2);
format(str2, sizeof(str2), "You're gender is %s", inputtext);
SendClientMessage(playerid, YELLOW, str2);
ShowPlayerDialog(playerid, DAge, DIALOG_STYLE_INPUT, "RC:RP Age", "Please enter your age below", "Submit", "Cancel");
return 1;
}
else
{
SendClientMessage(playerid, RED, "ERROR: You cannot cancel these steps!");
ShowPlayerDialog(playerid, DGen, DIALOG_STYLE_INPUT, "RC:RP Gender", "Please enter your gender", "Submit", "Cancel");
}
}