Popular Content

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

  1. 2 points
    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. 2 points
    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, over 2350 users have visited it and chatted with us. We have also opened regional sections in it to cater to our international users. Then, in October, we have released Multi Theft Auto: San Andreas 1.5.5. Under the hood changes were the highlight of this release, however there was quite a lot of them. Near the release of 1.5.5, we have enabled some 2-factor authentication options for our forums. You can find them in your Forum Account's Settings page. More recently, we have been featured in Polish leading gaming network's (GRYOnline.pl) video about multiplayer mods for GTA series (the video is only in Polish unfortunately, subtitles are not available). Quite a lot of footage was dedicated to history and present of MTA and the mod was cited as one of the major possible inspirations for Rockstar's GTA:Online mode in GTA V. A bunch of interesting MTA:SA-related YouTube videos from this year MTA:SA The Fate Of The Furious - Havana Race (Recreation) [MTA:SA] Character Customization & 3D GUI MTA:SA-SAAF Dogfight Gameplay #2 by [TC]Joseph [UWS] United We Stand 15-13 [CLAY] Clay Team | MTA:SA ClanWar | With Rematch [MTA SA]: Graffiti System MTA - PUBG | BATTLEGROUNDS PRIMEIRA PARTIDA DO CANAL Current player counts and version fragmentation statistics Type Amount of players Date / Time Recent peak number of concurrent unique players 32068 players 2017.11.04 (at 17.30 GMT) Highest recorded number of concurrent unique players 32068 players 2017.11.04 (at 17.30 GMT) Recent number of daily unique players 156247 players 2017.12.26 (Tuesday) Highest recorded number of daily unique players 173585 players 2017.12.23 (Saturday) Recent number of monthly unique players 654399 players November, 2017 Highest recorded number of monthly unique players 668997 players January, 2017 Just like last year, there were new records for unique daily player count fairly recently. MTA:SA Version or series Percentage of players using that version or series as of 26th of December, 2017 1.5.5 97.60% 1.5.4 1.30% 1.5.3 0.30% 1.5.2 0.30% 1.4.x 0.33% 1.3.x 0.17% Very good. Two most recent releases from this year are used by nearly 99% of our player base. The newer the version, the better and more secure it is. *** Work continues on the next release. We have added some new scripting functions such as ones requested in #9562 (contributed by emre1702), as well as did some tweaks to already existing ones. Also did a fix for a memory leaks in the audio part of the Client and a bunch of other changes too. Think that's all for now. Best Wishes for 2018 from the MTA Team!
  3. 1 point
    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 = ','')
  4. 1 point
    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. XML (Saving nodes into xml and then loading them again with MTA's premade xml functions) 6. MySQL (Best method for saving data, goes into an external database, load/read time is fast, downside being that it relies on a MySQL Server) 4. LUA (Similar to txt, converting a chunk of a script into a string and then exporting it to a file to be loaded later on with fileRead and loadstring()(), used when transporting scripts) I hoped that this has helped you, lots of choices to choose from, good luck and have a nice day.
  5. 1 point
    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 sessions/worlds. I hope that my explanation has helped you, have a nice day.
  6. 1 point
    dxSetShaderValue(shader, "color", {255, 0, 0})
  7. 1 point
    And the code that i wrote is wrong, I confused interior with dimension...
  8. 1 point
    .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 SA Wiki
  9. 1 point
    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 )
  10. 1 point
  11. 1 point
    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.
  12. 1 point
  13. 1 point
    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.