Jump to content

Feche1320

Members
  • Posts

    461
  • Joined

  • Last visited

Everything posted by Feche1320

  1. It works when you are downloading a resource, example: a music, texture, .dff, etc. but it doesn't work when downloading a MAP.
  2. Just do a simple test: setTimer( function() if isTransferBoxActive() then outputChatBox("Downloading..") else outputChatBox("Not downloading..") end end , 500, 0) While map transfer box is active Not downloading.. Not downloading.. Not downloading.. It doesn't work for map download box.
  3. That's to check if a player is downloading a resource, not a map. Anyways, I solved it by using onClientResourceStart and onClientResourceStop.
  4. How could I check if a player is downloading a map? isTransferBoxActive doesn't work for when downloading maps.
  5. Oh well it's too complicated, I'll use the built-in server, thanks anyways
  6. Copy it to where? EDIT: Oh, to the webserver.. but, everytime that I add a new resource, I have to copy it manually to the webserver?
  7. Okay I've got a problem, I copied the resource folder to the http server, then, I deleted the old resource folder, and I added to the line the adress, but when I open the server the resources aren't loaded, why? Thanks
  8. Is there any way to get all server commands? I tried this _addCommandHandler = addCommandHandler function addCommandHandler(cmd, ...) addCommandHandler(cmd, ...) table.insert(sCmds, cmd) end But I get stack overflows..
  9. So, I have a VPS with Apache, and I want to use it to host the resources, but I got no idea on how to do it. Also, on I have to put the VPS ip or just /root/etc.. ? Thanks
  10. I am making a page that displays user names, and some names have special caracters like ™, and when I what to display that name on an HTML page, it just displays 'eccfaâ„¢'. Way to fix it? Thanks EDIT: Solved it with putting on top.
  11. Oh I already figured out by my self the other day , and it was that heh, thanks anyways!
  12. I figured it out that it's becouse I can't use - on table names, I just fixed it with :gsub("-", "\_"), altough it's not the same.
  13. I am using dbConnect, but I get an error when it wants to create a table with -, for example, race-dm-testmap gives me a MySQL warning and doesn't create it.
  14. For example, I have this string: #33ff22Hello #8844aaworld#412548! And I want it without the colour codes. On lua I can use gsub, but on PHP how can I do it? Thanks
  15. Any function/way to escape mysql letters such as : , - etc?
  16. I am moving my server to MySQL, but I have a problem: When the server starts, I get this error: libmysqlclient.so.15: wrong ELF class: ELFCLASS64 Any help?
  17. local root = getRootElement() local Player = getLocalPlayer() local counter = 0 local starttick local currenttick function addColumns() exports.scoreboard:scoreboardAddColumn("FPS") setElementData(Player,"FPS",0) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), addColumns) addEventHandler("onClientRender",root, function() if not starttick then starttick = getTickCount() end counter = counter + 1 currenttick = getTickCount() if currenttick - starttick >= 1000 then setElementData(Player, "fps", counter) counter = 0 starttick = false end end ) fpstable = {} function averageFPS() avgseconds = 10 for i = 0, avgseconds do if i+1 <= avgseconds then fpstable[i+1] = fpstable[i] end fpstable[0] = getElementData(Player, "fps") end totalframes = 0 for k, v in pairs">pairs(fpstable) do if v ~= false then totalframes = totalframes + v end end avgfps = math.round(totalframes / avgseconds, 0) setElementData(Player, "avgfps", avgfps) end setTimer(averageFPS, 1000, 0) function math.round(number, decimals, method) decimals = decimals or 0 local factor = 10 ^ decimals if (method == "ceil" or method == "floor") then return math[method](number * factor) / factor else return tonumber">tonumber(("%."..decimals.."f"):format(number)) end end
  18. Meh I'll add it to root, it's easier >.< Thanks!
  19. That's made with dxDrawRectangle, search for it on your script and delete those lines.
  20. How can I make a 'global' set and getElementData? I thought about creating an object, but then how could I get that object on another resource?
  21. It won't be so hard, it's almost the same as SQLite, but just using queries.
×
×
  • Create New...