Posts: 78
Threads: 0
Joined: May 2014
Код:
ShowPlayerDialog(playerid, dialogid, style, caption[], info[], button1[], button2[]);
Posts: 189
Threads: 60
Joined: Jan 2012
Reputation:
0
Erm? Can you explain how do I add a command to SHOW the dialog?
Posts: 78
Threads: 0
Joined: May 2014
24.05.2014, 22:18
(
Последний раз редактировалось eXeDev; 08.06.2014 в 20:13.
)
If you're using y_commands:
pawn Код:
YCMD:dialog(playerid, params[], help)
{
ShowPlayerDialog(playerid, dialogid, style, caption[], info[], button1[], button2[]);
return true;
}
If you're using ZCMD:
pawn Код:
CMD:dialog(playerid, params[])
{
ShowPlayerDialog(playerid, dialogid, style, caption[], info[], button1[], button2[]);
return true;
}
If you're using strcmp:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/dialog"))
{
ShowPlayerDialog(playerid, dialogid, style, caption[], info[], button1[], button2[]);
return true;
}
return false;
}
https://sampwiki.blast.hk/wiki/ShowPlayerDialog
Posts: 189
Threads: 60
Joined: Jan 2012
Reputation:
0
CMD:dialog(playerid, params[])
{
ShowPlayerDialog(playerid, dialogid, style, caption[], info[], button1[], button2[]);
return true;
}
When I add this at the very end it gives me this error:
C:\Users\MARKO\Desktop\Learning\gamemodes\Tutorial .pwn(44) : error 017: undefined symbol "dialogid"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
HelP!
Posts: 78
Threads: 0
Joined: May 2014
Quote:
Originally Posted by Bek_Loking
CMD:dialog(playerid, params[])
{
ShowPlayerDialog(playerid, dialogid, style, caption[], info[], button1[], button2[]);
return true;
}
When I add this at the very end it gives me this error:
C:\Users\MARKO\Desktop\Learning\gamemodes\Tutorial .pwn(44) : error 017: undefined symbol "dialogid"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
HelP!
|
You're supposed to replace those parameters with what you require.
I.E.
Код:
ShowPlayerDialog(playerid, 9999, DIALOG_STYLE_LIST, "Example Dialog", "Option #1\nOption #2\nOption #3", "Select", "Cancel");
Posts: 189
Threads: 60
Joined: Jan 2012
Reputation:
0
I know, I misstyped, I got a warning****
Warning is: loose indentation line 27
NVM. I just had to move the return 1; in the line with ShowPlayerDialog
It was like this
ShowPlayerDialog(')
return 1;
i fixed it by:
ShowPlayerDialog()
return 1;