XeniusORIGINAL

Members
  • Content Count

    16
  • Joined

  • Last visited

Community Reputation

0 Neutral

About XeniusORIGINAL

  • Rank
    Square

Details

  • Gang
    Teszt

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. You can't. Use performancebrowser for client performance stats.
  2. I get no errors, only the download stops at 55%, the skin mods i added won't continue to load is it possible that the script don't support skin mods?! The script support skin mods.
  3. Video: http://www.youtube.com/watch?v=06oIX8WJ8Hg Load mods in background Example: In script (codeMods.lua): ["nebula.dff"] = 400, ["nebula.txd"] = 400, --- Then we load nebula.dff and txd to Landstalker Meta.xml: <file src="nebula.dff" download="false"/> <file src="nebula.txd" download="false"/> Version 2.0 changelog: Fixed issues. Added collision support. Added other mods support. Added weapon support. Added object support. Download: http://community.mtasa.com/index.php?p= ... s&id=10814 Uncompiled script is only $2, just pm to me.
  4. Load files without download. How it works? First change "httpserver" in meta.xml. Then, Example file: Meta.xml: In script: playSound(exports.xmanager:getFileFromServer("resourcename/song.mp3"), false) Community: http://community.mtasa.com/index.php?p= ... s&id=10803
  5. Hello. I have two script, and if number of players is over 150 then this causes random lag. 1. Inventory Save: function saveItems(element, byquit) if getElementType(element) == "vehicle" and getVehicleType(element) == "BMX" then return end local dbid = tonumber(getElementData(element,"dbid")) or 0 if dbid > 0 then for i=0,31 do local item = tonumber(getElementData(element,"items"..i)) or 0 if item > 0 then local dutyItem = tonumber(getElementData(element,"dutyitem"..i..item)) or 0 if dutyItem ~= 1 then local itemValue = tonumber(getElementData(element,"itemvalue"..i..item)) or 0 local id = tonumber(getElementData(element,"itemid"..i..item)) or 0 local _, lastid = mysql:query_free("INSERT INTO items (id,itemValue,itemID,type,owner,slot,`index`) VALUES ('"..id.."','"..itemValue.."','"..item.."','"..getType(element).."','"..dbid.."','"..i.."','0') ON DUPLICATE KEY UPDATE id=VALUES(id),itemValue=VALUES(itemValue),itemID=VALUES(itemID),type=VALUES(type),owner=VALUES(owner),slot=VALUES(slot),`index`=VALUES(`index`)", true) if id == 0 and not byquit then if isElement(element) then setElementData(element,"itemid"..i..item, lastid) end end end end end end end addEvent("saveItems", true) addEventHandler("saveItems", getRootElement(), saveItems) And: function quitPlayer() saveItems(source, true) end addEventHandler ("onPlayerQuit", getRootElement(), quitPlayer ) addEventHandler("onResourceStop", resourceRoot, function() for k,v in ipairs(getElementsByType("player")) do if getElementData(v, "spawned") then saveItems(v) end end for k1,v1 in ipairs(getElementsByType("vehicle")) do saveItems(v1) end for k2,v2 in ipairs(getElementsByType("object", getResourceRootElement(getResourceFromName("ex_inventory")))) do saveItems(v2) end end) 2. Account save: addEventHandler ( "onPlayerQuit", getRootElement(), function() if getElementData(source, "spawned") then savePlayer(source) end end ) function savePlayer(ps) if isElement(ps) then local id = tonumber(getElementData(ps, "dbid")) or 0 if id > 0 then local x, y, z = getElementPosition(ps) local rot = getPedRotation(ps) local interior = getElementInterior(ps) local dimension = getElementDimension(ps) local faction = tonumber(getElementData(ps, "char:Faction")) or 0 local factionrank = tonumber(getElementData(ps, "char:FactionRank")) or 1 local factionleader = tonumber(getElementData(ps, "char:FactionLeader")) or 0 local dutyskin = tonumber(getElementData(ps, "char:DutySkin")) or 0 local dead = tonumber(getElementData(ps, "dead")) or 0 local skin = tonumber(getElementData(ps, "char:skin")) or 0 local hlp = tonumber(getElementData(ps, "char:HLP")) or 0 local pr = tonumber(getElementData(ps, "char:pR")) or 0 local pg = tonumber(getElementData(ps, "char:pG")) or 0 local pb = tonumber(getElementData(ps, "char:pB")) or 0 local job = tonumber(getElementData(ps, "char:job")) or 0 local timespenton = tonumber(getElementData(ps, "char:timeSpent")) or 0 local bankmoney = tonumber(getElementData(ps, "char:Bankmoney")) or 0 local jailreason = tostring(getElementData(ps, "char:jailReason")) or "Nincs" local adminnick = tostring(getElementData(ps, "user:adminnick")) or "Ismeretlen" local charname = tostring(getElementData(ps, "char:Name")) or "Ismeretlen" local jailtime = tonumber(getElementData(ps, "char:jailTime")) or 0 local money = tonumber(getElementData(ps, "char:Money")) or 0 local ehseg = tonumber(getElementData(ps, "char:Hunger")) or 0 local radio = tonumber(getElementData(ps, "char:radioChannel")) or 0 local admin = tonumber(getElementData(ps, "user:adminlevel")) or 0 local accid = tonumber(getElementData(ps, "char:gameaccountid")) or 0 local license = getElementData(ps, "char:drivingLicense") if license then license = 1 else license = 0 end mysql:query_free("UPDATE karakterek SET rotation = '"..rot.."',dead = '"..dead.."',hlp = '"..hlp.."',jailreason = '"..jailreason.."',dutyskin = '"..dutyskin.."',factionrank = '"..factionrank.."',factionleader = '"..factionleader.."',faction = '"..faction.."',pr = '"..pr.."',pg = '"..pg.."',pb = '"..pb.."', bankmoney = '"..bankmoney.."', adminnick = '"..adminnick.."', job = '"..job.."', timeSpentOn = '"..timespenton.."', jailTime = '"..jailtime.."', skin = '".. skin .."', charactername = '"..charname.."', money = '"..money.."', ehseg = '"..ehseg.."', thirsty = '"..tonumber(getElementData(ps, "char:Thirsty")).."', health = '"..getElementHealth(ps).."', armor = '"..getPedArmor(ps).."', x = '"..x.."', y = '"..y.."', z = '"..z.."', radiochannel = '"..radio.."', car_license = '"..license.."', interior_id = '"..interior.."', dimension_id = '"..dimension.."' WHERE id = '"..id.."'") mysql:query_free("UPDATE account SET admin = '"..admin.."' WHERE id = '"..accid.."'") end end end addEvent("savePlayer", true) addEventHandler("savePlayer", getRootElement(), savePlayer) And the mysql function: function query_free(q,poll) local this = #results + 1 results[this] = dbQuery(dbHandler, q) if poll then local result, num_affected_rows, last_insert_id = dbPoll(results[this], -1) if result == nil then dbFree(results[this]) return this, nil elseif result == false then dbFree(results[this]) return this, nil else dbFree(results[this]) return this, tonumber(last_insert_id) end end dbFree(results[this]) return this end I don't know how to fix this, no more idea. if anyone can help, then please reply.
  6. https://wiki.multitheftauto.com/wiki/Gu ... lectedItem https://wiki.multitheftauto.com/wiki/OnClientGUIClick
  7. Engine functions replace dont just one elements model. Engine functions load modification for all model. I want load modification for one element. Example: if infernus's getElementData(test) == 1 then load Example1.dff elseif infernus's getElementData(test) == 2 then load Example 2.dff
  8. Hello. Can replace one element model? If yes, then how to? I think dont for default model replace, just one element model. Sorry for bad english, and thanks if reply.
  9. setVehicleEngineState is bugged. no vehicle sfx to nearby player
  10. what? setElementPosition? use attachElementToElement() https://wiki.multitheftauto.com/wiki/At ... tToElement
  11. https://wiki.multitheftauto.com/wiki/SetInteriorFurnitureEnabled for i = 0, 4 do setInteriorFurnitureEnabled(i, false) end
  12. function add(thePlayer, command) local account = getPlayerAccount(thePlayer) local crimes = tonumber(getAccountData(account, "crimes")) or 0 setAccountData(account, "crimes", crimes +1) end