Witam, mam problem ot?? za nic nie potrafi? po??czy? skryptu na notyfikacje z tym kodem:
[code]addCommandHandler("noti", function(plr,cmd,tyr,...)
if getAdmin(plr,3) then
if not ... or not tyr then triggerClientEvent(plr,"showBox",root,"Wpisz /noti [error/success/warning/info] (tekst) ","error") return end
local text=table.concat({...}, " ")
for _, p in pairs(getElementsByType('player')) do
triggerClientEvent(p,"showBox",root,text,tyr)
end
end
end)
[/code]
function showBox(value, str)
-- value 1 - Info
-- value 2 - Error
-- value 3 - warning
--if box == false then
if str and type(str) == "string" and string.len(str) > 0 then
box = true
if value == "info" then
showTipBox (str,"img/info.png")
outputConsole ("[INFO]" .. str)
elseif value == "error" then
showTipBox (str,"img/error.png")
outputConsole ("[ERROR]" .. str)
elseif value == "warning" then
showTipBox (str,"img/warning.png")
outputConsole ("[WARNING]" .. str)
end
end
--else
-- return false
--end
end
addEvent("CreateBox", true)
addEventHandler("CreateBox", getRootElemen...