Quote Originally Posted by HjugO View Post
Very helpful creatureevent script.
lua code:

function onLogin(player)
player:registerEvent("ModalWindow")

local window = ModalWindow(1000, "Where are you from?", "'Imma check your nationality!")

window:addButton(100, "Confirm.")
window:addButton(101, "Cancel.")

window:addChoice(1, "Canada.")
window:addChoice(2, "Not Canada.")

window:setDefaultEnterButton(100)
window:setDefaultEscapeButton(101)

window:sendToPlayer(player)
return true
end

function onModalWindow(player, modalWindowId, buttonId, choiceId)
player:unregisterEvent("ModalWindow")
if modalWindowId == 1000 then
if buttonId == 100 then
if choiceId == 1 then
Player(player):remove()
else
print("Congratulations, you can play.")
end
end
end
end
@Fatality
btw. I'm not looking for troubles, just respect each other.
LOL The fact that you actually spent time to write that is kinda laugh worthy. XD