Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Addlibs last won the day on February 10 2020

Addlibs had the most liked content!

Community Reputation

150 Celebrity


About Addlibs

  • Rank


  • Location
    United Kingdom
  • Occupation
    Scripting Guru

Recent Profile Visitors

3,766 profile views
  1. Either that or Installing and Configuring Nginx as an External Web Server should be helpful. The built-in HTTP server in MTA that takes care of downloading is a very simple server, and can't do things like transmission compression. Nginx or Squid (maybe? I haven't ever used it so I'm not entirely sure) should be able to compress the transmission and thus make it faster and use less bandwidth.
  2. -- (server side) function onPlayerCommandHandler(cmd) local playername = getPlayerName(source) outputChatBox(playername .. " entered command " .. cmd, root, 255, 0, 0) end addEventHandler("onPlayerCommand", root, onPlayerCommandHandler) source is the element of the player that entered the command, you can get the name using getPlayerName; the first parameter passed to the handler function is the command string that was entered.
  3. First of all, this is wrong syntax: addEventHandler("onPlayerQuit",getRootElement(),"Kicked",function() but more importantly, why not just dbExec(sql,"DELETE FROM characters WHERE id=?",accid) within ckPlayer(player, cmd, ...) right after kickPlayer(player, "CK: " ..info..".")?
  4. This is not a requests section. We can help you script it yourself but you must put in the effort. You should also tell us what exactly do you need help with, not just name something.
  5. You should do the element data check on the server's code, as onClientElementStreamIn is triggered for all clients. This means that if we have a player A who is on call (i.e. has the "call" element data set to true), and player B nearby but out of streaming range, and he gets nearer into the streaming range, the event is called on both player A and player B's clients, and normally both would contact the server to update their broadcast list. Player A's event handler was cut short by the if on call return end line, however, player B does not have this cancelling effect and thus updates their br
  6. Pretty sure the error message you gave is preceded by a dxCreateRenderTarget error. How is Map.new() called? Perhaps invalid W and H values are passed?
  7. Addlibs


    What do you mean by absence of it? What is kind of information stored in such string? Is it a number? If so, you can theNumber = tonumber(theString) to turn it from a string to a number If it's a boolean, you can do a sort-of tertiary operation theBool = theString == "true" which treats a string that equals to "true" as a true value and all other strings as a false value. If it's a JSON string object, you can fromJSON to turn in into a Lua table.
  8. Without telling us which script you're using we're unlikely to be of any help. Could you link the community resource link or wherever you got it from?
  9. aim_weapon and jump held together with fists or a melee weapon equipped determine whether a player/ped is blocking. The player/ped also needs to be on ground and not gliding or falling. You could disable the jump control while aim_weapon is pressed to prevent players from blocking.
  10. For that structure you need to slightly modify your table - first, to loop through each group, and secondly, to prevent duplicate entries (I believe the freeroam skins XML can have the same skin under different groups) local tabla = {} function XmlToTable() local added = {} -- table to keep track of which skins were added to prevent duplicates local xml = xmlLoadFile("skins.xml") -- load the xml local groups = xmlNodeGetChildren(xml) -- the the xml root's children nodes if groups then for i, group in ipairs(groups) do -- loop the xml root's children nodes local skins = x
  11. Nothing seems immediately wrong about this code (except the unnecessary use of xmlFindChild before xmlNodeGetChildren on the same xml node element). However, if this is client-side code, it's possible that the skins.xml file either isn't downloaded at all, or isn't ready to be read at the time the script begins execution (i.e. still downloading). To fix this, you should move the code that reads the XML into a function that's triggered upon the event onClientResourceStart. That is, if this is client-side code. Additionally, make sure that <file src="skins.xml" /> is in meta.xml otherwise
  12. rt = dxCreateRenderTarget(200, 400, true) --draw dxSetRenderTarget(renderImage,true) Did you mean rt instead of renderImage in dxSetRenderTarget? Edit: Nevermind, I see dxSetRenderTarget(rt,true) in a different place.
  13. Are these port forwarding rules enabled or just listed? Some routers allow you to add rules without having them enabled, so you can toggle them without having to delete and (re)create them every time.
  14. What do you mean by "line chart compatible to [with] mysql"? Charts have nothing in common with database servers (except perhaps ERDs). I'm going to assume you mean you have a database with a records of historical prices and you want to display them in a line chart, right? If so, what you want to do is query that database, retrieve the historical data -- it's date (X axis value) and the price (Y axis value) and plot these into a chart, then connect those plot points with dxDrawLine.
  15. Does this happen to all clients or just you? If just you, have you tried rebooting your device? "CRC could not open file: No such file or directory" suggests to me your OS is having trouble locating and/or opening the file. Perhaps it's a non-persistent issue that can be fixed with a reboot. Try rebooting the device the server's running on too if possible. Have you tired to see if the file downloads correctly into your client's downloads folder? (.../resources/factions/myriadproregular.ttf). Is it corrupted? Is it fine on the server too?
  • Create New...