[solved]How can i make my dialog show up
#1

How can i make my dialog stay open until i press cancel?

Heres my dialog

Код:
ShowPlayerDialog(playerid,STORE_DIALOG,DIALOG_STYLE_LIST,"Buy weapon","Chainsaw ($1500)\nFlowers ($5)\nBaseball bat ($100)\nBeer ($20)\nWallet ($1000)\nParachute($500)","Choose","Cancel");
It works perfectly for buying stuff in the 24/7 but when i enter the checkpoint and press say beer, the dialog closes i have to leave the checkpoint and enter it again for it to open again.


Reply
#2

Just show it again in OnDialogResponse, like:
Код:
if(dialogid == STORE_DIALOG)
{
  if(response)//If player pressed not cancel
  {
    ShowPlayerDialog(playerid,STORE_DIALOG,DIALOG_STYLE_LIST,"Buy weapon","Chainsaw ($1500)\nFlowers ($5)\nBaseball bat ($100)\nBeer ($20)\nWallet ($1000)\nParachute($500)","Choose","Cancel");
  }
}
Reply
#3

Quote:
Originally Posted by Sinyavski
Just show it again in OnDialogResponse, like:
Код:
if(dialogid == STORE_DIALOG)
{
  if(response)//If player pressed not cancel
  {
    ShowPlayerDialog(playerid,STORE_DIALOG,DIALOG_STYLE_LIST,"Buy weapon","Chainsaw ($1500)\nFlowers ($5)\nBaseball bat ($100)\nBeer ($20)\nWallet ($1000)\nParachute($500)","Choose","Cancel");
  }
}
That didn't work. My dialog appears when the player enters a certain checkpoint, Heres how i have it...


Код:
	else if (gCheckpoint[15] == checkpointid)
	{
  if(dialogid == STORE_DIALOG)
	{
	if(response)//If player pressed not cancel
	{
  ShowPlayerDialog(playerid,STORE_DIALOG,DIALOG_STYLE_LIST,"Buy weapon","Chainsaw ($1500)\nFlowers ($5)\nBaseball bat ($100)\nBeer ($20)\nWallet ($1000)\nParachute($500)","Choose","Cancel");
  }
  SendClientMessage(playerid,0x808080AA,"Type /holdup to rob this store!");
 	}
 	}
It says: undefined symbol "response"

undefined symbol "dialogid"
Reply
#4

nevermind Fixed.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)