Jump to content

Slim

Members
  • Posts

    96
  • Joined

  • Last visited

Everything posted by Slim

  1. In your .meta file, is the script this code is placed in server sided or client sided?
  2. I can do this for you add me on Skype [email protected]
  3. Seems like a lot of work. In one of my DM maps I replaced the textures of 1 tree, JUST 1 TREE. And almost every tree in the entire world started to get replaced. I then remembered my experience with 3DS Max, and what you name textures in the modeling program has a lot to do with this. Then discovered that I could use the SAME .TXD, to replace EVERY tree, to my knowledge at least, because I didn't try every tree, but I know I replaced tooooons of trees with the same .TXD file that's only 177 KB. I opened the GTA3.img. > Extracted the tree .TXD of my choice. > Opened TXD Workshop. > Extracted the .TXD as a .PNG. > Opened the .PNG in PhotoShop. > Changed the green foliage to blue. > Saved the .PNG > Went to TXD Workshop, imported the .PNG I had just made edited, so it replaced the default .TXD we extracted before from GTA3.img. > Saved the .TXD file > Imported to the game with a normal script. function resource_starts () txd3 = engineLoadTXD ( "3.txd" ) engineImportTXD ( txd3, 714 ) --Use the same .TXD to replace multiple objects in the world, and sometimes replacing 1 tree texture, will do 20 somehow. engineImportTXD ( txd3, 672 ) --Like I said it probably has something to do with the texture name they use in the modeling program. engineImportTXD ( txd3, 675 ) --But try using this example and see how far it gets you. end addEventHandler ( "onClientResourceStart", getRootElement(), resource_starts ) To cut file size you can also delete other images out of the .TXD files, if they're not being replaced with an edited version they'll stay default. Goodluck.
  4. Here's a server sided example: function ShowCountdown () local accountname = getAccountName ( getPlayerAccount ( player ) ) --Grabs the users account name if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "SuperModerator" ) ) then --Checks if the user account name's in the ACL group (SuperModerator). --You could put something here for when the timer starts. --Start of timer script setTimer ( function ( ) --You could put something here for when the timer ends. end ,10000, 1 --Timer runs for 1 minute, that's 60000 milliseconds. ) --End of timer script else --Checks for the opposit return of (if) events (AKA the account wasn't in the ACL group we checked for (SuperModerator). outputChatBox ( "You're not a smod, piss off!", player, 255, 12, 15 ) --If the account name's not in the ACL group we checked for, tell them to piss off! end end addCommandHandler ( "startcountdown", ShowCountdown ) --Attaches a command of your choice to the function above (ShowCountdown). REMEMBER, the (if) event above that checks accounts for ACL groups, can only be used server sided. Here's if you're using client sided: function ShowCountdown () --You could put something here for when the timer starts. setTimer ( function ( ) --You could put something here for when the timer ends. end ,60000, 1 --Timer runs for 1 minute, that's 60000 milliseconds. ) end addCommandHandler ( "startcountdown", ShowCountdown ) --Attaches a command of your choice to the function above (ShowCountdown). If you're not sure if your LUA file is server sided or client sided, go to the (meta.xml) file the folder of the LUA script, open it, and check if it says type="server" /> or type="client" /> Goodluck. Add me on Skype if you have any questions. [email protected]
  5. Funny you add this 1 day after we released ours.
  6. You'd be better off downloading the rectanglular radars availible on MTA resources and converting them to your own liking. When I first opened a server, I realized that if you find a circular radar based on a .PNG as the background, you can open it in a picture editing program. For example: Photoshop. Once that's done just delete everything, blackout the entire size of the rectangle, add 65% or so transparency, save, exit, add to MTA, start resource, and in-game nobody will notice, and if they do they care too much.. The functionalities you're looking for instead of a rectangular radar is probably nametag blips, colored blips, etc. Goodluck man
  7. Mmmmm did enough research and annoyed enough scripters to finally get it working. Thanks everybody.
  8. Forgot to mention: There's a really good chance that the working script my modeler friend made for me, only isn't working because of "GetElement". Plz help Example: With OutputChatbox, 2 of ways you can go, only your client gets the message, or the whole gets it. Or when you place a marker, the whole server can see it, or just your client. And like I said, this script applies the shader to every existing infernus instead of individual. I need someone to take a quick look at the script please, I'm almost sure it's a tiny fix... @CodyJ(L) remap_start = createMarker(2478, -1666, 14, "corona", 20, 255, 255, 0, 255) remap1_start = createMarker(2550, -1666, 14, "corona", 20, 255, 255, 0, 255) shader_stop = createMarker(2478, -1690, 14, "corona", 10, 255, 255, 0, 255) local shader = dxCreateShader("tex.fx") addEventHandler("onClientMarkerHit", getRootElement(), function(player, matching) if player ~= getLocalPlayer() then return end if not isPedInVehicle(player) then return end vehicle = getPedOccupiedVehicle(player) if source == remap_start then startremap() elseif source == remap1_start then startremap1() elseif source == shader_stop then stopshader() end end) function startremap() if shader then dxSetShaderValue(shader, "gTexture", dxCreateTexture("remap.png")) engineApplyShaderToWorldTexture(shader, "remap") end end function startremap1() if shader then dxSetShaderValue(shader, "gTexture", dxCreateTexture("remap1.png")) engineApplyShaderToWorldTexture(shader, "remap") end end function stopshader() engineRemoveShaderFromWorldTexture(shader, "remap") end
  9. Custom UV mapping is where the texture locates itself on your vehicle. The provided texture isn't gonna work with the provided infernus.dff and infernus.txd The script is apparently almost working but I've not managed yet Help me bro @CodyJ(L)
  10. Okay well for example: I wanna have zebra skin on my infernus while other infernus does not have it I got a modeler to make me a custom UV mapped infernus, and a little demo script, the best he could, of the shader apply script using links I gave him. But the problem is, what he made me, applies to every existing infernus in the GTA SA world, instead of individual infernus. Anybody willing to take a crack at this? Or does anyone know how to apply the shader to individial infernus successfully? If someone can give me this script, or fix the one provided, and wrap individual infernus with custom shader, I have scripters ready to implement the options for choosing skins. On Dutchmans release post, he mentions that the script is easy to work with... Someone plz help? Super helpful links: https://community.multitheftauto.com/index.php?p=resources&s=details&id=14436 https://forum.multitheftauto.com/topic/96136-rel-texture-replacement-shader-car-wraps-etc/ https://wiki.multitheftauto.com/wiki/EngineApplyShaderToWorldTexture https://forum.multitheftauto.com/topic/80564-adding-mutiple-skins-on-one-model/ https://forum.multitheftauto.com/topic/80796-solved-shader/
  11. Dude this script isn't even communicating with itself On debugscript 3 the F2 doesn't send anything to console or debugscripts I had a pro modeler create a UV mapped infernus for me today, had multiple scripters attempt to apply a shader using this script and ALL fail ):::: help me out bro I'll send you my UV mapped infernus just help me out. Logo's aren't a big thing for me I just want custom skins like Zebra, etc. I have scripters waiting to implement options just help me apply the skin bro plz
  12. Slim

    help nos color

    I'm not entirely sure but I'm pretty sure they're using a shader function with customized .dff and .txd files. While the nos color is a .fx file modification. Would have to ask certain members of the community who know modding very well.
  13. Slim

    help nos color

    The problem is that you're replacing a texture file And as far as I know without some keen scripts you can't replace textures server sided like that, probably because it'll cause lag, they haven't added this feature for easy access. For example: If you replace a texture on the infernus, everyone has to see it, and you have to see everyone with the texture also.
  14. I thank y'all @Hale @coNolel @IIYAMA @koragg You helped me make resolution scaling my bitch And to avoid free MTA resources that for some unworldy reason wouldn't have scaling codes in them Which is most of them
  15. I feel really close to understanding but sadly not yet
  16. The resolution for everything is offset unless I turn it up all the way. I dunno if the fix would b a complicated code or not, but if anybody can provide the small edit or helpful explanation I can re position everything myself sX,sY = guiGetScreenSize() function dxDrawLinedRectangle(posX,posY, sizeX,sizeY, color) dxDrawLine(posX,posY, posX,posY+sizeY, color) -- Izquierda dxDrawLine(posX,posY, posX+sizeX,posY, color) -- Arriba dxDrawLine(posX+sizeX,posY, posX+sizeX,posY+sizeY, color) -- Derecha dxDrawLine(posX,posY+sizeY, posX+sizeX,posY+sizeY, color) -- Abajo end function calculateScale() if sX <= 800 and sY <=600 then return 0.25 elseif sX<=1024 and sY <=768 then return 0.3 elseif sX<=1280 and sY <=720 then return 0.35 elseif sX<=1400 and sY <=900 then return 0.4 elseif sX<=1650 and sY <=1000 then return 0.45 else return 0.5 end end scale = calculateScale() raceInterface = { font = false, fontScale = 0, mapname = "", nextmap = "", fps = 0, spectators = 0, alpha = 0, tick = 0, state = false, positionX = sX, colors = {255,0,0}, timeleft = "0:00:00", timepassed = "0:00:00", mapInfo = { tick = 0, state = true, positionX = sX, timer = false, } } function renderMapinfoInterface() if getElementData(localPlayer,"loginState") then return end local tick = getTickCount() - raceInterface.mapInfo.tick local progress = math.min(tick/500,1) if raceInterface.mapInfo.state then raceInterface.mapInfo.positionX = interpolateBetween(raceInterface.mapInfo.positionX,0,0,sX*0.75,0,0,progress,"OutQuad") else raceInterface.mapInfo.positionX = interpolateBetween(raceInterface.mapInfo.positionX,0,0,sX,0,0,progress,"Linear") if progress == 1 then return end end local posX = raceInterface.mapInfo.positionX if g_MapInfo then local alpha = raceInterface.alpha/255 local red,green,blue = unpack(raceInterface.colors) local posY = sY*0.7 dxDrawRectangle(posX+200,posY-4,sX*0.22,sY*0.16,tocolor(0,0,0,100*alpha)) dxDrawLinedRectangle(posX+200,posY-4,sX*0.22,sY*0.16,tocolor(255,0,0)) dxDrawRectangle(posX+200,posY-4,sX*0.15,sY*0.03,tocolor(0,0,0)) dxDrawLinedRectangle(posX+200,posY-4,sX*0.15,sY*0.03,tocolor(255,0,0)) local mapname = g_MapInfo.name or "Undefinied" local author = g_MapInfo.author or "No author" local lastTime = g_MapInfo.lastTimePlayedText or "Never played yet!" local playedCount = g_MapInfo.playedCount or 0 local hunters = g_MapInfo.huntersReached or 0 local toptimes = g_MapInfo.toptimesReached or 0 local posX = posX+sX*0.035 dxDrawText(mapname..author,posX+140,posY-9,posX+sX*0.2,posY+sY*0.03,tocolor(255,0,0*alpha),raceInterface.fontScale*0.109,raceInterface.font,"left","Center",true,false,false,true) dxDrawText("#ff0000Author #ffffff- "..author,posX+139,posY+60,posX+sX*0.25,posY+sY*0.025,tocolor(red,green,blue,255*alpha),raceInterface.fontScale*0.1,raceInterface.font,"left","Center",true,false,false,true) local posY = posY+sY*0.025 dxDrawText("#ff0000Last time played #ffffff- "..lastTime,posX+139,posY+60,posX+sX*0.25,posY+sY*0.025,tocolor(red,green,blue,255*alpha),raceInterface.fontScale*0.1,raceInterface.font,"left","Center",true,false,false,true) local posY = posY+sY*0.025 dxDrawText("#ff0000Played count #ffffff- "..playedCount,posX+139,posY+60,posX+sX*0.25,posY+sY*0.025,tocolor(red,green,blue,255*alpha),raceInterface.fontScale*0.1,raceInterface.font,"left","Center",true,false,false,true) local posY = posY+sY*0.025 dxDrawText("#ff0000Hunters #ffffff- "..hunters,posX+139,posY+60,posX+sX*0.25,posY+sY*0.025,tocolor(red,green,blue,255*alpha),raceInterface.fontScale*0.1,raceInterface.font,"left","Center",true,false,false,true) local posY = posY+sY*0.025 dxDrawText("#ff0000Toptimes #ffffff- "..toptimes,posX+139,posY+60,posX+sX*0.25,posY+sY*0.025,tocolor(red,green,blue,255*alpha),raceInterface.fontScale*0.1,raceInterface.font,"left","Center",true,false,false,true) end end function toggleMapInfo() if isTimer(raceInterface.mapInfo.timer) then killTimer(raceInterface.mapInfo.timer) end if raceInterface.mapInfo.state then closeInfo() else openInfo() end end bindKey("f6","up",toggleMapInfo) function closeInfo() raceInterface.mapInfo.state = false raceInterface.mapInfo.tick = getTickCount() end function openInfo() raceInterface.mapInfo.state = true raceInterface.mapInfo.tick = getTickCount() end function openInfoByManager() openInfo() if isTimer(raceInterface.mapInfo.timer) then killTimer(raceInterface.mapInfo.timer) end raceInterface.mapInfo.timer = setTimer(closeInfo,7000,1) end 900x600: https://prnt.sc/faua1c I can't remember the resolution of this screenshot but I hope you get the point and it helps https://prnt.sc/fauiha The MPH is suppose to be offset I haven't finished positioning that yet. This is how it looks on my screen with max resolution https://prnt.sc/fav2oj https://prnt.sc/fav29a https://prnt.sc/favak2 The radar and speedometer are images. The rest is code generated. I'm using an older racemode made by Apple, maybe from 2013-2014-2015 i dunno. PLEASE somebody explain, inform me, teach me, provide me, with some sort of something ): I think most of the BS code is for the slide effect. I have a bad feeling this is hopeless.. I feel dumb but I'm sure this has happened to hundreds of people after they position stuff..
  17. Thanks bro. Anyone know how to make it fade in and out? function myFunction1() if isPedInVehicle(localPlayer) then -- Check if the player is in a vehicle local pVehicle = getPedOccupiedVehicle(localPlayer) if pVehicle and getVehicleUpgradeOnSlot(pVehicle, 8) then -- Check if the vehicle has nitrous added in it local fVelX, fVelY, fVelZ = getElementVelocity(pVehicle) if isVehicleNitroActivated(pVehicle) and fVelX ~= 0 and fVelY ~= 0 and fVelZ ~= 0 then -- Check if the nitro is activated and the vehicle is not moving destroyElement(arrowMarker1) destroyElement(arrowMarker2) destroyElement(arrowMarker3) destroyElement(arrowMarker4) destroyElement(arrowMarker5) destroyElement(arrowMarker6) end end end end addEventHandler("onClientRender", getRootElement(), myFunction1) bindKey("w", "up", myFunction1) function myFunction2() if isPedInVehicle(localPlayer) then -- Check if the player is in a vehicle local pVehicle = getPedOccupiedVehicle(localPlayer) if pVehicle and getVehicleUpgradeOnSlot(pVehicle, 8) then -- Check if the vehicle has nitrous added in it local fVelX, fVelY, fVelZ = getElementVelocity(pVehicle) if isVehicleNitroActivated(pVehicle) and fVelX ~= 0 and fVelY ~= 0 and fVelZ ~= 0 then -- Check if the nitro is activated and the vehicle is not moving arrowMarker1 = createMarker ( 0, 0, 0, "corona", 0.3, 255, 0, 0) -- Create the markers arrowMarker2 = createMarker ( 0, 0, 0, "corona", 0.3, 255, 0, 0) arrowMarker3 = createMarker ( 0, 0, 0, "corona", 0.3, 255, 0, 0) -- Create the markers arrowMarker4 = createMarker ( 0, 0, 0, "corona", 0.3, 255, 0, 0) arrowMarker5 = createMarker ( 0, 0, 0, "corona", 0.2, 255, 0, 0) -- Create the markers arrowMarker6 = createMarker ( 0, 0, 0, "corona", 0.2, 255, 0, 0) attachElements ( arrowMarker1, localPlayer, 0.2, -2.8, -0.2 ) -- Attach the marker to the player attachElements ( arrowMarker2, localPlayer, 0.8, -2.8, -0.2 ) attachElements ( arrowMarker3, localPlayer, 0.2, -2.9, -0.2 ) -- Attach the marker to the player attachElements ( arrowMarker4, localPlayer, 0.8, -2.9, -0.2 ) attachElements ( arrowMarker5, localPlayer, 0.2, -3, -0.2 ) -- Attach the marker to the player attachElements ( arrowMarker6, localPlayer, 0.8, -3, -0.2 ) end end end end addEventHandler("onClientRender", getRootElement(), myFunction2) bindKey("w", "down", myFunction2)
  18. I'm trying to get this script to work It works if I remove the key binding portion, but it's an example. This is non functioning but I tried Does anyone know why it won't detect the key press? Also could someone provide me the element code or whatever to make the markers visible to everyone instead of client sided?| Please and thank you bindKey("w","up", function resource_starts () destroyElement(arrowMarker1) destroyElement(arrowMarker2) destroyElement(arrowMarker3) destroyElement(arrowMarker4) destroyElement(arrowMarker5) destroyElement(arrowMarker6) end end addEventHandler ( "onClientResourceStart", getRootElement(), resource_starts ) bindKey("w","down", function explodeNitrousVehicle() if isPedInVehicle(localPlayer) then -- Check if the player is in a vehicle local pVehicle = getPedOccupiedVehicle(localPlayer) if pVehicle and getVehicleUpgradeOnSlot(pVehicle, then -- Check if the vehicle has nitrous added in it if isVehicleNitroActivated(pVehicle) then -- Check if the nitro is activated and the vehicle is not moving arrowMarker1 = createMarker ( 0, 0, 0, "corona", 0.3, 255, 0, 0) -- Create the markers arrowMarker2 = createMarker ( 0, 0, 0, "corona", 0.3, 255, 0, 0) arrowMarker3 = createMarker ( 0, 0, 0, "corona", 0.3, 255, 0, 0) -- Create the markers arrowMarker4 = createMarker ( 0, 0, 0, "corona", 0.3, 255, 0, 0) arrowMarker5 = createMarker ( 0, 0, 0, "corona", 0.2, 255, 0, 0) -- Create the markers arrowMarker6 = createMarker ( 0, 0, 0, "corona", 0.2, 255, 0, 0) attachElements ( arrowMarker1, localPlayer, 0.2, -2.8, -0.2 ) -- Attach the marker to the player attachElements ( arrowMarker2, localPlayer, 0.8, -2.8, -0.2 ) attachElements ( arrowMarker3, localPlayer, 0.2, -2.9, -0.2 ) -- Attach the marker to the player attachElements ( arrowMarker4, localPlayer, 0.8, -2.9, -0.2 ) attachElements ( arrowMarker5, localPlayer, 0.2, -3, -0.2 ) -- Attach the marker to the player attachElements ( arrowMarker6, localPlayer, 0.8, -3, -0.2 ) end end end end end addEventHandler("onClientRender", root, explodeNitrousVehicle) https://ibb.co/g0hxY5 https://ibb.co/ms8FLk
×
×
  • Create New...