IS4Code / YSF

YSF Server Functions
Other
98 stars 34 forks source link

native GetPlayerDialogID(playerid) #155

Open Sef69 opened 6 days ago

Sef69 commented 6 days ago

So, when I use GetPlayerDialogID to get ID of the dialog it clearly show's the correct ID, but when I close dialog GetPlayerDialogID always show the last dialog ID that's opened, so if I opened dialog ID: 50, GetPlayerDialogID will print ID: 50, but when I close dialog GetPlayerDialogID print the last dialog ID in this case ID:50, so I think it need's to print ID: -1 "INVALID_DIALOG_ID" when I close dialog

IS4Code commented 6 days ago

GetPlayerDialogID retrieves the dialog ID associated with the player. This is set by the server and the function just retrieves the value.

How do you close the dialog? If by calling ShowPlayerDialog with negative ID, from what I can tell, it should set that too.

Sef69 commented 6 days ago

When I said "close" I think like when I press ESC, when I'm done with using dialog, for example I have dialog with input menu, and then I input something and press enter, and after that when the dialog is closed (I'm done with using that dialog) GetPlayerDialogID print the last dialog ID, if it is 50 it will print 50, I want to tell you that after someone is done with using some dialog GetPlayerDialogID need's to print "-1" because it's "INVALID_DIALOG_ID", (there is no showed dialog on screen), so GetPlayerDialogID need's to print dialog ID (if any is showed to player) if it's not GetPlayerDialogID need's to print "-1"