Jump to content

ARares

Members
  • Posts

    22
  • Joined

  • Last visited

Details

  • Interests
    C#, PHP, MySQL

Recent Profile Visitors

852 profile views

ARares's Achievements

Civilian

Civilian (7/54)

2

Reputation

  1. I want to make an MTA DayZ Server, and I have an server with such parameters: | Ram | 1GB | | CPU | Broadcom BCM2837 64bit Quad Core 1.1GHz (1.2 GHz - Turbo) | Would it be possible to estimate how much players could such a server handle without too much lag?
  2. In the past i had an Streams folder and the radio files, was empty, i mean it was like i did'n had radio, and now i reinstalled the GTA, and i want to ask if someone can tell me from where i can get those files with no radio?
  3. I have and PHPStorm, and i downloaded an Plugin for LUA :))
  4. Right now i am using Notepad++, but i want an lua editor which have the MTA Syntax. Which is the best MTA Lua Editor?
  5. I have one, is called 'id' but is not attached to the vehicle from game, is just in DB. and if is not attached i can't check that id with the one from DB
  6. Ok, i fixed that bug, but i have one more, and how i can add a unique id to all vehicles?, the id to me random generated and to look like this: DVeh0xxxxx (and to add a random number e.g. DVeh05 or DVeh0142) How i can do that?, i need that to check if the Vehicle is in DB.
  7. In my DayZ GM, at the start all cars are deleted and are spawned the cars which are in DB, but if i will add a new car which is not in DB, that car is deleted too, so, how i can check if a car is spawned and is not in DB? Code: function loadBackup() for _,v in pairs(getElementsByType("vehicle")) do local p0 = dbPoll(dbQuery(db, "SELECT * FROM `vehicles`"), -1); -- Here i need to make the check local col = getElementData(v, "parent"); if col then destroyElement(col); end destroyElement(v); end local p = dbPoll(dbQuery(db, "SELECT * FROM `vehicles`"), -1); if (#p > 0) then for _,d in pairs(p) do createDayzVeh(d["model"], d["x"], d["y"], d["z"], d["rX"], d["rY"], d["rZ"], d["slots"], d["fuel"], d["engines"], d["moving"], d["parts"], d["items"], d["dayz"], d["health"], d["sx"], d["sy"], d["sz"]); end end local p2 = dbPoll(dbQuery(db, "SELECT * FROM `tents`"), -1); if (#p2 > 0) then for _,d in pairs(p2) do createDayzTent(d["model"], d["x"], d["y"], d["z"], d["rX"], d["rY"], d["rZ"], d["slots"], d["scale"], d["items"]); end end end
  8. How i can check if the car is destroyed?, because i have an DayZ server and at the backups in db are added and the destroyed cars: for _,veh in ipairs(getElementsByType("vehicle")) do if not getElementData(veh, "helicrash") then local col = getElementData(veh, "parent"); if col then local x,y,z = getElementPosition(veh); local rX,rY,rZ = getElementRotation(veh); local health = getElementHealth(veh); if (health < 500) then health = 500; end local _,sx,sy,sz = unpack(getElementData(col, "spawn")); local items = {}; vc = vc+1; for _,item in ipairs(backupItemsTable) do local quantity = getElementData(col, item[1]) or 0; if (quantity > 0) then table.insert(items, {item[1], quantity}); end end dbExec(db, "INSERT INTO `vehicles` (model, x, y, z, rX, rY, rZ, slots, fuel, engines, moving, parts, items, dayz, health, sx, sy, sz, id) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)", getElementModel(veh), x, y, z, rX, rY, rZ, getElementData(col, "MAX_Slots") or 20, getElementData(col, "fuel") or 0, getElementData(col, "Engine_inVehicle") or 0, getElementData(col, "Tire_inVehicle") or 0, getElementData(col, "Parts_inVehicle") or 0, toJSON(items), getElementData(veh, "dayzvehicle") or 0, health, sx, sy, sz, vc); end end end NVM, i solved
  9. Idk lua, can you tell me which line i need to edit? and what i need to add?
  10. I have a DayZ Gamemode, and at the vehicles are saved in backup.db, but is a problem, because are saved the the destroyed cars, how i can remove that? Code: https://hastebin.com/wohefayeze.lua
  11. Am gamemode-ul acesta de dayz: https://github.com/mihayy5/mtadayz07 Si in vehicles.lua am vrut sa fac un nou spawn pt Raindance, dar nu este acolo: --[[Raindance]] {563, 336.89999389648,1903.1999511719,20},
  12. Ok, Thanks now i need to find which is the DB, because i have 2 files which are .db: 1. backup 2. teams
  13. Yes, is dayz server, but i didn't spawned vehicles with admin panel, i spawned them with a VSS. And, what i need to edit in the DB? and how i can edit the DB? This is my Gamemode: https://github.com/mihayy5/mtadayz07
  14. Sometimes the cars positions are not saved, just after the Backup are saved, how i can make a code to save the car position every time, or with a command?
×
×
  • Create New...