Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2017-06-08, 15:05


BH|LeFeS

DayZ is EPIC!






Wiek: 21
Na forum: 3508 dni
Posty: 82
Nick w MP: LeFeS

Piwa: 7

Respekt: 26,3

Mam taki, problem, bo chc? znale?? admin:rendering

a tylko znalaz?em go w c_utility.lua

czyli to jest gdzie ma si? to pokazywa?:

SS

- Prosz? o szybk? odp. bo Chc? zmieni? miejsce tego napisu na d?? ekranu :P

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-08, 15:09


Remix110

Pewna osóbka :3






Wiek: 40
Na forum: 3663 dni
Posty: 291
Nick w MP: GoodNight

Piwa: 15

Respekt: 51

Ale ze o co chodzi?

Podpis
pomogłem? :P Możesz dać piwko, przyda się na imprezę :D
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-08, 15:10


nanKy







Wiek: 22
Na forum: 3866 dni
Posty: 498
Nick w MP: nanky

Piwa: 1773

Respekt: 239
Respekt: 239Respekt: 239

"BH|LeFeS" napisał/a:

Mam taki, problem, bo chc? znale?? admin:rendering

a tylko znalaz?em go w c_utility.lua

czyli to jest gdzie ma si? to pokazywa?:

SS

- Prosz? o szybk? odp. bo Chc? zmieni? miejsce tego napisu na d?? ekranu :P

Nie korzystam z ogrpg lecz szukaj w folderze z systemem administracji i szukaj eventu "onClientRender" lub "onClientPreRender".

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-08, 16:13


Kalizman







Wiek: 23
Na forum: 3651 dni
Posty: 1394

Piwa: 4619

Respekt: 358,8
Respekt: 358,8Respekt: 358,8Respekt: 358,8Respekt: 358,8

Skrypt "warn" lub "dutyadmin" i pliki po kliencie - ostrze?enia
Skrypt "dutyadmin" > c_utility.lua > sam d?? kodu - pasek kar

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-06-08, 19:54


BH|LeFeS

DayZ is EPIC!






Wiek: 21
Na forum: 3508 dni
Posty: 82
Nick w MP: LeFeS

Piwa: 7

Respekt: 26,3

Przepraszam, B??d nadal jest!

@EDIT:

- Tylko Sciana Chatu przesuno?em, nie przesun?? si? nawet Pasek





[ Dodano: 2017-06-09, 13:54 ]
Kod:

local sw,sh = guiGetScreenSize()

function hidePlayerWarning()
playerWarning=false
end

addEventHandler("onClientRender", root, function()
if (playerWarning) then
dxDrawRectangle( 100,100,sw-200, sh-200, tocolor(255,0,0,100), true)
dxDrawText( "Otrzyma?e?(a?) ostrze?enie:", 100, 100, sw-100, sh/2-20, tocolor(255,255,255), 3.0, "default-bold", "center", "bottom", true, true,true)
dxDrawText( playerWarning, 100,sh/2+20, sw-100, sh-100, tocolor(0,0,0), 2.0, "default-bold", "center", "top", true, true,true )
dxDrawText("Nie stosowanie si? do ostrze?e?, mo?e skutkowa? kiciem lub banem!", 186/1280*sw, 558/720*sh, 1136/1280*sw, 588/720*sh, tocolor(255, 255, 255, 255), 2.00, "default-bold", "center", "top", false, false, true, false, false)
return
end
end)

addEvent("onPlayerWarningReceived", true)
addEventHandler("onPlayerWarningReceived", root, function(tresc)
if source==localPlayer then
playerWarning=tresc
setTimer(hidePlayerWarning, 7000, 1)
setTimer(playSoundFrontEnd, 300, 10, 5)
end
end)

for k,v in ipairs ( getElementsByType ( "object" ) ) do
if getElementData ( v, "sciana:raportow" ) then
scianaplaczu = v
end
if getElementData(v,"sciana:text") then
scianatekstu = v
end
end


function isEventHandlerAdded( sEventName, pElementAttachedTo, func )
if
type( sEventName ) == 'string' and
isElement( pElementAttachedTo ) and
type( func ) == 'function'
then
local aAttachedFunctions = getEventHandlers( sEventName, pElementAttachedTo )
if type( aAttachedFunctions ) == 'table' and #aAttachedFunctions > 0 then
for i, v in ipairs( aAttachedFunctions ) do
if v == func then
return true
end
end
end
end

return false
end


local xtext=nil
local gameView={"Logi Serwerowe:"}
local sx,sy=guiGetScreenSize()

function renderingInfo()
dxDrawRectangle(sx*(0)/1024, sy*(0)/768, sx*(1024)/1024, sy*(23)/768, tocolor(0, 0, 0, 155), false)
dxDrawText(xtext:gsub("#%x%x%x%x%x%x",""), sx*(258+1)/1024, sy*(0+1)/768, sx*(758+1)/1024, sy*(23+1)/768, tocolor(0, 0, 0, 255), 1.00, "default", "center", "center", false, true)
dxDrawText(xtext:gsub("#%x%x%x%x%x%x",""), sx*(258)/1024, sy*(0)/768, sx*(758)/1024, sy*(23)/768, tocolor(255, 0, 0, 255), 1.00, "default", "center", "center", false, true)
end

function raporcik()
if not getElementData(localPlayer,"player:admin") then return end
local tt={}
reportView=getElementData(scianaplaczu,"sciana:raportow")
for i,c in ipairs(reportView) do
if c[1] then table.insert(tt,c[1]) end
end
concat=table.concat(tt, "\n")
dxDrawText(concat, sx*(698+1)/1024, sy*(278+1)/768, sx*(1014+1)/1024, sy*(496+1)/768, tocolor(0, 0, 0, 255), 1.00, "default", "right", "top", false, true)
dxDrawText(concat, sx*(698)/1024, sy*(278)/768, sx*(1014)/1024, sy*(496)/768, tocolor(255, 255, 255, 255), 1.00, "default", "right", "top", false, true)
end
addEventHandler("onClientRender", root, raporcik)

addEvent("admin:addText", true)
addEventHandler("admin:addText", root, function(text)
table.insert(gameView, text)
if #gameView > 17 then
table.remove(gameView, 2)
end
end)
function raporcik2()
if not getElementData(localPlayer,"player:admin") then return end
local tt={}
reportView=getElementData(scianatekstu,"sciana:text")
for i,c in ipairs(reportView) do
if c[1] then table.insert(tt,c[1]) end
end
concat=table.concat(tt, "\n")
dxDrawText(concat, sx*(10+1)/1024, sy*(179+1)/768, sx*(326+1)/1024, sy*(497+1)/768, tocolor(0, 0, 0, 255), 1.00, "default", "left", "top", false, true)
dxDrawText(concat, sx*(10)/1024, sy*(179)/768, sx*(326)/1024, sy*(497)/768, white, 1.00, "default", "left", "top", false, true)
end
addEventHandler("onClientRender", root, raporcik2)

addEvent("admin:rendering", true)
addEventHandler("admin:rendering", root, function(text)
xtext=text
if isEventHandlerAdded("onClientRender",root,renderingInfo) then
removeEventHandler ( "onClientRender", root, renderingInfo)
end
addEventHandler("onClientRender", root, renderingInfo)
setTimer(function()
removeEventHandler("onClientRender", root, renderingInfo)
end, 8500, 1)
end)


To znajduje si? w: c_utility.lua!

Postaw piwo autorowi tego posta
 

 
Tagi: ostrzeżenia
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Ostrzeżenia Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

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
Dodaj temat do Ulubionych
Wersja do druku