inputtext problem. - 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: inputtext problem. (
/showthread.php?tid=345529)
inputtext problem. -
iGetty - 25.05.2012
pawn Код:
case 11:
{
if(!response) return 1;
else
{
if(strlen(inputtext) > 1)
{
new string[256];
format(string, sizeof(string), "AdmMsg: %s(%d) is requiring Admin assistance: %s", RemoveUnderScore(playerid), inputtext);
SendToAdmins(YELLOW, string);
format(string, sizeof(string), "An Admin should respond to your request soon. You can use /cancelassistance if you no longer need us.");
SendClientMessage(playerid, SHOUT, string);
AssistanceNeeded[playerid] = 1;
return 1;
}
else return ShowPlayerDialog(playerid, 11, DIALOG_STYLE_INPUT, "Requiring Admin Assistance", "Please tell us why you're requiring Admin assistance:", "Send", "Cancel");
}
}
That's my code for OnDialogResponse, but when I send it, it shows in game:
"AdmMsg: Their Name(Their ID) is requiring Admin assistance: "
It doesn't send the "inputtext" on the dialog.
Thanks!
Re: inputtext problem. -
ViniBorn - 25.05.2012
Replace
pawn Код:
format(string, sizeof(string), "AdmMsg: %s(%d) is requiring Admin assistance: %s", RemoveUnderScore(playerid), inputtext);
pawn Код:
format(string, sizeof(string), "AdmMsg: %s(%d) is requiring Admin assistance: %s", RemoveUnderScore(playerid),playerid, inputtext);