25.06.2017, 23:19
Freeze both players - You will have to use DIALOG_STLYE_INPUT for the 'giveplayerid'.
You were pretty close in your Command.
Define 'MindReading' at the top of your script.
OnDialogResponse should do the rest.
Edit: You used the 'r' specifier for the playerid/partofname, but you should use 'u' for that.
You were pretty close in your Command.
PHP код:
CMD:mindread(playerid, params[])
{
new giveplayerid, result[120];
if(sscanf(params, "us[120]", giveplayerid, result)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /(m)ind®ead [playerid/PartOfName] [message]");
TogglePlayerControllable(playerid, 1); // Freezes the playerid
TogglePlayerControllable(giveplayerid, 1); // Freezes the target
ShowPlayerDialog(giveplayerid, MindReading, DIALOG_STYLE_INPUT, "Your mind is being read out", result, "Enter", "");
return 1;
}
OnDialogResponse should do the rest.
Edit: You used the 'r' specifier for the playerid/partofname, but you should use 'u' for that.