
ARares
Members-
Posts
22 -
Joined
-
Last visited
Everything posted by ARares
-
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?
-
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?
-
I have and PHPStorm, and i downloaded an Plugin for LUA :))
-
Right now i am using Notepad++, but i want an lua editor which have the MTA Syntax. Which is the best MTA Lua Editor?
-
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.
-
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
-
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
-
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
-
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},
-
Ok, Thanks now i need to find which is the DB, because i have 2 files which are .db: 1. backup 2. teams
-
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
-
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?
-
In this code, i want to check if is a admin?, because if is a admin i want to be: "[Admin][Global]" function globalMessage(thePlayer, cmd, ...) local message = table.concat ( { ... }, " " ); local name = getPlayerName(thePlayer); for _,v in ipairs(getElementsByType("player")) do outputChatBox("#FF0000[GLOBAL] #FFFFFF"..name..": #FFFFFF"..message,v, 255, 255, 255, true) --00FF00 end end addCommandHandler("global", globalMessage); addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() for index,player in pairs(getElementsByType("player")) do bindKey(player,"b", "down", "chatbox", "global"); end end ) addEventHandler("onPlayerJoin", getRootElement(), function() bindKey(source, "b", "down", "chatbox", "global"); end )
-
Download Link? NVM, I found it,
-
you can add the decompiled files?