How i can make...
#3

ok i made the dialog:
Quote:

public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/911", true))
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "911 Emergency what service you need?", "Police\nFire Dept", "Call", "Cancel");

return 1;
}

return 0;
}

How i can now send a message to PD if select Police and FD if select FD?

Quote:

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)// They pressed the first button.
{
switch(dialogid)// If you only have one dialog, then this isn't required, but it's neater for when you implement more dialogs.
{
case 1:// Our dialog!
{
switch(listitem)// Checking which listitem was selected
{
case 0:// The first item listed
{
if(GetPlayerMoney(playerid) < 1) return SendClientMessage(playerid, 0xFFFFFF, "[INFO]Type your message and the location.");
GivePlayerMoney(playerid, -0);
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
}
case 1: // The second item listed
{
if(GetPlayerMoney(playerid) < 1) return SendClientMessage(playerid, 0xFFFFFF, "[INFO]Type your message and the location.");
GivePlayerMoney(playerid, 02);
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
}

}
}
}
}
return 1;

Reply


Messages In This Thread
How i can make... - by Gooday - 27.11.2011, 10:19
Re: How i can make... - by Unte99 - 27.11.2011, 10:24
Re: How i can make... - by Gooday - 27.11.2011, 10:59
Re: How i can make... - by Unte99 - 28.11.2011, 12:46

Forum Jump:


Users browsing this thread: 1 Guest(s)