Jump to content

Addlibs

Members
  • Posts

    1,060
  • Joined

  • Last visited

  • Days Won

    9

Everything posted by Addlibs

  1. It means that one of the values in the table is not a valid concat type (in your case, it includes a boolean). Possible solution: Loop through the table and change all values to tostring() of their original values
  2. Only way to remove the window is setPedDoingGangDriveby, when the ped goes out through the window, it automatically gets removed by GTASA. However, I'm pretty sure it is possible to make the window invisible through the use of shaders.
  3. Main difference is that a x64 server can allocate a lot more RAM to run itself, as far as I know
  4. Just set an indefinite timer that will execute the command statement over and over again (until the timer is killed)
  5. The head has 2 bones. You can play around and make a calculation to find one's rotational offset (preferably the higher bone)
  6. Addlibs

    script

    You can't edit, but you can create an additional script which modifies how the former one acts.
  7. Addlibs

    script

    Create a LUA file, paste either code found below (change the blacklisted word as appropriate in variant 2), insert the reference of this script in the meta.xml BEFORE the main script. Variant 1: Block the use of outputChatBox completely local _outputChatBox = outputChatBox function outputChatBox () return true end Variant 2: Block the use of outputChatBox is a specific word (default “visit”) is included in the message local _outputChatBox = outputChatBox function outputChatBox (message, ...) local advertisement = message:lower():find("visit", 1, true) -- pass the text to lowercase and checking whether it contains any desired word return advertisement or _outputChatBox(message, ...) -- returns 'true' only in case previous statement returns so, or either outputs a message (because advertisement will then be equal to false) end (Both codes by novo)
  8. Erm... using PHP? He already mentioned that.
  9. This gives the weapon ID (integer), not the weapon element. Ped/Player weapons are not elements within MTA, so you cannot get their element userdata. The function you mentioned is for use with createWeapon weapons
  10. I have not changed the lines nearby isPedInVehicle, dude - That was his own code so don't accuse me.
  11. Edit: Oh, a response is already there, oh well - I'll leave my response just for the record. Original message: DestinationMarker isn't defined at that point in the script - it is defined during a function which is run at a later point. At this stage I would also like to point out that DestinationMarker is defined locally within the function - that means it won't be defined outside, thus no other function will be able to confirm that this marker was hit, and not a different one. You should make that a global variable (or local for the file, by changing it into a normal global variable, but adding local DestinationMarker at the beginning of the file). Try setting the attach to resourceRoot (everything that belongs to this resource) and then in that function which handles the event, make a check to see what was hit. addEventHandler("onMarkerHit", resourceRoot, function(vehicle) if not isPedInVehicle(source) then return false end if not vehicle == van then return false end if not source == DestinationMarker then --Make sure that the DestinationMarker was hit, not anything else return false end
  12. I think you should reconsider what you wrote on Line 8 of the client code addEventHandler ( "MachineGun2", root, function ( createM4Weapon ) Didn't you mean addEventHandler ( "MachineGun2", root, createM4Weapon ) — You also need to put it AFTER the createM4Weapon function, not before And what is that only line 2 and 3?
  13. arenaObjects = {} function loadMapIntoArena(mapresourcename, mapfilename, arenaID) if arenaObjects[arenaID] then for k, v in ipairs(arenaObjects[arenaID]) do destroyElement(v) end end arenaObjects[arenaID] = {} local mapFileNode = xmlLoadFile(":".. mapresourcename.."/".. mapfilename..".map") if mapFileNode then for i, v in ipairs( xmlNodeGetChildren(mapFileNode) ) do if xmlNodeGetName(v) == "object" then local model = xmlNodeGetAttribute(v, "model") --etc local x, y, z = xmlNodeGetAttribute(v, "posX"), xmlNodeGetAttribute(v, "posY"), xmlNodeGetAttribute(v, "posZ") local rx, ry, rz = xmlNodeGetAttribute(v, "rotX"), xmlNodeGetAttribute(v, "rotY"), xmlNodeGetAttribute(v, "rotZ") local obj = createObject(model, x, y, z, rx, ry, rz) setElementDimension(obj, arenaID) table.insert(arenaObjects[arenaID], obj) end end return true end return false end This code will load map objects for a specific arena (dimension) ID, and delete previous objects for that arena where applicable. Syntax: bool loadMapIntoArena ( string mapResourceName, string mapFileName, int Arena/Dimension ID) mapResourceName — Resource name where the map file is located mapFileName — File name (excluding the ".map" extension) Arena/Dimension ID — Self explanatory This script will require Admin permissions, because it accesses files on other resources.
  14. dbExec won't return any data. You need to use dbQuery with dbPoll
  15. can you mayby show me how to use it then i am realy confused right now You can see a few examples on dbQuery
  16. local mapFileNode = xmlLoadFile() for i, v in ipairs( xmlNodeGetChildren(mapFileNode) ) do if xmlNodeGetName(v) == "object" then local model = xmlNodeGetAttribute(v, "model") --etc createObject(model, ...) end end
  17. http_guest is a hardcoded username for all HTTP incoming traffic that accesses the server's HTTP port without providing authentication data (ie. logging into another account).
  18. Share the code you have right now, and any /debugscript 3 errors that come up
  19. They discontinued developing MTA for GTA:IV because, as I heard, "GTA IV already had an adequate multiplayer." GTA:IV to GTA:V was a massive step with their multiplayer, now, turning it into a massive online game-mode. Yes, we all know that GTA:Online is lacking the ability to make and run own scripts, but that isn't a sufficient reason to make a multiplayer for a game with a really developed multiplayer.
  20. Try changing it change to: --Line 10: triggerClientEvent(who, "puchatimer", who) --Line 30: setTimer(function(player) triggerServerEvent("accountdata", resourceRoot, player) end, 5000, 1, source)
  21. Client, Line 30: setTimer(function(who) triggerServerEvent("accountdata", resourceRoot) end, 5000, 1) Change to: setTimer(function(player) triggerServerEvent("accountdata", resourceRoot, player) end, 5000, 1, who)
  22. I'm not sure if that'll do anything, but try changing Line 10 setTimer ( chase_aim, 80, 1, source) to chase_aim(source)
  23. You can't load vehicles from MySQL. However, you can load vehicle data and create vehicles based on that data. You would need to save data, such as vehicle model, colour, upgrades and position, to database, and then load that data, create a vehicle of such model, in such position, add such upgrades, change colour et cetera.
×
×
  • Create New...