(HELP) Dialog Esc, or Cancel closes conection with svr
#1

Hello, I have dialog what shows me, you can buy a Driving License Test and there is Ok or can be Cancel
If I click cancel server will close a conection, and i need that will only close dialog window.Is it possible?
Reply
#2

I thought this is easy.
Reply
#3

it sounds like your dialog ids are being messed up, here's how i do it so they don't get muddled up
I have a stock called ResetDialogs which resets a set of pvars such like this:

pawn Код:
ResetDialogs(playerid)
{
    SetPVarInt(playerid,"dialog1",-1); since no dialog created would be id -1
}
then when i want to show them a dialog I'll use
pawn Код:
new DID;
ShowPlayerDialog(playerid,DID,ect...
SetPVarInt(playerid,"dialog1",DID);
then when they respond to a dialog, after i have figured out which dialog it is I reset the dialogids with ResetDialogs(playerid)
pawn Код:
if(dialogid == GetPVarInt(playerid,"dialog1"))
    {
        ResetDialogs(playerid);
don't forget to also reset the dialogs when the player joins the server
Reply
#4

I think it is because in my game, is registration Login, cancel or Register, Cancel and there if you do Cancel it will close conection too, maybe it is because this?
Reply
#5

omg i know. You have something like this
PHP код:
if(dialogid)
{
    if(!
response)
    {
        
Kick(playerid);
    }

under
PHP код:
public OnDialogResponse 
. If you have post here code. You have read that if you have only one dialog you can leave dialogid. Otherwise you must use dialogid == 0/1/2/3/4...
Reply
#6

I dont have in script
PHP код:
public OnDialogResponse 
Reply
#7

second callback from the end. You have it, trust me.
Reply
#8

I found that, thank you, man
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)