Search the Community
Showing results for tags 'help'.
-
Let's talk script security. It might be a taboo topic for some but it shouldn't, at all. In fact, the more people talk about this and unite to discuss and create robust, safe and well-coded scripts, the better the MTA resource development community will be. Rules: Main article: https://wiki.multitheftauto.com/wiki/Script_security The key points are there, but the code examples don't suffice, and the implementations will vary depending on the gamemode and resources. Pinned information: Coming soon Notes: - I'm not perfect and everyone makes mistakes. Please correct me when I'm wrong. - Eventually if this becomes a popular topic, I am willing to incorporate translations of certain explanations into other languages in this OP, as I know a majority of the MTA community doesn't master the English language and prefers to communicate and read in other languages.
-
Good morning everyone. I wanted to show you a bug. I am using Parallels, a program to virtualize Windows on my MacBook Pro M1PRO. I was able to download the MTA, download GTA too. But when, I go to open the mta, it shows the GTA start screen and then crashes. I already installed the mta again, I tried many things. I want help please. This is the bug: Version = 1.5.9-release-21024.0.000 Time = Mon Nov 8 13:42:37 2021 Module = C:\WINDOWS\SYSTEM32\D3D9.DLL Code = 0xC000001D Offset = 0x0004DAA0 EAX=00000000 EBX=00000000 ECX=00000000 EDX=00000000 ESI=00000000 EDI=00000000 EBP=0577FA50 ESP=0577F38C EIP=718FDAA0 FLG=00000000 CS=3A643A64 DS=3A643A64 SS=3A643A64 ES=3A643A64 FS=3A643A64 GS=577F6B0
-
I don't know if this is the right place to post this but I cant upload my resource to the community resources page. My zip file size is 2.34 MB and it clearly says " Maximum upload size is 20 MB", any idea why?
-
Hello dear forum members, I am deeply interested in a persistent question regarding my shader for the effect of raindrops flowing down the sides of the car, as well as the effect of raindrops (spots) on the surface of the car (roof, bumper). I’ve been struggling with these issues for a long time and still can’t figure out how to solve my two problems. I hope someone can help me and explain to a beginner in HLSL how to properly implement the shader. The first problem is that I don’t understand how to make the raindrops flow down the different sides of the car. Essentially, I have a single texture applied to the car, and I can't figure out how to split it into multiple segments and adapt it to flow around the sides of the car. (I also need to account for the unique features of each car model so that the flow looks realistic on each vehicle.) The second problem is the effect of tiny raindrops on the roof, hood, and bumper of the car (the generation of small droplets that gradually appear and disappear). The issue is that I’m trying to apply both effects in one shader, but the problem is that either only one of them works under certain settings, or nothing works at all. I can't get both effects to work harmoniously together. I’ll also provide an example of the Lua script and the textures used for the shader. I really hope for your help. I've been spending too much time on this, and I can't seem to find a solution. float4x4 gWorld : WORLD; float4x4 gView : VIEW; float4x4 gProjection : PROJECTION; float gTime : TIME; // Rain parameters float gDropSpeed = 0.03; // Speed of droplet flow float2 noiseScale = float2(0.2, 0.8); // Noise texture scale float3 lightDirection = float3(1.0, 1.0, -1.0); // Light direction float gDropSpread = 0.3; // Droplet spread float gDropDepth = 0.3; // Droplet depth texture gTexture; // Main car texture texture texRain; // Raindrop texture texture texNormalRain; // Raindrop normals texture texNoise; // Noise texture // Variables for controlling the effect float gAlpha = 0.01; // Alpha channel for the car float rainAlpha = 1.8; // Alpha channel for raindrops sampler2D gTextureSampler = sampler_state { Texture = ( gTexture ); MinFilter = Linear; MagFilter = Linear; AddressU = Wrap; AddressV = Wrap; }; sampler2D texRainSampler = sampler_state { Texture = ( texRain ); MinFilter = Linear; MagFilter = Linear; AddressU = Wrap; AddressV = Wrap; }; sampler2D texNormalRainSampler = sampler_state { Texture = ( texNormalRain ); MinFilter = Linear; MagFilter = Linear; AddressU = Wrap; AddressV = Wrap; }; sampler2D texNoiseSampler = sampler_state { Texture = ( texNoise ); MinFilter = Linear; MagFilter = Linear; AddressU = Wrap; AddressV = Wrap; }; struct VertexShaderInput { float4 Position : POSITION; // Using standard POSITION semantics for the vertex shader float2 TextureCoordinate : TEXCOORD0; // Passing texture coordinates }; struct PixelShaderInput { float4 Position : POSITION; // Passing position as float4 for proper operation float3 WorldPos : TEXCOORD1; // Passing world coordinates for calculations float2 TextureCoordinate : TEXCOORD0; // Passing texture coordinates }; PixelShaderInput VertexShaderFunction(VertexShaderInput input) { PixelShaderInput output; // Position in world coordinates float4 worldPos = mul(input.Position, gWorld); // Storing position for further projection output.Position = mul(mul(input.Position, gWorld), gView); output.Position = mul(output.Position, gProjection); // Applying projection // Storing world coordinates (for droplet flow) output.WorldPos = worldPos.xyz; // Passing texture coordinates output.TextureCoordinate = input.TextureCoordinate; return output; } float4 PixelShaderFunction(PixelShaderInput output) : COLOR0 { float2 textureCoordinate = output.TextureCoordinate; // Main car texture float4 baseColor = tex2D(gTextureSampler, textureCoordinate); baseColor.rgb = max(baseColor.rgb, 0.1); // Brightening dark areas // Getting noise for random movement float noise = tex2D(texNoiseSampler, textureCoordinate * noiseScale).r; // World coordinates to determine droplet direction float3 worldPos = output.WorldPos; // Using world coordinates // Determining droplet direction based on normals and world position float3 normal = normalize(output.WorldPos); // Normal to the surface // Checking direction by normals to determine which side of the car we're on if (abs(normal.x) > abs(normal.y) && abs(normal.x) > abs(normal.z)) { // Side surfaces textureCoordinate.y += gDropSpeed * gTime; // Flowing down the sides } else if (normal.y > 0.5) { // Top surface (roof) textureCoordinate.y -= gDropSpeed * gTime; // Droplets flow down } else { // Other sides (front and back) textureCoordinate.x -= gDropSpeed * gTime; // Optionally add droplet flow forward/backward } // Reducing random offset for more precise flow float2 offset = gDropSpread * (noise * 4.0 - 0.5) * float2(1.0, 2.5); // Using float2 for offset textureCoordinate -= offset; // Applying deviation in both axes // Raindrop texture float4 rainColor = tex2D(texRainSampler, textureCoordinate); // Adjusting droplets to the car color rainColor.rgb = baseColor.rgb * 0.8 + float3(0.1, 0.1, 0.1); // Adding body tint to droplets rainColor.a = rainAlpha; // Alpha channel of droplets // Normals for droplets float4 tempRainNormal = tex2D(texNormalRainSampler, textureCoordinate); // Explicitly using float4 float3 rainNormal = normalize(tempRainNormal.rgb * 2.5 - 0.75); // Normalizing normals // Lighting on droplets float diffuse = saturate(dot(normalize(rainNormal), normalize(lightDirection))); // Correct lighting // Combining colors float4 finalColor = lerp(baseColor, rainColor, rainAlpha * diffuse); finalColor.a = lerp(gAlpha, rainAlpha, diffuse * 0.9); // Adding droplet depth finalColor.rgb += gDropDepth * 0.9; // Depth effect of droplets float3 v = float3(0.0, 0.0, 0.0); float Tr2 = gTime * 11000.0; float2 n = tex2D(texNoiseSampler, textureCoordinate * 0.5).rg; for (float r = 4.0; r > 0.0; r--) // Reducing the number of iterations { float2 x = 2100.0 * r * 0.015; float2 p = 6.28 * textureCoordinate * x + (n - 0.5) * 2.0; float4 d = tex2D(texNoiseSampler, round(textureCoordinate * x - 0.25) / x); float t = (sin(p.x) + sin(p.y)) * max(0.0, 1.0 - frac(Tr2 * (d.b + 0.1) + d.g) * 2.0); if (d.r < (2.0 - r) * 0.08 && t > 0.5) { v += normalize(float3(-cos(p.x), lerp(1.2, 2.0, t - 0.5), 0.0)); } } finalColor.rgb += v * rainAlpha; return finalColor; } technique Replace { pass P0 { DepthBias = -0.0001; AlphaBlendEnable = TRUE; SrcBlend = SRCALPHA; DestBlend = INVSRCALPHA; VertexShader = compile vs_1_1 VertexShaderFunction(); PixelShader = compile ps_3_0 PixelShaderFunction(); } } LUA CODE: local shader = dxCreateShader("fx/shader.fx", 2, 300, true, "vehicle"); local zapylyayushiesyaDetali = { "remap_body", }; local rainTexture = dxCreateTexture("assets/RainCar.png") local normalRainTexture = dxCreateTexture("assets/RainNormal.png") local noiseTexture = dxCreateTexture("assets/enbnoise.png") dxSetShaderValue(shader, "texRain", rainTexture) dxSetShaderValue(shader, "texNormalRain", normalRainTexture) dxSetShaderValue(shader, "texNoise", noiseTexture) -- Применение шейдера к машине local vehicle = getPedOccupiedVehicle(localPlayer) if vehicle then --engineApplyShaderToWorldTexture(shader, "vehiclegrunge256", vehicle) for _, name in ipairs(zapylyayushiesyaDetali) do engineRemoveShaderFromWorldTexture(shader, name, localPlayer.vehicle) engineApplyShaderToWorldTexture(shader, name, localPlayer.vehicle) end end renderTarget = dxCreateRenderTarget(512, 512, true) addEventHandler("onClientRender", root, function() iprint(shader) if shader then if renderTarget then dxSetRenderTarget(renderTarget, true) dxDrawImage(0, 0, 512, 512, shader) dxSetRenderTarget() dxDrawImage(50, 50, 256, 256, renderTarget) end end end)
-
- shader mta
- shader hlsl
-
(and 6 more)
Tagged with:
-
He creado una cuenta en un servidor hace algún tiempo y puse un correo que no existe (queria salir rápido del paso) eso se registró con mi serial y ahora a cada servidor que intento entrar y me creo una cuenta me dice que tengo que confirmar la cuenta con dicho serial . Sé que he cometido una gran estupidez pero no sabía que iba a escalar a tan gran problema necesito ayuda por favor si es posible borrar todo para yo comenzar de cero.
-
26.08.2024 меня заблокировали в МТА https://photos.google.com/photo/AF1QipODhzqME43MizxBNN5tqvdxR3bg0qvd0vfar_P- (ошибка которая появляется при входе на любой сервер МТА) пожалуйста помогите * Ваш серийный номер: 74430AC9354C3323A755FFA526169224
-
local Rotation = {vehicle:getComponentRotation("door_lr_ok")} vehicle:setComponentRotation("minigun", unpack(Rotation)) getVehicleComponentRotation I can find out the position of door_lr_dummy, but can I find out the rotation of door_lr_ok?
-
Hello, I am communicating with you through translit. Is there anything I can do to identify the status of Download Player? When it starts and when it finds ended.
-
This id generating login panel connects to various systems such as inventory. However, I'm unable to resolve the error in this login panel. https://hizliresim.com/etik01d function getIDFromPlayer(id) if id then local theid idTablo = getElementsByType("id") for id,p in pairs(idTablo) do if id == p then theid = i end end return theid else return false end end function getPlayerFromID(id) if id then id = tonumber(id) local theplayer idTablo = getElementsByType("id") for id,p in pairs(idTablo) do if theID == id then theplayer = p end end return theplayer else return false end end addEventHandler("onPlayerLogin", root, function(_,hesap) setElementData(source, "loggedin", true) setElementData(source,"TuningMenuTrue",false) local hesapID = getAccountID(hesap) if idTablo[hesapID] then -- The line where the error is indicated is here. ozelID = idTablo[hesapID] setElementID(source,ozelID) else setElementID(source,hesapID) end local oyuncu = (string.gsub(getPlayerName(source),"#%x%x%x%x%x%x","")) local id = getElementID(source) or "-1" end) addEventHandler("onResourceStart", resourceRoot, function() if id then id = tonumber(id) local theplayer idTablo = getElementsByType("id") for id,p in ipairs(getElementsByType("player")) do setElementData(player, "loggedin", not isGuestAccount(getPlayerAccount(player))) setElementData(player, "TuningMenuTrue", isGuestAccount(getPlayerAccount(player))) if getPlayerAccount(player) then local hesapID = getAccountID(getPlayerAccount(player)) if idTablo[hesapID] then ozelID = idTablo[hesapID] setElementID(player,ozelID) end end end end end)
- 7 replies
-
- help
- loginpanel
-
(and 1 more)
Tagged with:
-
a system like putting a gun in the trunk of a car, but instead of a car trunk, I want to be able to take and put a specified amount of guns from a chosen object or marker. If such a system exists, could you send it?
-
I deleted the game and reinstalled it and the problem was not solved. I renewed the files with the original files of the game and the problem still did not go away. https://hizliresim.com/2av5xsc Maps section also does not work. But I can do whatever I want with the command.
-
Timer not canceled after player dies. The player dies but does not appear to have left the area. That's why the rockets keep firing. sorry my english bad server g_base_col = createColCuboid(-381.27297973633, 1517.2098388672, -5.718826293945, 1600, 1600, 200.25) g_root = getRootElement () function hit ( pla, dim, hitElement ) if getElementType ( pla ) == "player" then local vehicle = getPedOccupiedVehicle ( pla ) if vehicle or vehicle then if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(pla)), aclGetGroup("roket")) then outputChatBox ( "Hoş Geldin Asker!, "..getPlayerName(pla).."!", pla, 0, 150, 0 ) else setElementData ( pla, "inRestrictedArea", "true" ) triggerClientEvent ( pla, "destroyTrepassor", g_root, pla ) outputChatBox ( "Askeri Bölge Derhal Uzaklaş!", pla, 255, 0, 0 ) outputChatBox ( "[Uyarı] Roket Saldırısı!", g_root, 255, 0, 0 ) end end end end addEventHandler ( "onColShapeHit", g_base_col, hit ) function leave ( pla, dim ) if getElementType ( pla ) == "player" then local vehicle = getPedOccupiedVehicle ( pla ) if vehicle or vehicle then if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(pla)), aclGetGroup("roket")) then outputChatBox ( "İyi Devriyeler Asker!", pla, 0, 100, 0 ) else setElementData ( pla, "inRestrictedArea", "false" ) triggerClientEvent ( pla, "destroyTimers", g_root, pla ) outputChatBox ( "[Uyarı] Roket Saldırısı Durdu!", g_root, 255, 0, 0 ) outputDebugString ( "*"..getPlayerName(pla).." has left col shape" ) end end end end addEventHandler ( "onColShapeLeave", g_base_col, leave ) client g_loc_pla = getLocalPlayer () g_loc_root = getRootElement () addEvent ( "destroyTrepassor", true ) addEventHandler ( "destroyTrepassor", g_loc_root, function () posX = -147.10989379883 posY = 2001.6342773438 posZ = 97.30118560791 posX2 = -135.48461914062 posY2 = 1652.8358154297 posZ2 = 97.30118560791 posX3 = 99.344902038574 posY3 = 2233.484375 posZ3 = 130.27871704102 posX4 = 478.35934448242 posY4 = 2160.7651367188 posZ4 = 97.30118560791 posX5 = 523.74835205078 posY5 = 1976.8087158203 posZ5 = 97.30118560791 posX6 = 448.73950195312 posY6 = 1715.9664306641 posZ6 = 97.30118560791 posX7 = 219.20726013184 posY7 = 1836.5458984375 posZ7 = 97.30118560791 posX8 = 188.45198059082 posY8 = 2081.4970703125 posZ8 = 97.30118560791 local isInResArea = getElementData ( g_loc_pla, "inRestrictedArea" ) rotZ = getPedRotation ( g_loc_pla ) if isInResArea == "true" then timer1 = setTimer ( createProjectile, 3000, 0, g_loc_pla, 20, posX, posY, posZ, 1.0, g_loc_pla, 0, 0, rotZ, 0.1, 0.1, 0.1 ) timer2 = setTimer ( createProjectile, 3000, 0, g_loc_pla, 20, posX2, posY2, posZ2, 1.0, g_loc_pla, 0, 0, rotZ, 0.1, 0.1, 0.1 ) timer3 = setTimer ( createProjectile, 3000, 0, g_loc_pla, 20, posX3, posY3, posZ3, 1.0, g_loc_pla, 0, 0, rotZ, 0.1, 0.1, 0.1 ) timer4 = setTimer ( createProjectile, 3000, 0, g_loc_pla, 20, posX4, posY4, posZ4, 1.0, g_loc_pla, 0, 0, rotZ, 0.1, 0.1, 0.1 ) timer5 = setTimer ( createProjectile, 3000, 0, g_loc_pla, 20, posX5, posY5, posZ5, 1.0, g_loc_pla, 0, 0, rotZ, 0.1, 0.1, 0.1 ) timer6 = setTimer ( createProjectile, 3000, 0, g_loc_pla, 20, posX6, posY6, posZ6, 1.0, g_loc_pla, 0, 0, rotZ, 0.1, 0.1, 0.1 ) timer7 = setTimer ( createProjectile, 3000, 0, g_loc_pla, 20, posX7, posY7, posZ7, 1.0, g_loc_pla, 0, 0, rotZ, 0.1, 0.1, 0.1 ) timer8 = setTimer ( createProjectile, 3000, 0, g_loc_pla, 20, posX8, posY8, posZ8, 1.0, g_loc_pla, 0, 0, rotZ, 0.1, 0.1, 0.1 ) end end ) addEvent ( "destroyTimers", true ) addEventHandler ( "destroyTimers", g_loc_root, function () local isInResArea = getElementData ( g_loc_pla, "inRestrictedArea" ) if isInResArea == "false" then killTimer ( timer1 ) killTimer ( timer2 ) killTimer ( timer3 ) killTimer ( timer4 ) killTimer ( timer5 ) killTimer ( timer6 ) killTimer ( timer7 ) killTimer ( timer8 ) end end )
-
Hello guys, I opened a server for friends just for fun in RPG mode. We decided to somehow add cars to custom IDs to have more cars available on the server. We use this script https://community.multitheftauto.com/index.php?p=resources&s=details&id=18598 to add these custom IDs. And now the question is, how can we make cars with custom IDs for private cars? We also using this package: https://mega.nz/file/7GoSnYgA#0ScDOge3vTYfF8c59NLroGrAWOhvgP0l23v7JaQvDOw We want to upload some of these cars with Custom ID to the server. I don't know how we can give them to a car dealer so that they can be purchased and kept as private ones. Thank you very much for all your help :D
-
I was trying to get a table of every skin and their correspondent voice (because I couldn't find them), but while I was trying to print it, FileWrite only writes the first line. Technically, the idea is that each second the game changes the player skin (as I couldn't manage to create a ped and retrieve a voice), and gets the skin id, and voice ids, and prints it, giving a nice table with all of them: addCommandHandler ( "gv", function () local localFile = fileCreate("test.csv") fileWrite(localFile, "PEDMODEL, VOICETYPE, VOICENAME;") local i = 0 setTimer(function () setElementModel(localPlayer, i) local voiceType, voiceName = getPedVoice(localPlayer) fileWrite(localFile, tostring(i)..", "..tostring(voiceType)..", "..tostring(voiceName)..";") i = i + 1 end, 1000, 10) fileClose(localFile) end )
-
I haven't tested it as I dont have a model available right now, but would it be possible to load a ped or a car with engineRequestModel, get the ID with getElementID, then replace it to whatever with engineSetModelTXDID? For example, let's say we wanted to add Tommy Vercetti to the game, and assign him ID 313 (I think that's the first free ID), would it be possible to create a tommy element, get its id, then change it to 313? (and ofc destroy the element afterwards) If this is possible, how cars and peds created this way can have sounds? Can I somehow load ped voices from vice city so we can have the "official teta inspector" line in game?
-
Hello, I have a problem when logging in. I try to see if the hashed password in the database is the same as the one entered by the player for the password, so I check if the password is correct. But even if you enter a good password and the two passwords are the same, the system always says that the password is incorrect. Can you help? addEvent("login", true) addEventHandler("login", root, function (user, pass) local serial = getPlayerSerial(client) local dq = dbQuery(db, "SELECT * FROM accounts WHERE serial=?", serial) local result = dbPoll(dq, 250) if (#result > 0) then outputChatBox(pass) local Pass = hash("sha512", pass) outputChatBox(Pass) if user == result[1]["username"] then if Pass == result[1]["password"] then print("Sikeres bejelentkezés!") else print("Hibás jelszó!") end else print("Felhasználónév nem található!") end else print("Sikertelen bejelentkezés!") end end )
- 15 replies
-
English - Ingles: Greetings, I am new to MTA and I started playing MTA thanks to some friends who invited me to play, we played a first server and when I tried to create my account it told me that there was already an account created in this series, I didn't give it importance, I talked to the server administrators and they changed the gmail of the account they had for one of mine, after a few days we played on another server and it happened and they gave me the same message "there is already an account created in this series or something like that" so I talked to the server administrators were more strict and said that I couldn't do anything, that I needed to buy another storage for my PC and that my PC is new, it seemed strange to me and we went to another server and the same message came out 'there is already a account created in this serial'' so I came here to MTA technical support I created an account and here we are, I want you to help me here I leave my serial number that appears in F8: 3AB7D7403109925463BAF0536D7B96A1 Español - Spanish: Saludos, soy nuevo en MTA y empeze a jugar MTA gracias a unos amigos que me invitaron a jugar, jugamos un primer server y al intentar crear mi cuenta me decia que ya habia una cuenta creada en esta serial, no le di importancia hable con los adminsitradores del servidor y cambiaron el gmail de la cuenta que habia por una mia, luego de unos dias jugamos a otro server y sucedio y me dio el mismo mensaje ''ya hay una cuenta creada en esta serial o algo asi'' entonces hable con los administradores del server y eran mas estrictos y dijieron que no podria hacer nada, que necesitaba comprar otro almacenamiento para mi PC y eso que mi PC es nueva, me parecio raro y fuimos a otro server y salio el mismo mensaje ''ya hay una cuenta creada en esta serial'' asi que vine aca a soporte tecnico de MTA me cree una cuenta y aca estamos, quiero que me ayuden aca les dejo mi serial que aparece en F8: 3AB7D7403109925463BAF0536D7B96A1
-
Hello! I have this code: client.lua: function clicksFunction(button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedElement) .... if isCursorInBox(x, y, 20, 20) then triggerServerEvent("serverEventName", resourceRoot, data) end .... end addEventHandler("onClientClick", getRootElement(), clickInTheFarms) server.lua: local inUseData = {} addEvent("serverEventName", true) addEventHandler("serverEventName", resourceRoot, function(data) if not inUseData[data[1]] then inUseData[data[1]] = {} end if inUseData[data[1]] and inUseData[data[1]][data[2]] == true then return end inUseData[data[1]][data[2]] = true --some more code here to do things end) My problem is when two player clicks on client side, and triggering server event in the exact same time, then the if inUseData[data[1]] and inUseData[data[1]][data[2]] == true then return end not blocking the code execution under this line. So they can run the "--some more code here to do things" in the same time, and I don't want to allow this. How can I solve this problem?
-
Hello everyone, i was wondering if there's a way to make some models exceptions on this code, that is supposed to delete all GTA default models but i need the ints to not be deleted so i want to know how can i make exceptions for some interior models.. addEventHandler("onResourceStart", resourceRoot, function() for i=550, 20000 do removeWorldModel(i, 10000, 0, 0, 0) setOcclusionsEnabled(false) end end)
-
Hello! I've been working with MTA team on implementing the ability to play custom IFP animations in MTA since a couple of months. Today, I want to notify you all that it's done after a lot work, this means you can create your own IFP animations in 3ds Max using Kam's script, play them in MTA:SA (not released yet) using Lua scripting functions. I've created my pull request on github which you can find here. Everything's pretty much done, but there's one problem, the pull request cannot be merged into the master branch because there's a lot of code to go through, this will make fixing bugs very difficult, so we'll need to test everything in every way possible before releasing. MTA used to have a lot of developers back in the days who designed the core of the software that we have today, I appreciate their work, and I'm forever grateful for their contribution. There are still a few developers from the MTA team and other old contributors who spends hours upon hours on making MTA better, and get literally nothing out of MTA for their work, but they still do it . My point is, MTA has potential, and together, we can make it better, not having enough time to test everything out is on the main reason why we still don't have this feature implemented into MTA's main branch, so I'm here to ask the community for help in testing this feature. There are so many gamemodes that can take advantage of this feature. We still have plenty of RP servers here, and they still keep increasing till this day. RP servers have almost everything they need, server developers keep trying their best to push the limits in order to have more realism, I honestly believe this will fix that problem, or at least improve it. Here are two video: What is IFP? IFP is the animation file format for GTA III, SA, and VC. Adding support for this file format will allow us to play any custom animation which are made for GTA:SA and GTA:VC. You can load as many IFP files you wish to, you can have hundreds of thousands of animations. Note: GTA III animations are not supported for now. How you can help: As much as everyone wants to have custom animations in MTA, I would love to see them as well. You can help by testing different IFP files, and report bugs on this thread. Download the new MTA:SA from here: https://ci.appveyor.com/api/buildjobs/67st54i25p8ge8is/artifacts/InstallFiles.zip Right-click on InstallFiles.zip, extract the files to some location on your computer, I usually extract them to my desktop. Download the resources from here: https://drive.google.com/file/d/1TIK0-M3CNFR_1Yjn6pjImrS7184SS8jS/view?usp=sharing Create a folder with name "resources" in InstallFiles\server\mods\deathmatch, and extract resources.zip to InstallFiles\server\mods\deathmatch\resources. Start your MTA:SA server from location: InstallFiles\server\MTA Server.exe, and then start the ifp test resource from console "start ifptest" Now launch MTA from InstallFiles\Multi Theft Auto.exe, join your server. Use keys 1, 2, 3, 4, or 5 to play the custom parkour animation from parkour.ifp in ifptest. How to report bugs? When you are playing custom animations, if something's not working the way it should be, or if MTA crashes then please fill this form and reply to this thread: IFP download link: (put the download link here for IFP, so I can download and test it myself) Description: (Explain what the bug is) Steps To Reproduce: (write the steps on how I can reproduce the bug myself) Example: IFP download link: https://www.website.com/gta4.ifp Description: When I play this animation named "CartWheel," I can't move for a while, and MTA crashes. Steps To Reproduce: 1. Load "gta4.ifp". 2. play animation named "CartWheel" using setPedAnimation. 3. MTA crashes. If you want to submit the bug report by PM on forum then feel free to do so. I've added the resource "ifptest" to show you how to play custom animations. You can check how I did it by checking InstallFiles\server\mods\deathmatch\resources\ifptest\client.lua. About the new Lua functions, quoting myself: "There are three new Lua functions added: // loads IFP with a custom block name ifp engineLoadIFP ( string ifp_file_path, string custom_block_name ) // this will replace an internal GTA animation with custom one, it's a light-weight operation, // don't worry too much about performance. Different peds can have different running, walking, // crouching, shooting, etc. animations all running simultaneously because we are not actually // replacing animation hierarchies, we are merely storing everything in std::map which is in // CClientPed. When an animation triggers, we get the ped by clump, and play the animation // we wish to play. setPedAnimation works a little different than this, but the idea is same. bool engineReplaceAnimation ( ped thePed, string block_name, string anim_name, string custom_block_name, string custom_anim_name ) // This will restore animation replaced using engineReplaceAnimation, if only 1 parameter // is provided which is ped, then it will restore all animations, if block name is also provided, // then it will restore animations of that block only, if animation name is provided as well, // it will restore that specific animation only. bool engineRestoreAnimation ( ped thePed [, string block_name, string anim_name ] ) " To add your own ifp file, just add this to meta.xml: <file src="YourIFPFileNameHere.ifp" /> then in client-side Lua script, you can do: local customIfp = engineLoadIFP ("YourIfpNameHere.ifp", "YourCustomBlockNameHere") setPedAnimation ( localPlayer, "YourCustomBlockNameHere", "YourCustomAnimationNameHere" ) If you have any questions, write them here.
- 12 replies
-
- 5
-
- animations
- testing
-
(and 1 more)
Tagged with: