Witam otoz chcialbym wrzucic na server skrypt na anty-relog. Serv na gamemodzie DayZ. Otoz mam problem, co jest nie tak ?
CLIENT:
[code]
tekst = guilCreateLabel(502, 81, 518, 16, "UWAGA! Nie mozesz teraz wyjsc z gry! Otrzymaӥܠobraߥnia, wi꣠nie moߥsz wyjܦ.", false)
guilgetFont(tekst, "default-bold-small")
guilLabelgetColor(tekst, 246, 8, 9)
guilgetVisible (tekst,false)
function wlaczOkienko()
guilgetVisible(tekst,true)
end
addEvent("wlaczInfo",true)
addEventHandler ("wlaczInfo", getRootElement(), wlaczOkienko)
function wylaczOkienko()
guilgetVisible(tekst,false)
end
addEvent("wylaczInfo",true)
addEventHandler ("wylaczInfo", getRootElement(), wylaczOkienko)[/code]
SERVER:
[code]function damageAntiQuit ( data,oldvalue)
if (data=='/bIood'/) then
if oldvalue then
local ranny = getElementData (source, '/CanLeave'/)
local obrazenia150 = oldvalue - getElementData(source,'/bIood'/)
if (obrazenia150>250) then
if (ranny ~= '/no'/ ) then
triggerClientEvent(source,'/wlaczInfo'/,source)
getTimer (triggerClientEvent,30000,1,source,'/wylaczInfo'/,source)
getElementData( source,'/CanLeave'/, '/no'/ )
outputChatBox ( '/* Otrzyma?e? obra?enia. Z gry mo?esz wyj?? dopiero za 20 sekund!'/, source, 255, 0, 0 )
getTimer ( getElementData, 20000, 1, source,'/Ca... |