function onEnter()
setElementData(source,"zalogowany",0)
end
addEventHandler("onPlayerJoin", root, onEnter)
function onLogin()
setElementData(source,"zalogowany",1)
end
addEventHandler("onPlayerLogin", root, onLogin)
function onChat()
if getElementData(source,"zalogowany") == 0 then
cancelEvent()
outputChatBox("Nie jeste? zalogowany.",255,0,0, getRootElement())
outputChatBox("Aby u?ywa? chatu musisz si? zalogowa? i przeczyta? regulamin dost?pny pod F9",255,0,0, getRootElement())
else
end
end
addEventHandler("onPlayerChat", root, onChat)