-
Posts
199 -
Joined
-
Last visited
Everything posted by joaosilva099
-
getPlayerMapBoundingBox should be a startpoint (it will return the coordinates even when the map is zoomed)
-
It's a nice question, I don't know too.
-
well i dont usually create tables using sql language i let the hard work to phpmyadmin but i am sure u will find on google dbFree is not needed when the query is done by dbExec or handled with dbPoll
-
getKeyState("mouse2")
-
Then OnClientVehicleDamage triggerServerEvent triggerClientEvent --to sync to other players
-
If you set AUTO_INCREMENT on the id field on that table, just pass NULL to the id field when executing an INSERT query and it will auto increment the id. If you want to get the ID which the db incremented to your query use this: local _, _, last_insert_id = dbPoll(dbQuery(CONNECTION_HANDLER, QUERY), -1) Another way to get the next ID is: local table = dbPoll(...) local next_id = table[#table]["id"]+1
-
onPlayerJoin will only trigger when all resources are started clientside, so try changing onPlayerJoin with onPlayerConnect Do not forget to fade in the camera and focus it on the player who joined fadeCamera(source, true) setCameraTarget(source, source) onClientFileDownloadComplete won't work since it's meant to be used with downloadFile function and not with server scripts
-
This can help you understanding: function string.explode(self, separator) Check("string.explode", "string", self, "ensemble", "string", separator, "separator") if (#self == 0) then return {} end if (#separator == 0) then return { self } end return loadstring("return {\""..self:gsub(separator, "\",\"").."\"}")() end
-
onVehicleDamage triggerClientEvent getVehicleWheelStates setVehicleWheelStates Maybe... I think it would work
-
it will return that obviously since you are typing the command in the server console.
-
Restarting a MTA Server without disconnect the players
joaosilva099 replied to joaosilva099's topic in Scripting
Use virtual machines -
The problem with this is: You must be logged into an account which is in the Admin ACL, otherwise it won't work... so better to change onPlayerJoin by onPlayerLogin
-
Draw blip according to world position on dxDrawImage map
joaosilva099 replied to Lawliet's topic in Scripting
You must be knowing math for this. First of all, ignore Z of blips (you can use it if you want Ordering in your blips...) Then, you must use getPlayerMapBoundingBox to get the Map size (or get it by your drawing funcition), And finaly, play around with direct proportionality to transform 3000x3000 into YOURMAPXxYOURMAPY -
local localPlayer = getLocalPlayer() local screenWidth, screenHeight = guiGetScreenSize() local position_lbl = guiCreateLabel( 10, screenHeight-24, screenWidth, 22, " ", false ) function renderPosition() if not isPlayerMapVisible( ) then return guiSetText(position_lbl, "") end local _x, _y, _z = getElementPosition( localPlayer ) local _rot = getPlayerRotation( localPlayer ) guiSetText( position_lbl, "X: " .. tostring( _x ) .. "; Y: " .. tostring( _y ) .. "; Z: " .. tostring( _z ) .. "; RotZ: " .. tostring(_rot) ) end addEventHandler( "onClientRender", getRootElement(), renderPosition ) Should work
-
Restarting a MTA Server without disconnect the players
joaosilva099 replied to joaosilva099's topic in Scripting
They might use the command 'refreshall' or maybe even 'refresh' when that happens. Or just simply run a server-sided code which takes a lot of time. (Like I've seen on DayZ servers about ~2 years ago) Yee it's a nice startpoint... but if I run the code, the server will only stop when the code ends, so it's the same thing... /refreshall won't work in this case, as I want to restart the server to update it's MTA version, and not resources. -
Restarting a MTA Server without disconnect the players
joaosilva099 replied to joaosilva099's topic in Scripting
I see in some servers.... You get NT and then you connect back (in that while, it's suposed that the server restarted) -
Does someone know how do shutdown the MTA Server and then start it again without the players being disconnected. I mean, when the server is back, they synchronize again. I am using Winodws
-
Oh forget the question, I solved it changing, first load the txd and then the Dff. Resolved
-
Thanks man but I have a question. Is there a correct order to import txd and dff? like first DFF or first the TXD?
-
Sorry guys. I have been sleeping since my last post and now I will have classes. I will post it later. The mod is here @2:40 Download and is the Mobile Command Center in the RAR
-
Oh ty i checked it and no errors. The file gets downloaded correctly and replaced. It is simply white!
-
Hi all, I have a script to load mods, the script is working fine for all mods, but this Mod is not loading correctly. The DFF file loads fine and the model gets changed, but it becomes white when I load the TXD, Look at the screenshots: I hope someone can help me
-
Its very nice!! Just a little "bug" that i fixed easily. When a Gui Tab is disabled you can't se it's name because tab background is black and tab name font color is black too. I whitened a little bit the tab background and now it's working
-
rotation never gets negative, you should do this: if (rx < 360-29) and (rx > 360-32 ) then
-
Hi all. I am good at maths but not so good. I want to get the world position when a player clicks the screen and the F11 map is opened. I though in screen rate (x/y) and then some maths. I would want the reverse too if it is possible. Thanks anyways!