Manually execute OnDialogResponse
#1

Hey!

I'm trying to manually execute OnDialogResponse and I've tried both executing it as a function with all parameters (OnDialogResponse(playerid, DIALOG_MDC_VEHICLE, 1, 0, plate);) and in a CallLocalFunction.

It seems like it ain't responding as nothing happens once I execute it.


Appreciate all replies!
Reply
#2

Manually? the player uses a command and the dialog appers at the player?
Reply
#3

I've seen using this method for callbacks (OnPlayerDisconnect, OnPlayerLeaveRaceCheckpoint) but I'm not sure if that would work for this callback. It might needs to be displayed (a dialog) first.

PS: Does "plate" store a string? If not, a warning for type mismatch should be given.
Reply
#4

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
I've seen using this method for callbacks (OnPlayerDisconnect, OnPlayerLeaveRaceCheckpoint) but I'm not sure if that would work for this callback. It might needs to be displayed (a dialog) first.

PS: Does "plate" store a string? If not, a warning for type mismatch should be given.
Yes, plate is a string which I've selected from a MySQL query. The reason why I wish to manually execute the dialog is because I can't bother to have two identical dialogs (different ids) when they are doing the exact same thing.

I'm gonna try to show the player a dialog and then execute the CallLocalFunction as you suggested. Thank you!

EDIT:

I solved it. I forgot that I had put in a hack to disable players from tampering with their memory, mixing up the ids and I didn't set the DIALOG_MDC_VEHICLE ID before I ran the callback.

Thanks for the help though!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)