polaczkos, else if ? daj elseif a nie else if po stronie serwera, nie dziwi? si? ?e nie dzia?a. Powiniene? mie? errory w debugu /debugscript 3 ale jak podmienisz, to powinno dzia?a?.
dzia? lecz wyskakuje puste okienko a powino sie pokazduwa? komu od kogo i za co i na ile
serwer
addCommandHandler ( "zbanuj", function ( plr, cmd, gracz, czas, rodzaj, cel, ... )
local login = getAccountName ( getPlayerAccount ( plr ) )
if sprawdzRoota(login) or sprawdzAdmina(login) or sprawdzModeratora(login) then
if cel then
player = getPlayerFromName(gracz)
if not player then return end
tresc = table.concat ( {...}, " " )
local nick = getPlayerName(plr)
local cel = getPlayerName(gracz)
local co = " zosta? zbanowany/a "
triggerClientEvent("info",resourceRoot,root,nickcel,nick,co,tresc)
if rodzaj == "m" then
rodzaj = "minut"
czas1 = czas * 60
elseif rodzaj == "d" then
rodzaj = "dni"
czas1 = czas * 360
elseif rodzaj == "h" then
rodzaj = "godzin"
czas1 = czas * 60 * 60
end
end
end
-- outputChatBox ( "Czas: "..czas.." "..rodzaj.."", root )
banPlayer ( player, true, true, true, plr, tresc, czas1 )
end)
client
addEvent("info",true)
addEventHandler("info",resourceRoot,function(plr,cel,nick,co,tresc)
if wyswietlainfo == true then return end
function info()
dxDrawRectangle(screenW * 0.3675, screenH * 0.0000, screenW * 0.2650, screenH * 0.0956, tocolor(0, 0, 0, 83), false)
dxDrawText( cel.." "..co.." "..nick..". \nPow?d: "..tresc, screenW * 0.3675, screenH * 0.0000, screenW * 0.6325, screenH * 0.0956, tocolor(255, 0, 0, 255), 1.00, "default", "center", "center", false, true, false, false, false)
end
wyswietlainfo = true
addEventHandler("onClientRender",root,info)
setTimer(function()
removeEventHandler("onClientRender",root,info)
wyswietlainfo = false
end,5000,1)
end)
addEvent("infoczas",true)
addEventHandler("infoczas",resourceRoot,function(plr,cel,nick,co,tresc,czas)
if wyswietla == true then return end
if czas == "na zawsze" then
czas = "zawsze"
czasname = ""
else
czas = tonumber(czas)
if czas < 60 then
czasname = " sekund"
elseif czas >= 60 and czas <= 3599 then
czas = math.round(czas/60)
czasname = " minut"
elseif czas >= 3600 and czas <= 86399 then
czas = math.round(czas/3600)
czasname = " godzin"
elseif czas >= 86400 then
czas = math.round(czas/86400)
czasname = " dni"
end
end
function info()
dxDrawRectangle(screenW * 0.3675, screenH * 0.0000, screenW * 0.2650, screenH * 0.0956, tocolor(0, 0, 0, 83), false)
dxDrawText(cel.." "..co.." "..nick.." na "..czas..""..czasname..". \nPow?d: "..tresc, screenW * 0.3675, screenH * 0.0000, screenW * 0.6325, screenH * 0.0956, tocolor(255, 0, 0, 255), 1.00, "default", "center", "center", false, true, false, false, false)
end
wyswietlainfo = true
addEventHandler("onClientRender",root,info)
setTimer(function()
removeEventHandler("onClientRender",root,info)
wyswietlainfo = false
end,5000,1)
end
Nie możesz pisać nowych tematów Nie możesz odpowiadać w tematach Nie możesz zmieniać swoich postów Nie możesz usuwać swoich postów Nie możesz głosować w ankietach