Jump to content

Dealman

Members
  • Posts

    1,421
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Dealman

  1. You might wanna save the file first. Use xmlSaveFile. Also, you're not properly closing an if statement in example 1 and 3.
  2. I'm very curious as to how you simulate the aerodynamics, but other than that, great work!
  3. If there is no data available it will return false. false is a boolean value - obviously you can't do math with a boolean. Make sure there are no typos first of all, otherwise make sure it returns a valid value before trying to do math with it.
  4. DayZ used to have the same issue, people would sit inside the trader with god mode and kill people trying to get close. I wouldn't say that was fun
  5. Can people inside the zone kill people that are outside the zone? If yes, I'd suggest you add a setting for that.
  6. I think what he's trying to say he want to store the remainder towards the new level. Is every new level at 100? If yes, you can do this; if(getElementData(source, "EXP") and getElementData(source, "LVL")) then valuerEXP = 30 local currentXP = guiProgressBarGetProgress(XpBar) -- (80) -- Check if the result is greater than 100 if(currentXP+valuerEXP > 100) then local neededXP = 100-currentXP -- (100-80 = 20) local remainingXP = valuerXP-neededXP -- (30-20 = 10) guiProgressBarSetProgress(XpBar, remainingXP) guiProgressBarSetProgress(LevelBar, getElementData(source, "LVL")+1) -- Check if the result is less than 100 elseif(currentXP+valuerEXP < 100) then guiProgressBarSetProgress(XpBar, (currentXP+valuerEXP)) -- Check if the result is equal to 100 elseif(currentXP+valuerEXP == 100) then guiProgressBarSetProgress(XpBar, 0) guiProgressBarSetProgress(LevelBar, getElementData(source, "LVL")+1) end end Of course it depends on how your system works, and there are other ways to do it. Edit: Nvm you fixed it already
  7. Well you can try and change the "anim_loop_stop" flag, but I believe I tried this some time ago and it didn't quite seem to work.
  8. Neither of these are related to the rate of fire, but the animations. To adjust the rate of fire, you'll need to make a custom weapon using the functions I mentioned before.
  9. Try using these; createWeapon setWeaponFiringRate Then you'll have to sync it with the server so it replicated for all clients I would imagine.
  10. Oh derp, yeah that makes sense - that works just fine.
  11. Let's say I create a DX window with a text label using my DXGUI. I then decide to add a button, then I'd like to use your guieditor since it's easy to use and gives me a visual representation on the fly. So if I draw for example a rectangle somewhere, I can right-click it and move it around or resize it. However, as soon as I move it on top of one of my custom DX elements - if I try and right-click the rectangle, I won't get the option to manipulate the rectangle. But rather a window to load code from the element underneath the cursor. Edit: Recorded a short video to showcase what's going on.
  12. Store the messages in a table as pa3ck said. Then for example, only draw the last 5 entries to prevent it from cluttering the screen, use this to multiply the offset. To optimize it you can limit the table size, so whenever a new message is added - check the size of the table and if the table is at its limit(let's say 50) then remove the first entry. That way the table will remain at a size of 50 all the time. As for doing this server-side, you can, but the drawing has to happen client-side for obvious reasons. What you can do, however, is whenever onClientDebugMessage is executed, you send the information(message, level, file and line) to the server. This way, you can then transfer this information to another client and they will see it as well. @Necktrox was working on something similar I believe, which looked promising. You might want to check his resource out if it's released.
  13. @Remp could we have a setting to prevent the guieditor asking whether or not I want to load code from an element? I'm working on my own DXGUI library which uses elements, which makes it impossible to resize things if I have a custom element behind it.
  14. Dealman

    draw video

    Awesome! Will have to check it out later then, great job and thanks for the time and effort implementing this
  15. Dealman

    draw video

    Has CEF performance been improved any lately? I've been away for a while and only fiddled with the browser a bit shortly after release. As I recall it, trying to watch .gifs was unbearable, it stuttered a lot. I never did try video playback, though.
  16. Dealman

    Sneak

    That's a good point, yeah set it to server instead
  17. Dealman

    Sneak

    Change the script type to client instead of meta.
  18. Not sure, I've never used that module myself. Are you unable to make a resource for the 2nd server?
  19. That means you're trying to do some math on something that returns nil. For example nil+1 obviously wouldn't make sense. The error will tell you at what line this error occurred - use that to find what is returning nil and work from there.
  20. That's just an easy way of doing it, it's not very reliable as it may fail and return false for other reasons. To make sure it's reliable you'll want to make use of a callback function.
  21. Well yeah, how else would you communicate with it? The server won't magically know what it is you want it to do It returns true if the function was called, otherwise false. So if false, you can assume the server is offline?
  22. Still, thePlayer is not defined. Given that it is a client-sided script, try to replace thePlayer with localPlayer. Is that function server-sided?
  23. You should be able to do this fairly easily with callRemote. You can specify a resource and a function name to execute. Go wild with it
×
×
  • Create New...