Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/01/18 in all areas

  1. What bad english? You didn't say anything. Gave no code at all! Are we magicians or some mind readers? Please look at the rules topic for the proper way of asking for help around here.
    2 points
  2. Hello. Another year is coming to an end, so that means that just like the last year, we have got a new recap and status update post for you. For now, lets summarise all the interesting things that happened this year. 2017 in Recap Late April, we have released Multi Theft Auto: San Andreas 1.5.4. The release introduced an important change and extra security features for server owners, as well as some bugfixes. Around the same time, we have announced a public launch of our Discord server in order to improve communication with our player base. Since then, ove
    2 points
  3. local t1,t2 = string.split(string,',') Or local t1,t2 = split(string,',') One of those to split the string Then string.gsub(t1,'INTERIOR: ','') and string.gsub(t2,'OWNER = ','')
    1 point
  4. There's quite a few methods of saving data in MTA Lua. Local Saving 1. Lua Table (Temporary data, works similar to ram, where all data is destroyed when script stops) 2. SQLite (Saving to internal server database) External 3. TXT (Saving strings to a txt file and then loading them again with loadstring()(), not very organized and needing to save functions) 4. JSON (Converting lua tables to JSON with toJSON() function, then saving the result of the toJSON() function into a JSON file and loading it again by reading the file and using fromJSON() function on the buffered content) 5
    1 point
  5. Elements with different interiors will be invisible to each other, this is because of GTA:SA using the same dimension for use of houses, shops, and other things of the sorts so that world objects don't interfere with each other. It's best if you want these elements to see each other to use the same interior. Dimensions work a little differently. When elements have different dimensions, they have little to no interaction what so ever. This is helpful when separating a group of elements to give them their own world. It works great with servers that want to have multiple game modes and or sess
    1 point
  6. dxSetShaderValue(shader, "color", {255, 0, 0})
    1 point
  7. And the code that i wrote is wrong, I confused interior with dimension...
    1 point
  8. .FX Something like this: float3 color; Should be in your .FX file, find the tag, for example this one is "color". .LUA function resource_starts() dxSetShaderValue(shader, "color", 255, 0, 0) end addEventHandler("onClientResourceStart", getRootElement(), resource_starts) onClientRender constantly is called EVERY TIME the clients screen renders a frame, it's not efficient for something like what you need. You're gonna have to find a new event to replace it. https://wiki.multitheftauto.com/wiki/Client_Scripting_Events I recommend onClientResourceStart Source: MTA S
    1 point
  9. setTimer(function(player) for _,v in ipairs(getElementsByType("vehicle")) do for _,o in ipairs(getElementsByType("object")) do local interior = getElementInterior(player) setElementInterior(v,interior) setElementInterior(o,interior) end end end,50,0 )
    1 point
  10. setElementInterior(theVehicle,theInteriorNumber)
    1 point
  11. 1) Just use float3 colorrgb; in your shader, that should allow you to use dxSetShaderValue, you could also see the examples on the wiki for more details. 2) I suppose you are asking if you get problems when you call dxSetShaderValue in onClientRender events. Actually I'm not sure but I wouldn't call it more than really necessary.
    1 point
  12. I recent figured out that this is an easy way to calculate your absolute resolution to relative values: local yourScreenYResolution = -- <fill in> 900 wasn't it? local screenX, screenY = guiGetScreenSize() local scalefactor = 1 / yourScreenYResolution * screenY -- You created something of 50 pixels on 1440 x 900. outputDebugString(scalefactor * 50) -- And now it will be rescaled on all other resolutions correctly. Try it and don't buy it.
    1 point
×
×
  • Create New...