Leaderboard
Popular Content
Showing content with the highest reputation on 01/08/19 in all areas
-
If you're having issues with models or are looking for help on how to achieve certain results, feel free to ask in here. Note: Please check the Guide section before asking questions in here. Frequently Asked Questions on GTA modding the FAQ is on 3DS Max, though can be applied for various app's Lighting and Shading #1 Why can't I change the smoothing of my model? Your model contains duplicate vertices - this is a typical issue within GTA importers. They tend to break the vertices/split the edges on import, requiring to be welded. View the spoiler for a potential fix. #2 My map model is overexposed in day and night time. Your model lacks vertex color and illumination respectively. The GTA engine uses vertex color information to define lighting which is baked into the model. View spoiler for a potential fix. #3 Why is my Infernus model so bright? GTA engine calculates brightness of vehicles based on map objects collision brightness (that it's standing on) and the vehicle surface properties. View the spoiler for a potential fix. #4 My striped Bullet has different brightness for primary and secondary colors. GTA engine uses different lighting techniques for vehicles than map objects. Some of which are specular lighting, which in short brings a fake highlight onto the vehicle surface, illuminating it. View spoiler for a potential fix. Modeling #5 Certain polygons are not visible ingame, but looks fine on 3D editor. GTA engine among most other game engines uses backface culling, which kills the faces that are not facing/are blocked by ones facing the camera. This procedure is done to save memory. View the spoiler for a potential fix. #6 Can I make scissor doors for my vehicle without requiring scripts? It is possible to modify how vehicle doors appear in their open phase. It involves changing the rotations of dummies and their children objects, the doors. View the spoiler for a potential method. #7 How does vehicle reflections and chrome work? GTA vehicles uses 2 UV channels; first for diffuse, second for env and chrome mapping. If the secondary UV channel is not unwrapped properly, the env/chrome will either not work or flashes too often. View the spoiler for a potential method. #8 I can see through my vehicle chassis when looking at the police decals, why is that? Materials that are responsible for alpha needs to be last in the multimaterial list. If this is not done, textures like police decals will not render parts of the vehicle behind the alpha. View the spoiler for a potential fix. #9 How do I make a vehicle paintable? GTA SA requires models to have a certain colorcoded material applied to the surface of vehicles that needs to be paintable. It also needs (optionally if using textures) a texture that is not black. As anything that isn't black will be. If parts of the texture is grey, the color ingame will look sort of dirty or old. View the spoiler for a method. Miscellaneous #10 I have imported des_sherrifsgn1.dff into 3ds and extracted the textures into a folder, but they aren't displayed. It is not enough to extract the images, you'll have to tell the program where your textures are stored for it to apply them on the model. View the spoiler for a potential solution. #11 I want to remove Wuzimu's glasses and export it to my game. How do I do this? You're going to need a GTA formats importer. I prefer Kam's vanilla tools for skins due to its decent support for bones and skinned models. View the spoiler for a potential method. #12 What file types are worth to know about? GTA has many, many file types, and a lot of them are not natively available in MTA unless you modify your server's anti-cheat system to allow locally custom data files etcetera. So if we're going with MTA friendly files, there are a few. View the spoiler. #13 Where do I find shared vehicle textures, and what's each their use? You can locate the .txd for shared textures in GTA SA dir\models\generic\vehicle.txd. It stores textures which are used for SA vehicle lights, lighting and many more textures, which are used across hundreds of vehicles. As these textures are found in your local files, none of them are required to be added to custom vehicle .txd files, making for potentially very low file sizes. View the spoiler for a full list. #14 I have downscaled my model, but in-game it remains the same size as before. If your model's scale values says something like 76,144, 76,144, 76,144, it will reset to 100, 100, 100 on export. To correct this, go to Utilities panel, click Reset xForm, Reset selected, then right click the modifier and collapse to. Now your model will have its new scale applied. #15 I have converted a Counterstrike map and turned the main mesh into a collision which is 250kb. I am getting invisible walls, why is that? GTA has a very low polycount limit in regards to collision models. Not to be confused with collision primitive models, which are spheres or boxes, but the CM itself. If it is above or around 5000 (needs additional sources...) polygons, issues will occur, such as invisible walls or as if there's a large box blocking the entire model off. Another culprit for collision issues is the pivot point and position that the collision is exported at. You need to set the collisions to 0, 0, 0 and pivot point needs to resemble that of the main model, otherwise they will not line up properly. #16 My character movement is bugging on custom modeled stairs. GTA III, VC and SA do not have support for advanced staircase collisions, and so they require a different approach, which is a planar ramp or slope if you will. This may not look very good when the character steps on the stairs, however it is the most performance and bug-less method around. **Please feel free to contribute to the FAQ by leaving a comment here or through PM. It will be greatly appreciated.** little note for colors #B8E0B6 #4A4A4A1 point
-
1 point
-
1) local xml = xmlLoadFile("file.xml") -- your file name local children = xmlNodeGetChildren(xml) if children then for i, v in ipairs(children) do local name = xmlNodeGetName(v) if (name == "Admin" or name == "Otvet") then xmlDestroyNode(v) xmlSaveFile(xml) xmlUnloadFile(xml) return true end end end 2) local xml = xmlLoadFile("file.xml") local child = xmlCreateChild(xml, "report") xmlNodeSetAttribute(child, "vreamya", "1") xmlNodeSetAttribute(child, "Name", "2") xmlNodeSetAttribute(child, "Jaloba", "3") xmlSaveFile(xml) xmlUnloadFile(xml)1 point
-
É uma função útil que retorna o jogador que tenha um nick contendo tal string. Ela é útil quando você quer obter um jogador por comando mas não quer digitar o nome exato do jogador. Exemplo: function qualquerCoisa (thePlayer, cmd, nick) if (nick) then local jogador = getPlayerFromPartialName (nick) if (jogador) then outputChatBox ("Jogador encontrado tem nome: "..getPlayerName (jogador)) else outputChatBox ("Não foi encontrado nenhum jogador contendo '"..nick.."' no nick.") end end end addCommandHandler ("procurar", qualquerCoisa) -- Teste com /procurar SeuNick Ela faz o mesmo que o getPlayerFromName. Mas o getPlayerFromName só funciona se o nick informado for exatamente igual ao do jogador, incluindo os códigos de cores. Já o getPlayerFromPartialName funciona com uma parte do nick. -- Se por exemplo o seu nick for #00ff00Giovany, teremos os resultados: getPlayerFromName ("Giovany") -- False, não foi encontrado nenhum jogador. getPlayerFromPartialName ("Giovany") -- PlayerElement, foi encontrado o jogador. getPlayerFromName ("#00ff00Giovany") -- PlayerElement, foi encontrado o jogador. getPlayerFromPartialName ("#00ff00Giovany") -- PlayerElement, foi encontrado o jogador.1 point
-
Ele está dizendo que tentou usar uma função exportada do resource ex_system, mas esse resource está desligado ou inexistente.1 point
-
Só pra complementar a resposta do Lord: addCommandHandler ("rights", function (thePlayer, cmd) if (getAccountData (getPlayerAccount (thePlayer), "Reporter.level") == 4) then -- Se o jogador tiver a accountData Reportar.level 4, então: outputChatBox ("Eu "..getPlayerName (thePlayer).." Sou o líder do grupo reporter!", root) else outputChatBox ("Error! Tente novamente!", thePlayer, 255, 30, 30) end end) EDIT: Em relação aos comandos é bem simples, função útil: function getPlayerFromPartialName(name) local name = name and name:gsub("#%x%x%x%x%x%x", ""):lower() or nil if name then for _, player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end Se tiver dúvidas fique a vontade em perguntar.1 point
-
1 point
-
1 point
-
Eu faria com setAccountData. Salvando tipo assim: setAccountData (acc, "Reporter.level", 4) -- Líder setAccountData (acc, "Reporter.level", 3) -- Sub-Líder setAccountData (acc, "Reporter.level", 2) -- Repórter setAccountData (acc, "Reporter.level", 1) -- Temporário E depois quando o cara logar, verificar essa data com getAccountData. Dependendo do número salvo na conta, ele vai ter determinado acesso aos comandos.1 point
-
السلام عليكم ورحمة الله و بركاته طبعاً معظم الناس مش فكراني والباقي مش عارفني انا كازانوفا مصمم اوبجت dff,txd,col اي model تفكر فيه بصممه و صاحب سيرفر Gta Egypt Team الاصلي القديم كنت انا و عصفورة و تايجر و اعتزلت و رجعت لهدف معين يعني الموفجأة هي :- اي اوبجكت محتاجة لسيرفرك اكتبه في كومنت و هصممهولك و من غير اي مقابل طبعا في ناس هتقول نصاب و كذاب و الكلام دا بس الناس القديمة الهنا و اصحاب السيرفرات القديمة عرفني كويس1 point
-
You could use variables for such matter. Add a command that sets a variable to true and check for it when you render your DX function. for example: status = true -- when you enter X command if (status) then -- when you render your DX function -- your DX code end1 point
-
-- # Server function staffsonlyy ( player ) local accname = getAccountName ( getPlayerAccount ( player ) ) if ( isObjectInACLGroup ( "user." .. ( accname ) , aclGetGroup ( "Admin" ) ) ) then triggerClientEvent ( player , "speakeronlystaffs" , player ) end end -- # Client function openOrCloseGUI ( ) if ( guiGetVisible ( mainWindow ) ) then guiSetVisible ( mainWindow , false ) guiSetVisible ( linkWindow , false ) showCursor ( false ) else guiSetVisible ( mainWindow , true ) showCursor ( true ) end end addEvent ( "speakeronlystaffs" , true ) addEventHandler ( "speakeronlystaffs" , root , openOrCloseGUI ) addCommandHandler ( "speaker" , openOrCloseGUI ) bindKey ( openKey , "down" , openOrCloseGUI )1 point
-
Movido para Portuguese / Português > Programação em Lua Lembre-se de postar no local correto @NeoGM1 point
-
Essa sua função getPlayerFromID está errada. Não tem nada a ver com ID dos jogadores, apenas com o índice daquele loop. Dai é óbvio que não vai retornar o mesmo ID pro mesmo jogador. function getPlayerFromID (theID) if (tonumber (theID)) then theID = tonumber (theID) local players = getElementsByType ("player") for id, p in ipairs (players) do local accID = getAccountID (getPlayerAccount (p)) if (theID == accID) then return p end end return false else return false end end1 point
-
@NeoGM você está usando a o botão de page do fórum de maneira equivocada. Tome mais cuidado.1 point
-
Hello, just wanted to give a simple gift to many people who keep having a problem with the LS CityHall flag to either replace it, or delete it from the Map and make a new LS CityHall for MTA. or change the flag texture as the Map Editor doesn't detect it. the same as many other objects. so i am giving you a way to fix this problem. i can make a tutorial if you guys want on how to remove other undetected objects. Object name : LAcityhallTrans_LAn Object model : 4003 HOW TO : 1- go to the map file that has the CityHall Map usually at : C:\Program Files (x86)\MTA San Andreas 1.5\server\mods\deathmatch\resources\<MapName>\ 2- Enter the <MapName>.map file there with an editor like notepad ( there is only one file has an extension of *.map) 3- in the end of the file add this line : <removeWorldObject id="removeWorldObject (LAcityhallTrans_LAn) (1)" radius="96.110512" interior="0" model="4003" lodModel="4024" posX="1484.36389" posY="-1749.83789" posZ="30.61433" rotX="0" rotY="0" rotZ="0"></removeWorldObject> 4- if the map is already open in your local server, then please reopen the map <MapName> Enjoy1 point
-
A while ago we had published a release candidate build for the upcoming release for you folks to test. This phase went fine, so we feel that we are now ready to present you with the new stable version of the mod - Multi Theft Auto: San Andreas 1.5.3! Just like before, this is an update for our current stable version series - MTA:SA 1.5. Contrary to this definition, it is rather a huge update which contains mostly smaller changes, but makes up for it with the amount of them. A lot of effort was put by @Jusonex and @sbx320 into cleaning the code and reorganizing the build system, both of which should make it easier for us to maintain MTA:SA's code base and simplify the compilation procedure. However, during the above mentioned RC testing phase we decided to revert some of the code clean-up changes and leave them for a future release due to problems they were causing. We feel it will be better that way as some of these changes simply need more work as they affect a lot of the code base, making it harder to pinpoint other issues that might be discovered. In the meantime, @ccw and @darkdreamingdan had worked on fixing bugs reported by the community. We also had updated several dependencies (third-party components which are used in our mod), including a bunch of utility libraries (such as sqlite, zlib, libpng or libjpeg) and the CEF (Chromium Embedded Framework) components. The latter especially is an important change which we had explained further in a separate post and also summarized briefly below. This update will be slightly troublesome for some of our players who are still using Windows XP and Windows Vista (which is, to be honest, a rather small amount). Regular 1.5.3 build will not work for such users, so we had prepared a legacy build just for them. Furthermore, such users need to be prepared that at some point we might drop support for Windows XP and Windows Vista for our future releases. Please read this post to learn more about this change and its consequences. Since the build system was reorganized, a lot of smaller changes which were originally made for 1.6 were also introduced in this version (as long as they were not breaking the compatibility), making it actually one of the biggest releases we have ever made (and also sort of a bridge between 1.5 series and the then-upcoming 1.6 release). You can check the list below for some of the most interesting changes, but we really recommend checking full lists of changes to check whether the feature or function you have always wanted is already available in this release: Added support for German Steam version of GTA:SA (thanks to Lakota, Mario and @Sh4dowReturns for feedback) Improved streaming of low LOD objects and increased limits Multiple popular crashes were fixed Code cleanups and improved internal error logging MTA:SA will now try to use the native screen resolution when first launched Fixed desktop resolution when minimizing with fullscreen borderless window mode Added client resource files path info to Advanced tab in Options window Added icon for Windows server executable and digitally signed the CEFLauncher executable New scripting functions: canBrowserNavigateBack(), canBrowserNavigateForward(), navigateBrowserBack(), navigateBrowserForward() and reloadBrowserPage() (developed by mabako); createTrayNotification() and isTrayNotificationEnabled() (developed by Necktrox); also resizeBrowser(), fileGetPath(), setVehicleWindowOpen() and more... Tweaks to dbQuery()/dbExec(), fileRead(), addDebugHook() and more... Fixed setBrowserAudio() not muting the sound correctly on some websites e.g. YouTube Fixed setCameraTarget() calculation (thanks to lex128) setVehiclePlateText() now works with any kind of vehicle, including motorbikes (thanks to lopezloo) Added blend parameter for setPedAnimation() (thanks to lex128) Added support for objects and weapons in ped damage events (thanks to lopezloo) Water elements are now limited to a specific dimension Fixed sniper scope disappearing after killing a ped (thanks to lopezloo) Fixed MTA sometimes not loading custom textures Fixed MTA slowly updating position of attached elements Security and performance tweaks for CEF Fixed CEF popups (e.g. <select> boxes) not being rendered correctly Added option to block server admins who login with an unrecognized serial Added duplicate log line filter for script debugging Fixed a connecting player being able to block resources from starting Tweaked logic of client resource file validation Added server logging for redirectPlayer Tweaks for admin, missiontimer, race, runcode and webbrowser resources (thanks to Dutchman101, Einheit-101 and PhrozenByte) Added map backups for Map Editor and changed its default fps limiter setting value from 36 to 50 (thanks to AleksCore for the latter) Removed the no longer needed VS2008 redist package from the installer ...and much more! A complete list of changes can be found here (recommended read) and here (incomplete, from r7816 upwards). List of changes to the resource pack can be found here (starting from and including Feb 18, 2016 upwards). Please be advised that UltraThing and older versions of ENB series mods are blocked in MTA:SA 1.5.3 due to their incompatibility with the MTA:SA web browser components. If you want to use ENB mod in 1.5.3, please update it to a newer version if your current one does not work. If, on the other hand, you want to use UltraThing mod in 1.5.3, you will not be able to do it anymore - sorry for that just like above - please update it to a newer version (v0.29 or above). Want to download MTA:SA 1.5.3? Click here to download the build for Win 7+. Looking for a legacy build for XP/Vista? You can download it here. Or you can click here to go to our home page. Once there, click the Download button at the top center of the page, then choose your build and you are set. Linux server packages are also available. This version is backwards compatible with our older 1.5 releases, but we still encourage everyone to update their clients and servers ASAP to ensure, that they benefit from bugfixes, security updates for CEF, performance tweaks or other improvements. We would like to thank the following community members for their contributions to the MTA:SA source code, resources or feedback for this release: Aboshanab, AleksCore, braydondavis, Dutchman101, Einheit-101, Lakota, lex128, lopezloo, mabako, Mario, Necktrox, PhrozenByte, qaisjp, rafalh, @Sh4dowReturns, zneext (Have you contributed to MTA:SA 1.5.3's or 1.6's source code/resources pack but were not mentioned in the above list? PM @jhxp with a link to your contribution and you will be added) We hope that you will enjoy this release. Also, please keep in mind that if you encounter a bug or a problem which was not present in previous versions, you can report it to our bugtracker. --MTA Team1 point