About Dialog [HELP!]
#1

Hey i want to add my buy score menu to the /shop list

Heres The Code For Shop

pawn Код:
if(strcmp("/shop", cmdtext, true, 10) == 0)
    {
      if(InSpawn[playerid] == true) return SendClientMessage(playerid, COLOR_RED, "You can't use this command while on class selection");
      if(GetPVarInt(playerid, "InDm") == 1) return SendClientMessage(playerid,COLOR_RED, "You cant use any command While Your in DM");
      else
      {
      if(!IsPlayerInRangeOfPoint(playerid,4.0,-28.0168,-89.9490,1003.5469)) return SendClientMessage(playerid,COLOR_RED,"You Have To Be In Market 24/7");
      else
      {
      SendClientMessage(playerid, COLOR_RED, "Welcome To Market 24/7");
      ShowPlayerDialog(playerid,7,DIALOG_STYLE_LIST,"Market 24/7 Menu","Sprunk (Coast $50)\nBeer (Coast $100)\nWine (Coast $100)\nCigarette (Coast $50)","Buy","Cancel");
      }
      }
      return 1;
    }
But i want to add my buy score menu

example

Код:
Blahblah blah
Blahblah blah
Blahblah blah
Blahblah blah
Score Menu
And i also want when i click score menu it must pop this out!:

pawn Код:
if(!strcmp(cmdtext, "/buyscore", true))
    {
       if(InSpawn[playerid] == true) return SendClientMessage(playerid, COLOR_RED, "You can't use this command while on class selection");
       if(GetPVarInt(playerid, "InDm") == 1) return SendClientMessage(playerid,COLOR_RED, "You cant use any command While Your in DM");
       else
       {
       ShowPlayerDialog(playerid,8,DIALOG_STYLE_LIST,"Buy Score Menu","10 Score (Coast $1000)\n50 Score (Coast $10000)\n100 Score (Coast $50000)\n500 Score (Coast $1000000)","Buy","Cancel");
       }
       return 1;
    }
Please Help !
Reply
#2

Command:
pawn Код:
if(strcmp("/shop", cmdtext, true, 10) == 0)
    {
      if(InSpawn[playerid] == true) return SendClientMessage(playerid, COLOR_RED, "You can't use this command while on class selection");
      if(GetPVarInt(playerid, "InDm") == 1) return SendClientMessage(playerid,COLOR_RED, "You cant use any command While Your in DM");
      else
      {
      if(!IsPlayerInRangeOfPoint(playerid,4.0,-28.0168,-89.9490,1003.5469)) return SendClientMessage(playerid,COLOR_RED,"You Have To Be In Market 24/7");
      else
      {
      SendClientMessage(playerid, COLOR_RED, "Welcome To Market 24/7");
      ShowPlayerDialog(playerid,7,DIALOG_STYLE_LIST,"Market 24/7 Menu","Sprunk (Coast $50)\nBeer (Coast $100)\nWine (Coast $100)\nCigarette (Coast $50)\nScore Menu","Buy","Cancel");
      }
      }
      return 1;
    }
And you need to modify code of the dialogid 7 in your OnDialogResponse callback. Like:
pawn Код:
// OnDialogResponse, dialogid=7
if(listitem == 4)
{
    ShowPlayerDialog(playerid,8,DIALOG_STYLE_LIST,"Buy Score Menu","10 Score (Coast $1000)\n50 Score (Coast $10000)\n100 Score (Coast $50000)\n500 Score (Coast $1000000)","Buy","Cancel");
}
Anyway, show that piece of OnDialogResponse callback if you want me to make a complete code.
Reply
#3

Quote:
Originally Posted by Norck
Посмотреть сообщение
Command:
pawn Код:
if(strcmp("/shop", cmdtext, true, 10) == 0)
    {
      if(InSpawn[playerid] == true) return SendClientMessage(playerid, COLOR_RED, "You can't use this command while on class selection");
      if(GetPVarInt(playerid, "InDm") == 1) return SendClientMessage(playerid,COLOR_RED, "You cant use any command While Your in DM");
      else
      {
      if(!IsPlayerInRangeOfPoint(playerid,4.0,-28.0168,-89.9490,1003.5469)) return SendClientMessage(playerid,COLOR_RED,"You Have To Be In Market 24/7");
      else
      {
      SendClientMessage(playerid, COLOR_RED, "Welcome To Market 24/7");
      ShowPlayerDialog(playerid,7,DIALOG_STYLE_LIST,"Market 24/7 Menu","Sprunk (Coast $50)\nBeer (Coast $100)\nWine (Coast $100)\nCigarette (Coast $50)\nScore Menu","Buy","Cancel");
      }
      }
      return 1;
    }
And you need to modify code of the dialogid 7 in your OnDialogResponse callback. Like:
pawn Код:
// OnDialogResponse, dialogid=7
if(listitem == 4)
{
    ShowPlayerDialog(playerid,8,DIALOG_STYLE_LIST,"Buy Score Menu","10 Score (Coast $1000)\n50 Score (Coast $10000)\n100 Score (Coast $50000)\n500 Score (Coast $1000000)","Buy","Cancel");
}
Anyway, show that piece of OnDialogResponse callback if you want me to make a complete code.
Thanks dude
Reply
#4

Last more question how can i make my buy score menu

example its

Код:
Cancel
how can i make to

Код:
Back
?
Reply
#5

pawn Код:
// OnDialogResponse, dialogid=8
if(!response)
{
    ShowPlayerDialog(playerid,7,DIALOG_STYLE_LIST,"Market 24/7 Menu","Sprunk (Coast $50)\nBeer (Coast $100)\nWine (Coast $100)\nCigarette (Coast $50)\nScore Menu","Buy","Cancel");
    return 1;
}
And (obviously) change "Cancel" to "Back" .
Reply
#6

Thanks dude
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)