10.12.2010, 20:56
Is it possible to make it when i type /commands, then the dialog with commands come up, then i click on "call after food delivery" then i want it to type /food
like i just type(ingame): t/food
like i just type(ingame): t/food
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/commands", true))
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Thing!", "Call after food delivery", "call", "Cancel");
return 1;
}
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)
{
switch(dialogid)
{
case 1:
{
switch(listitem)
{
//Food Delivery-------------------------------------------------
case 0:
{
SendClientCommand(playerid, "/food"); //something like that =/... i just guessed
}
//--------------------------------------------------------------
}
}
}
}
return 1;
}