ironimust
Members-
Posts
16 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
ironimust's Achievements
Square (6/54)
0
Reputation
-
I answer a little late, this problem is modules that are not installed. ı fixed
-
My problem fixed, I cannot upload because the coordinate values of 1 info are incorrect.
-
x y z and all other values of information objects are successfully saved in mysql. And I don't understand anything of what you're saying, I don't know much. But one thing I noticed is that the information system can successfully use this to save and delete x y z dimension values. but when I want to add a new information object, it gives an error while uploading x, y, z, measure, internal values to the server. And the main thing is that when these information objects are registered to mysql, they make x, y, z, Dimension, Interior values with a different code. but when asked to upload to the server, the code tries to load x, y, z, measure, internal values in a different way. -------------save codes--------------------- local x = getElementData(informationicons[key], "informationicon:x") local y = getElementData(informationicons[key], "informationicon:y") local z = getElementData(informationicons[key], "informationicon:z") local rx = getElementData(informationicons[key], "informationicon:rx") local ry = getElementData(informationicons[key], "informationicon:ry") local rz = getElementData(informationicons[key], "informationicon:rz") local interior = getElementData(informationicons[key], "informationicon:interior") local dimension = getElementData(informationicons[key], "informationicon:dimension") -------------save codes--------------------- ----- -------------to server load codes------------- local x = tonumber(row["x"]) local y = tonumber(row["y"]) local z = tonumber(row["z"]) local rx = tonumber(row["rx"]) local ry = tonumber(row["ry"]) local rz = tonumber(row["rz"]) local interior = tonumber(row["interior"]) local dimension = tonumber(row["dimension"]) local information = tostring(row["information"]) informationicons[id] = createPickup(x, y, z, 3, 1239, 0) setElementInterior(informationicons[id], interior) setElementDimension(informationicons[id], dimension) setElementData(informationicons[id], "informationicon:id", id) setElementData(informationicons[id], "informationicon:createdby", createdby) setElementData(informationicons[id], "informationicon:x", x) setElementData(informationicons[id], "informationicon:y", y) setElementData(informationicons[id], "informationicon:z", z) setElementData(informationicons[id], "informationicon:rx", rx) setElementData(informationicons[id], "informationicon:ry", ry) setElementData(informationicons[id], "informationicon:rz", rz) setElementData(informationicons[id], "informationicon:interior", interior) setElementData(informationicons[id], "informationicon:dimension", dimension) -------------to server load codes------------- codes different from the save code "tonumber" Why is this code "tonumber" contains a line? These are the codes used to add information to the server, how is this line of code different from the others?
-
ironimust started following Vehicle Mods Private , The information system has been corrupted. , How to use webmap and 1 other
-
Hello MTA users. My info-system has been corrupted. I use classic roleplay server info-system, but info-system now running /addii command use new info but only object get in. new created infos succesfull saved the mysql but info-system infos dimension, interior, info:id and object not loading the server. info-system command lines; --------------------server.lua----------------- mysql = exports.mysql -- Done by Anthony local informationicons = { } function SmallestID() -- finds the smallest ID in the SQL instead of auto increment local result = mysql:query_fetch_assoc("SELECT MIN(e1.id+1) AS nextID FROM informationicons AS e1 LEFT JOIN informationicons AS e2 ON e1.id +1 = e2.id WHERE e2.id IS NULL") if result then local id = tonumber(result["nextID"]) or 1 return id end return false end function makeInformationIcon(thePlayer, commandName, ...) if exports.integration:isPlayerTrialAdmin(thePlayer) then if ... then local arg = {...} local information = table.concat( arg, " " ) local x, y, z = getElementPosition(thePlayer) --z = z + 0.5 only use for i object local rx, ry, rz = getElementRotation(thePlayer) local interior = getElementInterior(thePlayer) local dimension = getElementDimension(thePlayer) local id = SmallestID() local createdby = getPlayerName(thePlayer):gsub("_", " ") local query = mysql:query_free("INSERT INTO informationicons SET id="..mysql:escape_string(id)..",createdby='"..mysql:escape_string(createdby).."',x='"..mysql:escape_string(x).."', y='"..mysql:escape_string(y).."', z='"..mysql:escape_string(z).."', rx='"..mysql:escape_string(rx).."', ry='"..mysql:escape_string(ry).."', rz='"..mysql:escape_string(rz).."', interior='"..mysql:escape_string(interior).."', dimension='"..mysql:escape_string(dimension).."', information='"..mysql:escape_string(information).."'") if query then informationicons[id] = createPickup(x, y, z, 3, 1239, 0)--createObject(1239, x, y, z, rx, ry, rz) setElementInterior(informationicons[id], interior) setElementDimension(informationicons[id], dimension) setElementData(informationicons[id], "informationicon:id", id) setElementData(informationicons[id], "informationicon:createdby", createdby) setElementData(informationicons[id], "informationicon:x", x) setElementData(informationicons[id], "informationicon:y", y) setElementData(informationicons[id], "informationicon:z", z) setElementData(informationicons[id], "informationicon:rx", rx) setElementData(informationicons[id], "informationicon:ry", ry) setElementData(informationicons[id], "informationicon:rz", rz) setElementData(informationicons[id], "informationicon:interior", interior) setElementData(informationicons[id], "informationicon:dimension", dimension) setElementData(informationicons[id], "informationicon:information", information) outputChatBox("Information icon created with ID: "..id, thePlayer, 0, 255, 0) else outputChatBox("Error creating information icon. Please report on the mantis.", thePlayer, 255, 0, 0) end else outputChatBox("SYNTAX: /addii [Information]", thePlayer, 255, 194, 14) end end end addCommandHandler("addii", makeInformationIcon, false, false) function saveAllInformationIcons() for key, value in ipairs (informationicons) do local id = getElementData(informationicons[key], "informationicon:id") local createdby = getElementData(informationicons[key], "informationicon:createdby") local x = getElementData(informationicons[key], "informationicon:x") local y = getElementData(informationicons[key], "informationicon:y") local z = getElementData(informationicons[key], "informationicon:z") local rx = getElementData(informationicons[key], "informationicon:rx") local ry = getElementData(informationicons[key], "informationicon:ry") local rz = getElementData(informationicons[key], "informationicon:rz") local interior = getElementData(informationicons[key], "informationicon:interior") local dimension = getElementData(informationicons[key], "informationicon:dimension") local information = getElementData(informationicons[key], "informationicon:information") mysql:query_free("UPDATE informationicons SET createdby = '" .. mysql:escape_string(createdby) .. "', x = '" .. mysql:escape_string(x) .. "', y = '" .. mysql:escape_string(y) .. "', z = '" .. mysql:escape_string(z) .. "', rx = '" .. mysql:escape_string(rx) .. "', ry = '" .. mysql:escape_string(ry) .. "', rz = '" .. mysql:escape_string(rz) .. "', interior = '" .. mysql:escape_string(interior) .. "', dimension = '" .. mysql:escape_string(dimension) .. "', information = '" .. mysql:escape_string(information) .. "' WHERE id='" .. mysql:escape_string(id) .. "'") end end addEventHandler("onResourceStop", getResourceRootElement(), saveAllInformationIcons) function loadAllInformationIcons() local ticks = getTickCount( ) local counter = 0 local result = mysql:query("SELECT * FROM `informationicons`") while true do local row = mysql:fetch_assoc(result) if not row then break end local id = tonumber(row["id"]) local createdby = tostring(row["createdby"]) local x = tonumber(row["x"]) local y = tonumber(row["y"]) -- bunlar tuhaf local z = tonumber(row["z"]) local rx = tonumber(row["rx"]) local ry = tonumber(row["ry"]) local rz = tonumber(row["rz"]) local interior = tonumber(row["interior"]) local dimension = tonumber(row["dimension"]) local information = tostring(row["information"]) informationicons[id] = createPickup(x, y, z, 3, 1239, 0)--createObject(1239, x, y, z, rx, ry, rz) setElementInterior(informationicons[id], interior) setElementDimension(informationicons[id], dimension) setElementData(informationicons[id], "informationicon:id", id) setElementData(informationicons[id], "informationicon:createdby", createdby) setElementData(informationicons[id], "informationicon:x", x) setElementData(informationicons[id], "informationicon:y", y) setElementData(informationicons[id], "informationicon:z", z) setElementData(informationicons[id], "informationicon:rx", rx) setElementData(informationicons[id], "informationicon:ry", ry) setElementData(informationicons[id], "informationicon:rz", rz) setElementData(informationicons[id], "informationicon:interior", interior) setElementData(informationicons[id], "informationicon:dimension", dimension) setElementData(informationicons[id], "informationicon:information", information) counter = counter + 1 end outputDebugString("Loaded " .. counter .. " information icons in " .. ( getTickCount( ) - ticks ) .. "ms") end addEventHandler("onResourceStart", getResourceRootElement(), loadAllInformationIcons) function getNearbyInformationIcons(thePlayer, commandName) if (exports.integration:isPlayerTrialAdmin(thePlayer)) then local posX, posY, posZ = getElementPosition(thePlayer) outputChatBox("Nearby Information Icons:", thePlayer, 255, 126, 0) local count = 0 for key, value in ipairs (informationicons) do local dbid = getElementData(informationicons[key], "informationicon:id") if dbid then local x, y, z = getElementPosition(informationicons[key]) local distance = getDistanceBetweenPoints3D(posX, posY, posZ, x, y, z) if distance <= 10 and getElementDimension(informationicons[key]) == getElementDimension(thePlayer) and getElementInterior(informationicons[key]) == getElementInterior(thePlayer) then local createdby = getElementData(informationicons[key], "informationicon:createdby") local information = getElementData(informationicons[key], "informationicon:information") outputChatBox(" #" .. dbid .. " by " .. createdby .. " - Icon: " .. information, thePlayer, 255, 126, 0) count = count + 1 end end end if (count==0) then outputChatBox(" None.", thePlayer, 255, 126, 0) end end end addCommandHandler("nearbyii", getNearbyInformationIcons, false, false) function deleteInformationIcon(thePlayer, commandName, ID) if (exports.integration:isPlayerTrialAdmin(thePlayer)) then if tonumber(ID) then local ID = tonumber(ID) if informationicons[ID] then for k,v in pairs(getAllElementData(informationicons[ID])) do removeElementData(informationicons[ID],k) end destroyElement(informationicons[ID]) local query = mysql:query_free("DELETE FROM informationicons WHERE id='"..mysql:escape_string(ID).."'") if query then informationicons[ID] = nil outputChatBox("Information icon ID: "..ID.." deleted.", thePlayer, 0, 255, 0) else outputChatBox("Error deleting information icon. Please report on the mantis.", thePlayer, 255, 0, 0) end else outputChatBox("An information icon with that ID does not exist.", thePlayer, 255, 0, 0) end else outputChatBox("SYNTAX: /delii [ID]", thePlayer, 255, 194, 14) end end end addCommandHandler("delii", deleteInformationIcon, false, false) --------------------server.lua----------------- and CLİENT file --------------------client.lua----------------- local informationicons = { } function showNearbyInformationIconsInformation() for index, informationicon in ipairs( exports.global:getNearbyElements(getLocalPlayer(), "marker") ) do informationicons[index] = informationicon end showInformationText() end setTimer(showNearbyInformationIconsInformation, 0, 0) function showInformationText() for i = 1, #informationicons, 1 do if isElement(informationicons) then local x,y,z = getElementPosition(informationicons) local cx,cy,cz = getCameraMatrix() local information = getElementData(informationicons, "informationicon:information") local dbid = getElementData(informationicons, "informationicon:id") if information then if getDistanceBetweenPoints3D(cx,cy,cz,x,y,z) <= 40 then local px,py,pz = getScreenFromWorldPosition(x,y,z+0.5,0.05) if px and isLineOfSightClear(cx, cy, cz, x, y, z, true, true, true, true, true, false, false) then dxDrawText(information, px-4, py-4, px+6, py+6, tocolor(0, 0, 0, 255), 1.5, "default-bold", "center", "center", false, false) dxDrawText(information, px, py, px, py, tocolor(234, 200, 0, 255), 1.5, "default-bold", "center", "center", false, false) else end end end end end end addEventHandler("onResourceStart", getRootElement(), showInformationText) --------------------client.lua----------------- error codes server.lua, line 91,92,93,94 informationicons[id] = createPickup(x, y, z, 3, 1239, 0)--createObject(1239, x, y, z, rx, ry, rz) setElementInterior(informationicons[id], interior) setElementDimension(informationicons[id], dimension) setElementData(informationicons[id], "informationicon:id", id) PLS Help now has been break my info-system Error messages
-
Hello, ı found old script. Script name is "webmap". MTA original folders have the script. Anymore how to use the script tell me? how to succesful run the script?
-
Hello, today I decided to do something that is not impossible. My request is, I want to install airplane mode on a vehicle, no matter what, I just need to install it somehow. I know I can't use mods for planes like HYDRA and RUSTLER because the game will crash because their wheels are turning on and off. My question is, can't I install airplane mods with fixed wheels on vehicles?
-
A web tool that compiles code, how will it hide model files? I have already hidden the files named .lua, only the model files are not hidden. [url=https://www.hizliresim.com/n1eehyo][img=https://i.hizliresim.com/n1eehyo.PNG][/url] [url=https://www.hizliresim.com/bxyrt6l][img=https://i.hizliresim.com/bxyrt6l.PNG][/url] [url=https://www.hizliresim.com/pchlmwu][img=https://i.hizliresim.com/pchlmwu.PNG][/url]
-
"Third way is to compile code." how can i do this way?
-
yes, I want to keep the files .txd and .dff
-
How can I use the "cache" command for Vehicle Mods? Or how do I prevent Vehicle Mods from landing in players' resources folder? https://imgyukle.com/i/rgmdK0 ---("cache" command doesn't work to hide tool mode.) https://imgyukle.com/i/rgvRbp ---(The vehicle mod has landed on the player's computer.)
-
mtaserver.conf Did I enable module <module src="mta_mysql.dll" /> mysql running
-
not succesful
-
MySQLConnection = mysql_connect(hostname, username, password, database, port) error code line.
-
I don't know much. Can you make this code compatible with dbConnect or can you post a working mysql connection script?