dialog
#1

PHP код:
CMD:leader(playerid)
{
    
ShowPlayerDialog(playerid1200DIALOG_STYLE_MSGBOX"TEX1""Welcome %s %s,\nPlease select.""ACTION1""ACTION2""ACTION3""ACTION4",GetRankName(playerid),PlayerName(playerid));
    return 
1;

What's wrong with it ? It gives me

PHP код:
warning 202number of arguments does not match definition 
4x times
Reply
#2

You are using 2 wrong arguments. Delete last 2 ofw them, those are the buttons and there can be max 2
Reply
#3

Код:
new string[200], string2[200];
format(string2, sizeof(string2), "ACTION 1/nACTION 2/nACTION 3/nACTION 4"); // Actions
format(string, sizeof(string), "Welcome %s %s, Please select",GetRankName(playerid),PlayerName(playerid));
ShowPlayerDialog(playerid, 1200, DIALOG_STYLE_MSGBOX, string,  string2, "Select", "Cancel");
Maybe this!
Reply
#4

I want multiple buttons. How can I do it?
Reply
#5

Use DIALOG_STYLE_LIST instead. You can show _MSGBOX before to say something like "in the next step, Plesse select ..."
Reply
#6

Quote:
Originally Posted by Zeus666
Посмотреть сообщение
I want multiple buttons. How can I do it?
You cannot, ShowPlayerDialog allows you to use only two buttons.
Check the wiki for more details > https://sampwiki.blast.hk/wiki/ShowPlayerDialog
Edit:
You can do this instead:
PHP код:
CMD:leader(playerid)
{
    new 
string[64];
    
format(stringsizeof(string), "Welcome %s %s,\nPlease select.",GetRankName(playerid),PlayerName(playerid));
    
ShowPlayerDialog(playerid1200DIALOG_STYLE_LISTstring"Action 1\nAction 2\n Action3\nAction4""Select""Cancel");
    return 
1;

Reply
#7

Quote:
Originally Posted by Zeus666
Посмотреть сообщение
I want multiple buttons. How can I do it?
Use textdraws for that, create a box, create a textdraw with text and create as many buttons you like.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)