Dialog Help
#1

Hello guys!

I was making a duel script for my server. So I'm making it with dialogs, so when you type /duel (id), it shows the targetid the Accept/Decline Dialog.
But I need help with the response of that dialog. I need the id of the player who typed /duel or who invited him to the duel when he click accepts.
Like when he accepts:
new duelerid; <<smthng like that? Hope u understand me!
How can I use the player id of the one who typed /duel in OnPlayerDialogResponse? Is it even possible?
Reply
#2

In the command you can do something like..

pawn Код:
SetPVarInt(targetid, "Duelerid", playerid);
Then you use it with GetPVarInt(playerid, "Duelerid") in OnDialogResponse.

Will probably complicate things when receiving multiple duel requests though, would recommend making an array to accept multiple incoming duel requests or just block all requests to a player if that player is being requested already.
Reply
#3

Quote:
Originally Posted by coole210
Посмотреть сообщение
In the command you can do something like..

pawn Код:
SetPVarInt(targetid, "Duelerid", playerid);
Then you use it with GetPVarInt(playerid, "Duelerid") in OnDialogResponse.

Will probably complicate things when receiving multiple duel requests though, would recommend making an array to accept multiple incoming duel requests or just block all requests to a player if that player is being requested already.
ok thnx a lot for replying, +rep'ed.
since only one duel request can be sent, it won't become complicated.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)