Jump to content

rE5vK8bu

Members
  • Posts

    16
  • Joined

Everything posted by rE5vK8bu

  1. addEventHandler("onResourceStart",getResourceRootElement(getThisResource()),function() for _,v in ipairs(getResources())do local name = getResourceName(v) if string.find(name,"tag")then startResource(v) end end end) addEventHandler("onResourceStop",getResourceRootElement(getThisResource()),function() for _,v in ipairs(getResources())do local name = getResourceName(v) if string.find(name,"tag")then stopResource(v) end end end)
  2. http://wiki.roblox.com/index.php?title=Global_namespace/Basic_functions#ipairs http://wiki.roblox.com/index.php?title=Global_namespace/Basic_functions#pairs
  3. This code save: Player (id, serial, position, items, stats) Tent (id, position, items) I have not done the save vehicle code yet. (no time) Download and install VertrigoServ Go to Tools > PhpMyAdmin (image) Create a Database 'dayz' and set Collation 'utf8_general_ci' (image) Go to Import > Choose file (dayz.sql) > Go (image) My example code: link
  4. Try use attachElements function startMySound(player) if isPedInVehicle(player) then local vehicle = getPedOccupiedVehicle(player) local x,y,z = getElementPosition(player) local sound = playSound3D("sound1.mp3",x,y,z,true) attachElements(sound,vehicle) -- It attach the sound to the vehicle end end addEventHandler("onClientVehicleEnter",getRootElement(),startMySound)
  5. Is a good idea implement fastman92limit adjuster in mtasa. Edit: Open Limit Aduster (OLA) can be added?
  6. guiGridListGetItemColor,guiLabelGetColor
  7. rE5vK8bu

    get Max value

    Perhaps this should work. local accountValue = {} for _,cuentas in ipairs(getAccounts())do table.insert(accountValue,getAccountData(cuentas,"Value")) end table.sort(accountValue,function(a,b) return b < a end) outputChatBox("The best Value is "..accountValue[1]) My explanation: --table: t = {3,2,5,1,4} --returns from highest to lowest: table.sort(t,function(a,b) return b < a end) --results: 5,4,3,2,1
  8. I tried using xmlNodeGetName
  9. warn.xml: string = "Wait... Press '%s' (you must not move!)"/> function: function getStringFromID(text) if type(strings)~= "table" then local file = xmlLoadFile("warn.xml") strings = {} if file then for _,v in ipairs(xmlNodeGetChildren(file))do strings[xmlNodeGetName(v)] = xmlNodeGetAttribute(v,"string") end xmlUnloadFile(file) end end return strings[tostring(text)] or "" end --getStringFromID("wait_for_move") --return "Wait... Press '..key..' (you must not move!)" How i get string id from value xml? Example: string = "y"/> I want get x from y How i do to get x?
  10. I do not want to create it: local name,id,slot,ammo,mag_size,damage,model,new_model,is_sniper = getWeaponInfo(getElementData(source,"current_weapon_1")) I want to create a main function. I do not want to create more functions from the table
  11. --table weaponInfo = { {name = "M4",id = 31,slot = 5,ammo = "M4 Mag",mag_size = 30,damage = 5000,model = 356,new_model = 1241,is_sniper = false}, {name = "Sniper",id = 34,slot = 6,ammo = "Sniper Mag",mag_size = 10,damage = 5000,model = 358,new_model = 1252,is_sniper = 1252}, } --function function getWeaponInfo(item) for _,v in ipairs(weaponInfo)do if item == v.name then return v.name,v.id,v.slot,v.ammo,v.mag_size,v.damage,v.model,v.new_model,v.is_sniper end end end The function will work if I use the script that way in a function? in disarray? local name,slot,mag_size,ammo = getWeaponInfo(currentweapon)
  12. I just wondered if I could use return in elseif Thanks Gaberiel.
  13. That's right? if getAccountData(account,"dead")then respawnPlayer(player) return elseif getAccountData(account,"faint")then triggerClientEvent(player,"setPlayerFaint",player,getElementData(account,"faint_tick")or false) return end
  14. Help to create cartridge for weapons in hud. Example: 30|2 (Ammunition/Cartridge) Or: http://prntscr.com/7cv0e9
  15. Very good this admin panel for the mta: dayz. I'm using it on my gamemode.
×
×
  • Create New...