• Content count

  • Joined

  • Last visited

Community Reputation

5 Neutral

About NeverUnbeatable

  • Rank
  1. [Help] table index nil

    I'm not sure if this line makes sense: if (tonumber(getPlayersInDimension(860)) >= 1) then It supposed to be if (tonumber(getPlayersInDimension(plr)) >= 1) then If I'm not wrong. Write number of line where error appears.
  2. dayz type inventory

    I suppose you should give us any explanations of issues you've faced.
  3. [Help] Why can i open the FR GUI in jail?

    Add this check in function which opens freeroam menu: if getElementData(playerElement, "jailed") then outputChatBox("* You can't use freeroam menu in jail!", playerElement, 255, 0, 0, false) return end * change playerElement variable to one which is in function.
  4. Remaining Time

    Post your code
  5. CJ Clothes > Objects?

    Find ids of those objects, then create them and attach to player element or use resource boneattach.
  6. Taking Tutorial Requests/Suggestions

    There's awesome default resource that provides this feature from singleplayer.
  7. Problem in my admin panel !

    I think, you should get original acl.xml file and admin resource, then edit acl as you want. This would take less time.
  8. loadstring

    I will try to explain how it works. Every function has it's own environment containing variables to which function has access. But as you're using loadstring it returns function that could be called by func() or pcall(func) and this function's environment would be set to global state(_G) by default. Because of that, if you're loading scripts from maps made by people, they will be able to call any function or trigger any event, finally, ruin your server. Function environment won't let do that, because you can manage what functions can script use. For instance, local code = "a = 6 outputChatBox(a)" local loadedCode = loadstring(code) -- returns function. loadedCode() will also work to call this code local newEnv = {outputChatBox = outputChatBox} -- we put function to use it in code setfenv(loadedCode, newEnv) -- now this code is safe and can't access _G local executedCode = pcall(loadedCode) if executedCode then outputDebugString("Code loaded!", 3) end About perfomancebrowser, run ipb resource and use /ipb to open ingame browser. Also useful posts by Arezu: Hope, I helped a bit.
  9. loadstring

    It works for me if I load script again and again, current Lua memory will change . function loadScript(stringCode) local code = loadstring(stringCode) setfenv(0, newENV) local executeCode = pcall(code) if executeCode then outputChatBox("Code has been loaded.") end
  10. Setspawn code for teams

    You're welcome.
  11. Setspawn code for teams

    This code is actually terrible because it gets player's account and set it's data every iteration but anyway code is fixed, I think.
  12. Setspawn code for teams

    function teamspawnset ( player, cmd ) local x, y, z = getElementPosition( player ) local dim = getElementDimension( player ) local int = getElementInterior( player ) local gang = getPlayerTeam(player) local teamName = getTeamName ( gang ) for _, plr in pairs(getPlayersInTeam(gang)) do local account = getPlayerAccount(plr) if acc then setAccountData(account, "X", x) setAccountData(account, "Y", y) setAccountData(account, "Z", z) setAccountData(account, "dim", dim) setAccountData(account, "int", int) -- spawnPlayer(plr, x, y, z) UNCOMMENT THIS TO SPAWN EVERY PLAYER ON NEW COORDS end end outputChatBox ( "Succes!", source, 0, 255, 0, true ) end addCommandHandler ("setspawn", teamspawnset) function spawnTeammates(p) local acc = getPlayerAccount(p) if acc then local x, y, z = getAccountData(acc, "X"), getAccountData(acc, "Y"), getAccountData(acc, "Z") spawnPlayer(p, x, y, z) end end addEventHandler ( "onPlayerWasted", root, function() setTimer(spawnTeammates, 5000, 1, source) end) Try this code. Didn't test it.
  13. water level problem ! help pls !!

    It's resource from community. I don't really think this script is too hard for scripters and they didn't put much effort creating it. So don't be too right and try to help him or just don't answer.
  14. Make Gui same on all Resolutions

    I use this method: local X,Y = guiGetScreenSize() local xReal = X/your screen X local yReal = Y/your screen Y -- example: local X,Y = guiGetScreenSize() local xReal = X/1366 -- my screen's X local yReal = Y/768 -- my screen's Y dxDrawText("text", xReal*683, yReal*384....) -- it will draw a text in the middle of your screen
  15. Which string function?

    Thank you!