Jump to content

All Activity

This stream auto-updates

  1. Yesterday
  2. Is there any form that i can try fix that in my local client? changing files, scripts, codes something like that? I know about the problem of the player's base, but my real problem its with original buildings from the GTA SA.
  3. Professional UI/UX Design Services Experienced UI/UX designer offering: - Creative and innovative solutions - Extensive industry experience - User-centric design focus - Close collaboration for tailored solutions Elevate your project aesthetics and functionality. Contact for a standout design. Portofolio: https://www.behance.net/zevy00 Contact: Discord - zevy00
  4. Due to personal reasons, I've had to discontinue the slaveMTA project. As a result, the following items are now up for sale: Complete original package Server API Discord bot linked to the server Maps and models The gamemode comprises: Advanced taxi meter (ability to set destinations on the map) Sophisticated drug system (cocaine and marijuana) Advanced drug trade system (NPCs across the map for drug sales; chance of rejection with a call to the police) Advanced counter (featuring GIF and PNG themes, 4 RGB patterns) Comprehensive dashboard (Account details, owned vehicles, lockers, advanced friends system with chat, emojis for messages, message editing, referral codes, penalty history, account settings, two-step verification, and more) Driver's license system (including theoretical and practical exams) Advanced inventory system (move items in and out, drop items for later pickup) Vehicle interaction HUD Stereo system with YouTube search (search and play songs directly from YouTube) Scoreboard Bus stops Faction panel Expanded factions Gas stations Dealerships Advanced ATMs Detailed job system (with charts) Advanced login panel Custom F11 with GPS Radar with GPS Mechanic Tuner Vehicle market (multiple types) Storage Advanced custom paintjob system (smooth RGB) Extensive vehicle customization options 4 complex jobs with cooperative mode (warehouse worker, security, courier, lawnmowers) Screenshots of the resources Gamemode presentation: Link The buyer also receives the graphical design project for the server created by me. There's an option to customize the graphics with your own name and color scheme, as well as an option to develop scripts along with graphics for an additional fee. Price: $200 (The gamemode is written in Polish, but I can translate it into English for a small fee.)
  5. Thank you. OK ok im gonna try that
  6. Olá e boa tarde! Sou Mapper no MTA a um tempo e comecei a explorar um mundo de criação de efeitos por script na plataforma, eu já tenho o script pronto e tudo certinho, só que eu estou tentando criar o efeito daquela poça de sangue de quando o personagem de ID 0 morre, aparece embaixo dele, porém eu não sei aonde eu acho o ID ou nome desta poça de sangue, alguém pode me ajudar?
  7. lima

    velocimeter

    I'm trying to put this dxDrawImageSection to work according to the speedometer but it's giving an error when loading the image. Could someone help me put the image to interact with the speedometer? local screen = {guiGetScreenSize ()} local resolution = {1366, 768} local scale = math.min (0.75, math.max ((screen[2] / resolution[2]), 2)) addEventHandler("onClientResourceStart", resourceRoot, function() loadSVG() end) local bollX, bollY = (screen[1] - (scale * 152)), (screen[2] - (scale * 254)) local bollTX, bollTY = (screen[1] - (scale * 183)), (screen[2] - (scale * 183)) local fuelX, fuelY = (screen[1] - (scale * 67)), (screen[2] - (scale * 67)) local textX, textY = (screen[1] - (scale * 35)), (screen[2] - (scale * 105)) local bollTTX, bollTTY = (screen[1] - (scale * 70)), (screen[2] - (scale * 60)) local font = dxCreateFont("assets/fonts/Medium.ttf", 17) addEventHandler ("onClientRender", root, function () local vehicle = getPedOccupiedVehicle(localPlayer) if not vehicle then return end local kmh = getElementSpeed(vehicle, 2) local maxVelocity = (getVehicleHandling(vehicle)["maxVelocity"]) local fuel = (getElementData(vehicle, "fuel") or 100) local motor = (getElementHealth(vehicle)) dxDrawImage(bollX - 108, bollY - 30, 280 * scale, 255 * scale, "assets/img/base.png") dxDrawImage(bollX - 10, bollY + 132 , 17 * scale, 17 * scale, "assets/img/dano.png") dxDrawImage(bollX - 39, bollY + 130 , 20 * scale, 19 * scale, "assets/img/fuel1.png") dxDrawImage(bollX + 12, bollY + 124 , 35 * scale, 35 * scale, "assets/img/lock.png") --setSVGOffset(1, -281) --createCircleStroke(1, 393 * scale, 393 * scale, 21) --drawItem(1, bollTX - 160, bollTY - 195, 200, tocolor(0, 224, 255, 255), false) --setSVGOffset(1, -281 +( maxVelocity*kmh)) dxDrawImageSection(bollTX + 72, bollTY + 120, 60 * ((getElementSpeed(vehicle,2,maxVelocity*kmh) or 100) / 100), 11, 0, 0, 60 * ((getElementSpeed(vehicle,2,maxVelocity*kmh) or 100) / 100), 11, 'assets/img/base2.png', 0, 0, 0, tocolor(255, 255, 255, alpha)) createCircleStroke(4, 50 * scale, 50 * scale, 2) drawItem(4, bollTTX - 115, bollTTY - 34, 200, tocolor(0, 224, 255, 255), false) setSVGOffset(4, (80/100*fuel)) createCircleStroke(6, 50 * scale, 50 * scale, 2) drawItem(6, bollTTX - 80, bollTTY - 34, 250, tocolor(0, 224, 255, 255), false) setSVGOffset(6, motor <= 100 and 0 or (7/150*motor)) kmh = math.floor(kmh) if (kmh == 0) then kmh = '00'..kmh elseif (kmh < 10) then kmh = '00'..kmh elseif (kmh < 100) then kmh = '0'..kmh end dxDrawText(kmh, textX - 143, textY - (90), ((textX - 143)+108), ((textY - (90))+72), tocolor(255, 255, 255, 75), 1.00, font, "center", "center", false, false, false, false, false) end) function getElementSpeed(theElement, unit) assert(isElement(theElement), "Bad argument 1 @ getElementSpeed (element expected, got " .. type(theElement) .. ")") local elementType = getElementType(theElement) assert(elementType == "player" or elementType == "ped" or elementType == "object" or elementType == "vehicle" or elementType == "projectile", "Invalid element type @ getElementSpeed (player/ped/object/vehicle/projectile expected, got " .. elementType .. ")") assert((unit == nil or type(unit) == "string" or type(unit) == "number") and (unit == nil or (tonumber(unit) and (tonumber(unit) == 0 or tonumber(unit) == 1 or tonumber(unit) == 2)) or unit == "m/s" or unit == "km/h" or unit == "mph"), "Bad argument 2 @ getElementSpeed (invalid speed unit)") unit = unit == nil and 0 or ((not tonumber(unit)) and unit or tonumber(unit)) local mult = (unit == 0 or unit == "m/s") and 50 or ((unit == 1 or unit == "km/h") and 180 or 111.84681456) return (Vector3(getElementVelocity(theElement)) * mult).length end
  8. well first you should add this code to the server side (i have a copy of the code i gave you long time ago for skinInventory) addSkinFromBox = function(player,model) -- after model add coins / money the player used to buy the box if he used if model ~= nil then local acc_name = getAccountName(getPlayerAccount(player)) local query = dbQuery(connection,"SELECT username,skin FROM skins WHERE username=? AND skin=? LIMIT 1",tostring(acc_name),tonumber(model)) local rez = dbPoll(query,-1) if #rez > 0 then outputChatBox("[SKIN_SYSTEM] You have this skin already!",player) -- if he pays with something give the player money back or coins or something else if you should give him. elseif #rez == 0 then -- if he doesnt have the skin update db and insert it to db! dbExec(connection,"INSERT INTO skins (username,skin) VALUES (?,?)",tostring(acc_name),tonumber(model)) outputChatBox("[SKIN_SYSTEM] You got a new Skin!",player,104,255,104) end end end Also If your inventory system script is in another folder you have to add this in the meta.xml where your skininventory resource is (not the inventory resource) <export function="addSkinFromBox" type="server"/> And in the inventory resource where is your openBox event or function use this call. exports["test"]:addSkinFromBox(player,model) -- between -> " " you put your resource name folder where your skinInventory scripts are for example my skin inventory resource is in test folder -- player -> you put the player variable or thePlayer or client it depends what variable you have in you inventory script. -- model -> the model variable or how it is named in your resource. AND if your inventory script is in the same folder with skinInventory script then you only add this in your openBox event or function! -> addSkinFromBox(player,model)
  9. I'm trying to put this dxDrawImageSection to work according to the speedometer but it's giving an error when loading the image. Could someone help me put the image to interact with the speedometer? local screen = {guiGetScreenSize ()} local resolution = {1366, 768} local scale = math.min (0.75, math.max ((screen[2] / resolution[2]), 2)) addEventHandler("onClientResourceStart", resourceRoot, function() loadSVG() end) local bollX, bollY = (screen[1] - (scale * 152)), (screen[2] - (scale * 254)) local bollTX, bollTY = (screen[1] - (scale * 183)), (screen[2] - (scale * 183)) local fuelX, fuelY = (screen[1] - (scale * 67)), (screen[2] - (scale * 67)) local textX, textY = (screen[1] - (scale * 35)), (screen[2] - (scale * 105)) local bollTTX, bollTTY = (screen[1] - (scale * 70)), (screen[2] - (scale * 60)) local font = dxCreateFont("assets/fonts/Medium.ttf", 17) addEventHandler ("onClientRender", root, function () local vehicle = getPedOccupiedVehicle(localPlayer) if not vehicle then return end local kmh = getElementSpeed(vehicle, 2) local maxVelocity = (getVehicleHandling(vehicle)["maxVelocity"]) local fuel = (getElementData(vehicle, "fuel") or 100) local motor = (getElementHealth(vehicle)) dxDrawImage(bollX - 108, bollY - 30, 280 * scale, 255 * scale, "assets/img/base.png") dxDrawImage(bollX - 10, bollY + 132 , 17 * scale, 17 * scale, "assets/img/dano.png") dxDrawImage(bollX - 39, bollY + 130 , 20 * scale, 19 * scale, "assets/img/fuel1.png") dxDrawImage(bollX + 12, bollY + 124 , 35 * scale, 35 * scale, "assets/img/lock.png") --setSVGOffset(1, -281) --createCircleStroke(1, 393 * scale, 393 * scale, 21) --drawItem(1, bollTX - 160, bollTY - 195, 200, tocolor(0, 224, 255, 255), false) --setSVGOffset(1, -281 +( maxVelocity*kmh)) dxDrawImageSection(bollTX + 72, bollTY + 120, 60 * ((getElementSpeed(vehicle,2,maxVelocity*kmh) or 100) / 100), 11, 0, 0, 60 * ((getElementSpeed(vehicle,2,maxVelocity*kmh) or 100) / 100), 11, 'assets/img/base2.png', 0, 0, 0, tocolor(255, 255, 255, alpha)) createCircleStroke(4, 50 * scale, 50 * scale, 2) drawItem(4, bollTTX - 115, bollTTY - 34, 200, tocolor(0, 224, 255, 255), false) setSVGOffset(4, (80/100*fuel)) createCircleStroke(6, 50 * scale, 50 * scale, 2) drawItem(6, bollTTX - 80, bollTTY - 34, 250, tocolor(0, 224, 255, 255), false) setSVGOffset(6, motor <= 100 and 0 or (7/150*motor)) kmh = math.floor(kmh) if (kmh == 0) then kmh = '00'..kmh elseif (kmh < 10) then kmh = '00'..kmh elseif (kmh < 100) then kmh = '0'..kmh end dxDrawText(kmh, textX - 143, textY - (90), ((textX - 143)+108), ((textY - (90))+72), tocolor(255, 255, 255, 75), 1.00, font, "center", "center", false, false, false, false, false) end) function getElementSpeed(theElement, unit) assert(isElement(theElement), "Bad argument 1 @ getElementSpeed (element expected, got " .. type(theElement) .. ")") local elementType = getElementType(theElement) assert(elementType == "player" or elementType == "ped" or elementType == "object" or elementType == "vehicle" or elementType == "projectile", "Invalid element type @ getElementSpeed (player/ped/object/vehicle/projectile expected, got " .. elementType .. ")") assert((unit == nil or type(unit) == "string" or type(unit) == "number") and (unit == nil or (tonumber(unit) and (tonumber(unit) == 0 or tonumber(unit) == 1 or tonumber(unit) == 2)) or unit == "m/s" or unit == "km/h" or unit == "mph"), "Bad argument 2 @ getElementSpeed (invalid speed unit)") unit = unit == nil and 0 or ((not tonumber(unit)) and unit or tonumber(unit)) local mult = (unit == 0 or unit == "m/s") and 50 or ((unit == 1 or unit == "km/h") and 180 or 111.84681456) return (Vector3(getElementVelocity(theElement)) * mult).length end
  10. Well, i want to achieve that with my inventory system (another script) opening a box gives you a skin and add it to the gridlist. I want to know how can I add a skin to that gridlist from another script so i can try to use it with my inventory.
  11. Ну бред же блин,мне стоит ожидать помощи или нет? @Erlkonig друг подскажи, просто чтобы поиграть в игру вспомнить те года, насладиться игрой..
  12. Yes you can add skins from another script with a command but how your command is looking or in which way you want to use that command to add skins?
  13. Use isso: addVehicleUpgrade removeVehicleUpgrade
  14. Meu nome é Rabbit e eu te apresento a Warp Store, uma plataforma revolucionária que permite monetizar seu servidor e entregar produtos de forma automática. Por exemplo, você pode criar um sistema de VIP que requer um grupo ou um elementData para ser ativado. Com a Warp Store, quando um jogador comprar um produto, ele receberá automaticamente assim que o banco confirmar o pagamento. Quer saber mais? Acesse warpstore.app para obter mais informações! Discord: https://discord.gg/VgUF67Rucd
  15. Last week
  16. Estou querendo abrir um servidor de corrida de carros com isso gostaria de fazer um sistema de tunagem de veiculos igual a GTA 5, aonde a sua aparencia é customizavel como parachoque, capo, spoiler, entre outros acessorios q os carros possuem, porem não sei como eu poderia tomar um rumo para conseguir fazer um sistema desse, o que deveria ser utilizado para que isso funcionasse e que seja compativeis na visão de todos os players.
  17. Robiv1

    hud move

    Hello, how can I solve the fact that the hud moves slightly in the opposite direction when turning to the right or left? and that if I press the gas it jumps off, then when I brake it goes back to its place and adds to the position of the hud?
  18. Works like a charm, thank you, problem solved! But I think it should be ultimately divided by line thickness instead of multiplied - at least that's how I got these calculations right. If anyone wondering: dxDrawMaterialSectionLine3D(x, y, z, x, y, liftZ + liftHeight, 0, 0, 16, ((64 * ((z - liftZ) + liftHeight)) / (64 / 16)) / 0.1, misc.chainTexture, 0.1)
  19. Hello there! thanks for visiting my post. Some of you helped me a lot a few months ago with a skin save list using database. Today, this post is to ask you if its possible to add skins to that list from another script, for example using a command from another external script. This is the code i'm using; Server side function myskins(thePlayer,commandName) if thePlayer then local acc = getPlayerAccount( thePlayer ) local acc_name = getAccountName( acc ) local q = dbQuery(connection,"SELECT username,skin FROM skins WHERE username=?",tostring(acc_name)) local rezult = dbPoll(q,-1) if #rezult > 0 then triggerClientEvent(thePlayer,"skin_inventory",thePlayer,rezult) end end end addCommandHandler("myskins",myskins,false,false) addEvent("ChangeSkin",true) change_skin = function(Player,skin) if source == Player and client == source then setElementModel(Player,skin) end end addEventHandler("ChangeSkin",getRootElement(),change_skin) Client side function centerWindow (center_window) local screenW, screenH = guiGetScreenSize() local windowW, windowH = guiGetSize(center_window, false) local x, y = (screenW - windowW) /2,(screenH - windowH) /2 return guiSetPosition(center_window, x, y, false) end addEvent("skin_inventory",true) function skin_inventory_gui(rezult) skin_list = guiCreateWindow(329, 246, 465, 381, "MY SKINS", false) centerWindow(skin_list) guiWindowSetMovable(skin_list, false) guiWindowSetSizable(skin_list, false) skins = guiCreateGridList(9, 20, 376, 351, false, skin_list) guiGridListAddColumn(skins, "Description", 0.5) guiGridListAddColumn(skins, "Model/Skin Owned", 0.5) close = guiCreateButton(389, 20, 66, 21, "X", false, skin_list) set_skin = guiCreateButton(389, 40, 66, 21, "SET SKIN", false, skin_list) guiSetProperty(close, "NormalTextColour", "FFAAAAAA") showCursor(true) for key, value in ipairs(rezult) do local row = guiGridListAddRow(skins) guiGridListSetItemText (skins, row, 1, "Skin Model ->", false, true) guiGridListSetItemText (skins, row, 2, value.skin, false, true) end addEventHandler ( "onClientGUIClick", close, closeinventory,false) addEventHandler ( "onClientGUIClick", set_skin, closeinventory,false) end addEventHandler("skin_inventory",root,skin_inventory_gui) closeinventory = function(button,state) if (button == "left") and (state == "up") then if source == set_skin then if (guiGridListGetSelectedItem (skins)) then local skin_to_change = guiGridListGetItemText (skins, guiGridListGetSelectedItem (skins), 2) triggerServerEvent("ChangeSkin",localPlayer,localPlayer,skin_to_change) outputChatBox("[SKIN SYSTEM] You have changed your skin",160,255,160) end end showCursor (false) guiSetVisible(skin_list,false) end end
  20. To achieve the desired result, you need to calculate the chain length, for example, with getDistanceBetweenPoints3D. In the dxDrawMaterialSectionLine3D function, the U Section Size needs to be the same as the texture width (16), and the V Section Size needs to be the texture height (64). However, this alone does not yield the desired results. You also need to multiply the V Section Size with the calculated chain length, divide by the texture aspect ratio (in your case, 64/16) and finally, multiply by the line thickness ("width"). I recommend to create a helper drawing function for this, with arguments: start position, end position, chain thickness.
  21. The answer to this problem is quite simple: lack of LOD's. Try creating a bug tracker on that server or ask their staff for guidance on reporting bugs. Chances are they're already aware of the issue, but with servers like the one you're playing on, where game organizations can request base mappings, it may not be feasible to have players include a LOD mapping in their mapping request. When an object has no LOD set for it, then a player must be at least 300 units (meters) away before it will load. It's usually a lot less, 100 units or so. With a LOD assigned, the low detail variant will load 5 times further away, so if the normal distance is 100 then the low detail variant will load 500 units away
  22. Hello everybody! Since I started playing MTA:SA again a few months ago, I've been having a problem with the texture/draw distance loading time, things only appear and render when I'm very close to them and I wanted some way to fix/improve this so that I can see certain things from afar. > Here are somes examples of what this looks like in game, I turned on the option for a desert grass mod to make it easier to see https://imgur.com/a/jBeXnY0 > In this see how the buildings are in low texture and look better as I get closer. https://imgur.com/a9lyJt2 my settings that i use in game & pc https://imgur.com/a/VQnri0G https://imgur.com/a/muG0zN8
  23. Hello, I'm trying to achieve something like this: But it's an object and I need a 3D line looking similar to that. Got no clue how to draw a 3D line without stretching the texture (or if it's even possible, but I don't think it's not). My latest attempt code and result: misc.chainTexture = dxCreateTexture(download.getAssetId("asset/texture/Chain.dds"), "dxt5", false, "mirror") -- Lifts chains for i = 1, #misc.liftData do if(isElementStreamedIn(misc.liftData[i]["cranesObject"]) == true or isElementStreamedIn(misc.liftData[i]["liftObject"]) == true) then local cranesVerticalOffset = 2.9499983787537 local liftHeight = 2.7499985694885 local _, _, liftZ = getElementPosition(misc.liftData[i]["liftObject"]) local x, y, z = utils.getPositionFromElementOffset(misc.liftData[i]["cranesObject"], -1.2499998807907, -0.049999993294477, cranesVerticalOffset) dxDrawMaterialSectionLine3D(x, y, z, x, y, liftZ + liftHeight, 0, 0, 1, 1, misc.chainTexture, 0.1) x, y, z = utils.getPositionFromElementOffset(misc.liftData[i]["cranesObject"], 1.1499999761581, -0.049999993294477, cranesVerticalOffset) -- second chain will go there, eventually end end Texture: Result: Couldn't find any script doing anything similar, don't know even where to start - if I messed up texture creation, or dxDraw function, or both (most likely the last). Tried dxDrawMaterialLine3D either - similar effect, a little better, though I'm not sure what I really did with the dxDrawMaterialSectionLine3D just tried to do anything from example code from documentation. Thanks!
  24. Hello, thanks for entering my post. I have a question... Is it possible to create a bind system that when pressing, for example, the "X" key repeatedly, different animations are played? I give an example: I press the "X" key for the first time, doing so plays a dance animation. Then I press the "X" again for the second time and doing so plays the vomiting animation. And so on.
  25. Winter Hello, as winter is approaching, I thought I would share one of my scripts. This script replaces the textures of summer in San Andreas with snow textures. The script is very lightweight because, instead of using .txd files, I used images. In San Andreas, there are many duplicated textures that are equal, but with different file names. To address this, I hashed every image in the game and deleted the duplicates. As a result, the images only occupy 142MB instead of gigabytes. Download: https://github.com/paksisoma/mta-winter
  26. The most common reason is that you do not have a connected database.
  1. Load more activity
×
×
  • Create New...