Pop up information box
#1

I'm not exactly sure if that's what it's called.
But the only thing I see when I open a title that says "dialog box" or something close,
it doesn't show me a picture. What I'm trying to do is create a box where.
if someone does "/rules", a whole bunch of information pops up.
I would also like to see how you would make 1 or 2 buttons on the bottom like
"cancel" or "ok". If someone can show me or refer me to another topic, I'd really appreciate it.

Also, I'm sure that can be used for several things like pop ups for buying weapons.
If you wanna do something like "/weapons" and you click the weapon you want, then
the next box after that would ask how many weapons you would like and confirm whether you do
or don't want them.

I'm sure the script would be roughly the same. Just changing/adding more things.
Thanks.
Reply
#2

https://sampwiki.blast.hk/wiki/ShowPlayerDialog
Reply
#3

Well that one skipped ahead a little bit but then I found this one

https://sampwiki.blast.hk/wiki/How_to_Create_a_Dialog

But when I try out the script, it gives me these errors when I compile

: error 001: expected token: ";", but found "{"
: error 010: invalid function or declaration
: error 010: invalid function or declaration

I know the website is outdated, any fix for it?
Reply
#4

Show us the lines please.
Reply
#5

Well it says that I'm suppose to put it under OnPlayerCommandText so this is what I did:

public OnPlayerCommandText
{
if(!strcmp(cmdtext, "/drinks", true))
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "What is it that you want?", "Sprunk ($1)\nBeer ($2)\nWine ($3)", "Purchase", "Cancel");
return 1;
}
}

I just wanted to see how it works so I did a simple copy & paste.
But not even that works. Must be cause it's outdated.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)