Jump to content

1LoL1

Members
  • Posts

    944
  • Joined

  • Last visited

Everything posted by 1LoL1

  1. 1LoL1

    [HELP] Please...

    I used this but when I changed the name so I changed it .. local namenohex = string.gsub ( getPlayerName(getLocalPlayer()), '#%x%x%x%x%x%x', '' ) statsLabel["name"] = guiCreateLabel(0,0.85,1,0.15,"Name: "..namenohex ,true,statsWindows) guiLabelSetHorizontalAlign (statsLabel["name"],"center") guiSetFont (statsLabel["name"], "default-bold-small" ) setElementData(statsLabel["name"],"identifikation","name")
  2. 1LoL1

    [HELP] Please...

    Now it does not show up there at all :(I'll give the whole post?
  3. help anyone? I do not know why it does not work I tried to put those hexes away but it does not work then click on the player g_LocalPlayer = getLocalPlayer() g_Root = getRootElement() g_ThisResource = getThisResource() g_ResourceRoot = getResourceRootElement(getThisResource()) chat = {} -- table to store chat windows in newmsg = {show=false, tick=getTickCount(), showtime=5000, img=nil, lbl=nil } -- new msg table anims = {} function buildPlayerList() local x,y = guiGetScreenSize() local width,height = 175,350 x = x-width y = (y-height)/2 guiLabelSetColor(newmsg.lbl,0, 170, 255) guiLabelSetHorizontalAlign(newmsg.lbl, "right", true) guiSetAlpha(newmsg.img, 0) --guiSetAlpha(newmsg.lbl, 0) wndPlayers = guiCreateWindow(-1,256,222,343, "Private Message", false) fond = guiCreateStaticImage(0.0405,0.0525,0.9189,0.9213,"image/mtalogo.png",true,wndPlayers) grdPlayers = guiCreateGridList(0.0991,0.2449,0.8108,0.6968, true, wndPlayers) colPlayers = guiGridListAddColumn(grdPlayers, "Player List", 0.85) local players = getElementsByType("player") for k,v in ipairs(players) do addPlayerToList(v) end guiSetProperty(fond,"Disabled","true") guiWindowSetSizable(wndPlayers, false) guiSetProperty(wndPlayers, "RollUpEnabled", "true") guiSetProperty(wndPlayers, "Dragable", "true") guiSetAlpha(wndPlayers, 0) -- create animations for it anims.plfadein = Animation.create(wndPlayers, Animation.presets.guiFadeIn(1000)) anims.plfadeout = Animation.create(wndPlayers, Animation.presets.guiFadeOut(1000)) anims.nmfadein = Animation.create(newmsg.img, Animation.presets.guiFadeIn(1000)) anims.nmfadeout = Animation.create(newmsg.img, Animation.presets.guiFadeOut(1000)) anims.nmtextin = Animation.create(newmsg.lbl, Animation.presets.guiFadeIn(1000)) anims.nmtextout = Animation.create(newmsg.lbl, Animation.presets.guiFadeOut(1000)) --[[ local x,y = guiGetPosition(newmsg.img) outputDebugString("guigetPostions: " ..tostring(x).." "..tostring(y)) local scrx,scry = guiGetScreenSize() anims.nmslidein = Animation.create(newmsg.img, Animation.presets.guiMove(x,y))--, 1000,false, scrx,scry, false)) anims.nmslideout = Animation.create(newmsg.img, Animation.presets.guiMove(scrx,scry))--, 1000,false, x,y, false)) ]] bindKey("F3", "down", togglePmGui) end function addPlayerToList(ply) --outputDebugString("addPlayerToList:" ..getPlayerName(ply)):gsub("#%x%x%x%x%x%x","") local row = guiGridListAddRow(grdPlayers) local name = getPlayerName(ply):gsub("#%x%x%x%x%x%x","") guiGridListSetItemText(grdPlayers,row,colPlayers, name, false, false) end function removePlayerFromList(ply) --outputDebugString("removePlayerFromList:" ..getPlayerName(ply)):gsub("#%x%x%x%x%x%x","") local name=getPlayerName(ply):gsub("#%x%x%x%x%x%x","") for row=0,guiGridListGetRowCount(grdPlayers) do if guiGridListGetItemText(grdPlayers, row, colPlayers) == name then guiGridListRemoveRow(grdPlayers, row) outputDebugString("remove row" ..tostring(row)) end end end function showPmGui(state) if state == true then anims.plfadein:play() for k,v in pairs(chat) do guiSetVisible(chat[k].wnd,true) end showCursor(true) elseif state == false then anims.plfadeout:play() for k,v in pairs(chat) do guiSetVisible(chat[k].wnd,false) end showCursor(false) guiSetInputEnabled(false) end end function togglePmGui() if not anims.plfadein:isPlaying() and not anims.plfadeout:isPlaying() then if guiGetAlpha(wndPlayers) > .1 then showPmGui(false) else showPmGui(true) end end end function buildChatWindow(ply) local x,y = guiGetScreenSize() local width,height = 300,250 x = x*.5 y = y*.5 chat[ply] = {} chat[ply].wnd = guiCreateWindow(337,277,395,252, string.gsub(getPlayerName(ply):gsub("#%x%x%x%x%x%x","") , false) chat[ply].img = guiCreateStaticImage(0.0228,0.0754,0.9544,0.8889,"image/shruk.png",true,chat[ply].wnd) chat[ply].memo = guiCreateMemo(0.043,0.1746,0.9089,0.623, "", true, chat[ply].wnd) chat[ply].edit = guiCreateEdit(0.043,0.8214,0.7089,0.1111, "", true, chat[ply].wnd) chat[ply].btnX = guiCreateButton(0.9215,0.0754,0.0557,0.0794, "X", true, chat[ply].wnd) chat[ply].btnSend = guiCreateButton(0.757,0.8135,0.2127,0.1429, "Send", true, chat[ply].wnd) guiSetProperty(chat[ply].img,"Disabled","true") guiMemoSetReadOnly(chat[ply].memo, true) guiWindowSetSizable(chat[ply].wnd, false) guiSetProperty(chat[ply].wnd, "RollUpEnabled", "true") guiSetProperty(chat[ply].wnd, "Dragable", "true") if anims.plfadein:isPlaying() then-- in process of fading in guiSetVisible(chat[ply].wnd, true) elseif anims.plfadeout:isPlaying() then -- in process of fading out guiSetVisible(chat[ply].wnd, false) else -- not in process of either if guiGetAlpha(wndPlayers) > .1 then guiSetVisible(chat[ply].wnd, true) -- is showing else guiSetVisible(chat[ply].wnd, false) -- isnt showing end end end function destroyChatWindow(ply) if chat[ply] and isElement(chat[ply].wnd) then destroyElement(chat[ply].wnd) chat[ply] = nil end end function sendChatMessage(ply) --outputDebugString("sendChatMessage: " .. tostring(ply)) if chat[ply] and isElement(chat[ply].wnd) then local newText = guiGetText(chat[ply].edit) if newText and string.len(newText) > 0 then local oldText = guiGetText(chat[ply].memo) if not oldText then oldText = "" end oldText = oldText .. getPlayerName(g_LocalPlayer):gsub("#%x%x%x%x%x%x","") .. ": " .. newText .. "\n" guiSetText(chat[ply].memo, oldText) guiSetText(chat[ply].edit, "") guiMemoSetCaretIndex(chat[ply].memo, string.len(oldText)) triggerServerEvent("onGUIPrivateMessage", g_LocalPlayer, ply,newText) end end end function recieveChatMessage(ply, msg) --outputDebugString("recieveChatMessage: " .. msg) if not chat[ply] then buildChatWindow(ply) end newmsg.show = true newmsg.tick = getTickCount() ---guiSetText(newmsg.lbl, getPlayerName(ply) .. ": " .. msg .. "\n") guiSetText(newmsg.lbl, " Message from " .. getPlayerName(ply) .. "\n") outputChatBox("[!] You have a new message #009BFF(Press F2).",255,40,0,true) local sound = playSound("GatkResalh~.mp3",false) setSoundVolume(sound, 0.2) anims.nmfadein:play() anims.nmtextin:play() --anims.nmslidein:play() local oldText = guiGetText(chat[ply].memo) if not oldText then oldText = "" end oldText = oldText .. getPlayerName(ply):gsub("#%x%x%x%x%x%x","") .. ": " .. msg .. "\n" guiSetText(chat[ply].memo, oldText) guiMemoSetCaretIndex(chat[ply].memo, string.len(oldText)) end event_resource_start = function(res) buildPlayerList() end event_resource_stop = function(res) unbindKey("F2", "down", togglePmGui) showPmGui(false) end event_player_join = function() --outputDebugString("onClientPlayerJoin") addPlayerToList(source) end event_player_quit = function() --outputDebugString("onClientPlayerQuit") removePlayerFromList(source) destroyChatWindow(source) end event_gui_click = function(button, state, absx, absy) if button == "left" and state == "up" then if getElementType(source) == "gui-button" then local parent = getElementParent(source) if parent ~= false then local ply = getPlayerFromName(guiGetText(parent)) if ply then if source == chat[ply].btnX then destroyChatWindow(ply) guiSetInputEnabled(false) elseif source == chat[ply].btnSend then sendChatMessage(ply) guiSetInputEnabled(false) end end end elseif getElementType(source) == "gui-edit" then local parent = getElementParent(source) if parent ~= false then local ply = getPlayerFromName(guiGetText(parent)) if source == chat[ply].edit then guiSetInputEnabled(true) end end else guiSetInputEnabled(false) end end end event_gui_doubleclick = function(button, state, absx, absy) if button == "left" and state == "up" then if source == grdPlayers then local row, col = guiGridListGetSelectedItem(grdPlayers) --outputDebugString("double clicked row: "..tostring(row)) if row == -1 or col == -1 then return end local name = guiGridListGetItemText(grdPlayers, row, col) local ply = getPlayerFromName(name) if not chat[ply] then buildChatWindow(ply) end guiBringToFront(chat[ply].wnd) end end end event_gui_accepted = function(element) local parent = getElementParent(source) if parent ~= false then
  4. 1LoL1

    [HELP] Please...

    But however it is again differently ... and it does not work ..
  5. 1LoL1

    [HELP] Please...

    Yet how many times do I have to write that this is what I have tried everything possible that if you put the entire post so it can go ..
  6. 1LoL1

    [HELP] Please...

    I tried it but somehow it does not .. :gsub("#% x% x% x% x% x% x", "") string.gsub(getPlayerName(getLocalPlayer()), "#% x% x% x% x% x% x "," ")
  7. Hey, how do I put these hexes away? I tried it 4 hours and did not know anyone advise? --Name statsLabel["name"] = guiCreateLabel(0,0.85,1,0.15,"Name: "..getPlayerName(getLocalPlayer()) ,true,statsWindows) guiLabelSetHorizontalAlign (statsLabel["name"],"center") guiSetFont (statsLabel["name"], "default-bold-small" ) setElementData(statsLabel["name"],"identifikation","name") guiSetText(statsLabel["name"],"Name: "..getPlayerName(getLocalPlayer()))
  8. 1LoL1

    [HELP] Question

    So like I do this? It's mta dayz. LuaQ @inventory.lua ź @ JŔ Š €Ę Á A â@ AA "A J Á bA Š ÁÁ ˘A Ę A âA AB "B J ‚ Á bB ˘@€I€ Š Ę AA â@ A A "A J Á ÁA bA Š Á ˘A Ę B AB âA A‚  "B J ÁB bB Š ÁB C ˘B Ę AC âB AĂ C "C ˘@ I€€…Š Ę A AÁ â@ A Á "A J Á ÁÁ bA Š Á  ˘A ˘@ I€ Ś @€€J Š Á€ Á ˘@ Ę AÁ â@ AA Á "A J ÁÁ bA Š Á  ˘A Ę B A‚ âA A ‚ "B J ÁB bB Š Á‚ C ˘B Ę Ă AC âB A C "C J ÁC bC b@ @€ŽJ Š Á Á ˘@ Ę A AÁ â@ A Á "A J Á ÁÁ bA Š Á  ˘A Ę B A âA A‚  "B J  Á bB b@ @€—J €Š Á@ A ˘@ Ę € AÁ Á â@€€A Á ÁA "A€J ÁA bA Š ÁÁ B ˘A Ę€ AB B âA€€A‚  ÁB "B€J€Â Á C bB€Š€Á Ă AC ˘B€Ę€C AĂ C âB€€A Ă ÁĂ "C€J ÁĂ bC Š ÁC D ˘C Ę „ AÄ âC €A ÁD "D€
  9. How does this https://github.com/sztupy/luadec51/wiki ? do not understand at all how do I do
  10. 1LoL1

    [HELP] Please

    It is not .. but it was written so that even AdminChat: text. I tried everything but nothing .. and that's seen players .. what I write admins
  11. 1LoL1

    [HELP] Please

    Hi, I would need help .. this can be done Admin Chat so that I can write only admins and players are not? please help. -- Client bindKey("x", "down", "chatbox", "global") -- server function globalMessage ( thePlayer, cmd, ... ) if isPlayerMuted ( thePlayer ) then outputChatBox ( "You are muted!", thePlayer, 255, 0, 0 ) return end local message = table.concat ( { ... }, " " ) local name = getPlayerName ( thePlayer ) outputChatBox ( "#00FF00global chat: #FFFFFF".. name ..": #FFFF00".. message, getRootElement(), 255, 255, 255, true ) end addCommandHandler ( "global", globalMessage )
  12. It does not work at all ..
  13. I have this question and I found the mode for DayZ "Lie Prone shot down" this means that when you lie down on the floor where I can shoot but to me it does not work .. do not know why?
  14. I was up there at the head confuses me .. that's the Kicks ..
  15. It does not work it does not kick at all .. :(or not write anything .. help anyone? function checkPing(thePlayer) ping = getPlayerPing(thePlayer) if ( ping > 200 ) then kickPlayer (thePlayer ,Too high Ping) outputChatBox (getPlayerName(thePlayer).."was kicked for hight ping!",255,255,0 ) end addEventHandler ("OnResourceStart")
  16. Please help me search it has less than one day
  17. I searched everywhere but I found .. except for those that can not read ..
  18. Hello, I would need help .. and in DayZ not know where I find speed zombies in the folder "Slothbot" and it is only in DayZ? and give away as a hex color in the Debug Monitor goes to do buddy did it for 5 minutes .. I found only this: shownText["name"] = "Name" shownText["murders"] = "Murders" shownText["zombieskilled"] = "Zombies killed:" shownText["alivetime"] = "Alivetime" shownText["headshots"] = "Headshots" shownText["blood"] = "Blood" shownText["temperature"] = "Temperature" shownText["humanity"] = "Humanity" shownText["banditskilled"] = "Bandits killed:" shownText["players"] = "Players:"
  19. Looking for Scripter which I had a couple of scripts. I am willing to give 30 Euro. If someone finds a way to leave let skype
  20. 1LoL1

    Infernus skin

    function onResourceStart() end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), onResourceStart) txd = engineLoadTXD ( "infernus.txd",411 ) engineImportTXD ( txd, 411 ) dff = engineLoadDFF ( "infernus.dff", 411) engineReplaceModel ( dff, 411 )
  21. 1LoL1

    [HELP] Bans

    So at least there poradte what should I supplement? Terribly need it .. if ( aBans["IP"][ip] ) then guiSetText ( aBanIP, "IP: "..ip ) guiSetText ( aBanNick, "Nickname: "..iif ( aBans["IP"][ip]["nick"], aBans["IP"][ip]["nick"], "Unknown" ) ) guiSetText ( aBanDate, "Date: "..iif ( aBans["IP"][ip]["date"], aBans["IP"][ip]["date"], "Unknown" ) ) guiSetText ( aBanTime, "Time: "..iif ( aBans["IP"][ip]["time"], aBans["IP"][ip]["time"], "Unknown" ) ) guiSetText ( aBanBanner, "Banned by: "..iif ( aBans["IP"][ip]["banner"], aBans["IP"][ip]["banner"], "Unknown" ) ) if ( aBanReason ) then destroyElement ( aBanReason ) end aBanReason = guiCreateLabel ( 0.03, 0.60, 0.80, 0.30, "Reason: "..iif ( aBans["IP"][ip]["reason"], aBans["IP"][ip]["reason"], "Unknown" ), true, aBanForm ) guiLabelSetHorizontalAlign ( aBanReason, "left", true ) guiSetVisible ( aBanForm, true ) guiBringToFront ( aBanForm ) elseif ( aBans["Serial"][ip] ) then guiSetText ( aBanIP, "Serial: "..ip ) guiSetText ( aBanNick, "Nickname: "..iif ( aBans["Serial"][ip]["nick"], aBans["Serial"][ip]["nick"], "Unknown" ) ) guiSetText ( aBanDate, "Date: "..iif ( aBans["Serial"][ip]["date"], aBans["Serial"][ip]["date"], "Unknown" ) ) guiSetText ( aBanTime, "Time: "..iif ( aBans["Serial"][ip]["time"], aBans["Serial"][ip]["time"], "Unknown" ) ) guiSetText ( aBanBanner, "Banned by: "..iif ( aBans["Serial"][ip]["banner"], aBans["Serial"][ip]["banner"], "Unknown" ) ) if ( aBanReason ) then destroyElement ( aBanReason ) end aBanReason = guiCreateLabel ( 0.03, 0.60, 0.80, 0.30, "Reason: "..iif ( aBans["Serial"][ip]["reason"], aBans["Serial"][ip]["reason"], "Unknown" ), true, aBanForm ) guiLabelSetHorizontalAlign ( aBanReason, "left", true ) guiSetVisible ( aBanForm, true ) guiBringToFront ( aBanForm )
  22. So please help me anyone? I know this is an old topic but I need it ..
×
×
  • Create New...