eduardbean
Member
- Joined
- Nov 26, 2010
- Messages
- 129
- Solutions
- 2
- Reaction score
- 15
Hello, I'm trying to use the modal window function...
CreatureScripts
CreatureScripts
Code:
[/CENTER]
function onModalWindow(cid, modalWindowId, buttonId, choiceId)
if modalWindowId == 1 then
print("You've selected the choice #" .. choiceId)
end
end
Code:
<event type="modalwindow" name="ModalWindow" script="modal.lua"/>
onLogin
Talkactions
Code:
player:registerEvent("ModalWindow")
Talkactions
Code:
[/CENTER]
function onSay(cid, words, param)
local player = Player(cid)
local modal = ModalWindow.new(1, "Modal Title", "Make your choice:")
modal.addChoice(1, "I want to live")
modal.addChoice(2, "Pft, I don't give a f*ck")
modal.addChoice(3, "Please... NO!")
modal.addChoice(4, "Be my guest.")
modal:sendToPlayer(player)
return false
end
But not works, no erros, nothing... What is worng ?