Jump to content

Sr.black

Members
  • Posts

    33
  • Joined

  • Last visited

Everything posted by Sr.black

  1. Hello Please help me create a mod like this, or just tell me what I need to do Here is a video clip of the mod I want Can I do this in mta?
  2. local playerSelectedTarget local alpha = 255 local isChasing = false local chaseDuration = 10000 addEventHandler("onClientKey", root, function(key, state) if state and key == "1" and isElement(playerSelectedTarget) then startChasingPlayer() end end ) function startChasingPlayer() if not isChasing then isChasing = true setElementData(localPlayer, "Select", false) setPedAnimation(localPlayer, "ped", "run_player", -1, true, false, false) -- Change "run_player" to the animation name you want !!!!! setTimer(stopChasingPlayer, chaseDuration, 1) end end function stopChasingPlayer() isChasing = false setPedAnimation(localPlayer) end addEventHandler("onClientRender", root, function() if (getKeyState("mouse2") == true) then local x, y, z = getElementPosition(localPlayer) for k, target in ipairs(getElementsByType("player", root, true)) do if not (target == localPlayer) then local px, py, pz = getElementPosition(target) local distance = getDistanceBetweenPoints3D(px, py, pz, x, y, z) if playerSelectedTarget ~= localPlayer and (distance < 30) then playerSelectedTarget = target alpha = 255 setElementData(localPlayer, "Select", true) end end end if isElement(playerSelectedTarget) then local Px, Py, Pz = getCameraMatrix() local zhx, zhy, zhz = getPedBonePosition(playerSelectedTarget, 3) local dist = getDistanceBetweenPoints3D(Px, Py, Pz, zhx, zhy, zhz) if playerSelectedTarget ~= localPlayer and (dist < 30) then if (isLineOfSightClear(Px, Py, Pz, zhx, zhy, zhz, true, true, false, false, true, false, false, playerSelectedTarget)) then local sxx, syy = getScreenFromWorldPosition(zhx, zhy, zhz + 0.3) if sxx and syy then local size = 1300 / dist dxDrawImage(sxx - (size / 2), syy - (size / 4.5), size, size, "Effect/Select.webp", 0, 0, 0, tocolor(255, 255, 255, alpha), false) end end end end else if isElement(playerSelectedTarget) then alpha = 0 setElementData(localPlayer, "Select", false) end end if isChasing and isElement(playerSelectedTarget) then local px, py, pz = getElementPosition(localPlayer) local targetX, targetY, targetZ = getElementPosition(playerSelectedTarget) local angle = math.atan2(targetY - py, targetX - px) local speed = 0.1 local newX = px + math.cos(angle) * speed local newY = py + math.sin(angle) * speed setElementPosition(localPlayer, newX, newY, pz) end end )
  3. I fixed the code after a lot of trouble thanks for trying to help !
  4. Unfortunately I was not able to find the solution and I did not find the source of the solution If there is a solution you find appropriate If you want can you change the terms of the winner of the war? the team that kills the largest number in the war zone is the winner and the color of the winning team is determined for the four gangs in the war set the winning teams color area It may fix the problems I dont mind changing the code completely thank you Maybe it helps the code was like this before I added the Aztecas and Vagos gang with the Ballas and Grove street gangs createRadarArea(2222.30,-1840.5,330,230,0,255,0,150) createRadarArea(1856.90,-1339,200,300,138,43,226,150) local spam = true local groveAttack = true -- AttackPermission local ballasAttack = true -- AttackPermission local warTime = 5--وقت حرب العصابات local areaRestTime = 10 local allowedTeams = { "Grove Street", "Ballas" } local RadarAreas = { {"Grove Street", 1040, -1851, 12, 250, 270, 40, "Area1"}, --Areas1 {"Ballas", 593.5, -655, 12, 250, 250, 50, "Area2"}, {"Grove Street", 2308, -1379, 20, 139, 220,50, "Area3"}, {"Ballas", 1956.2, -2161.6, 12, 150, 200,40, "Area4"}, {"Grove Street", 2210, -105, 25, 187, 207,40, "Area5"}, {"Ballas", 145.6, -1818, 0.5, 210, 120,40, "Area6"} } function getAreaColor(AreaGang) local colors = { ["Grove Street"] = {0, 255, 0}, ["Ballas"] = {100, 32, 240} } return colors[AreaGang][1], colors[AreaGang][2], colors[AreaGang][3] end for i, areaData in ipairs(RadarAreas) do local gangName = areaData[1] local R, G, B = getAreaColor(gangName) local x, y, z, width, height, depth, elementID = areaData[2], areaData[3], areaData[4], areaData[5], areaData[6], areaData[7], areaData[8] local radarArea = createRadarArea(x, y, width, height, R, G, B,80) local colCuboid = createColCuboid(x, y, z, width, height, depth) setElementID(colCuboid,elementID) setElementData(colCuboid, "radarArea", radarArea) setElementData(colCuboid, "areaTeam", gangName) setElementData(colCuboid, "areaScore",0) end function getPlayerTeamName(player) if player and getElementType(player) == "player" then local playerTeam = getPlayerTeam(player) if playerTeam then return getTeamName(playerTeam) end end end function isTeamAllowed(teamName) for _, allowedTeam in ipairs(allowedTeams) do if allowedTeam == teamName then return true end end return false end function getRemainingTime(area) local areaTimeDate = getElementData(area, "areaTimeDate") or 0 local currentTime = getRealTime().timestamp local remainingTime = ((60*1000)*warTime) - (currentTime - areaTimeDate) * 1000 - 1000 return remainingTime end addEventHandler("onColShapeHit", resourceRoot, function(player) if isElement(player) and getElementType(player) == "player" and isTeamAllowed(getPlayerTeamName(player)) then setElementData(player, "areaIn", source) if isRadarAreaFlashing(getElementData(source, "radarArea")) then local remainingTime = getRemainingTime(source) exports ["Timer"]:timerGo(player,remainingTime) end end end) addEventHandler("onColShapeLeave", resourceRoot, function(player) if isElement(player) and getElementType(player) == "player" and isTeamAllowed(getPlayerTeamName(player)) then setElementData(player, "areaIn", false) if isRadarAreaFlashing(getElementData(source, "radarArea")) then exports ["Timer"]:timerStop(player) end end end) local attackPermission = { ["Grove Street"] = true, ["Ballas"] = true } function getAttackPermission(areaTeam) return attackPermission[areaTeam] end function setAttackPermission(areaTeam, state) attackPermission[areaTeam] = state end function AreaAttack(player, commandName) if spam then spam = false setTimer(function() spam = true end, 1000, 1) local area = getElementData(player, "areaIn") if area then local areaTeam = getElementData(area, "areaTeam") local playerTeam = getPlayerTeam(player) local playerTeamName = getTeamName(playerTeam) if playerTeamName == areaTeam then exports ["info_Text"]:createInfoText(player,"لا يمكنك السيطرة على منطقتك",10000,225,50,50,"error_Info") elseif playerTeamName ~= areaTeam and (playerTeamName == "Grove Street" or playerTeamName == "Ballas") then local permission = getAttackPermission(areaTeam) local radarArea = getElementData(area, "radarArea") local R, G, B, A = getRadarAreaColor(radarArea) if A >= 150 then exports ["info_Text"]:createInfoText(player,"عد لاحقًا، هذه المنطقة جديدة",10000,225,50,50,"error_Info") return end if permission then setAttackPermission(areaTeam, false) setRadarAreaFlashing(radarArea, true) setElementData(area, "areaTimeDate", os.time()) setTimer(setWinneTeam, (60*1000)* warTime, 1, area, areaTeam) exports ["info_Text"]:createInfoText(player,"بدء الهجوم",10000) sendRemainingTime(area) sendGangAlert(playerTeamName,areaTeam) else exports ["info_Text"]:createInfoText(player,"لا يمكنك هناك بالفعل منطقة تحت الهجوم",10000,225,50,50,"error_Info") end end end end end addCommandHandler("attack", AreaAttack) function setWinneTeam(Area, areaTeam) -- تحديد الفائز local playerCount = { ["Grove Street"] = 0, ["Ballas"] = 0 } local playersInArea = getElementsWithinColShape(Area, "player") local winningTeam for _, player in ipairs(playersInArea) do local playerTeam = getPlayerTeam(player) local teamName = getTeamName(playerTeam) if teamName == "Grove Street" then playerCount["Grove Street"] = playerCount["Grove Street"] + 1 exports["Xp_Level"]:givePlayerXP(player, 100) givePlayerMoney(player,3000) elseif teamName == "Ballas" then playerCount["Ballas"] = playerCount["Ballas"] + 1 exports["Xp_Level"]:givePlayerXP(player, 100) givePlayerMoney(player,3000) end end local score = getElementData(Area, "areaScore") if (score > 0 and areaTeam == "Grove Street" and playerCount["Ballas"] > 0 ) or (areaTeam == "Grove Street" and playerCount["Grove Street"] == 0) then winningTeam = "Ballas" elseif (score > 0 and areaTeam == "Ballas" and playerCount["Grove Street"] > 0) or (areaTeam == "Ballas" and playerCount["Ballas"] == 0) then winningTeam = "Grove Street" else winningTeam = areaTeam end WarEnd(Area ,areaTeam, winningTeam) end function WarEnd(Area ,areaTeam, winningTeam) local radarArea = getElementData(Area, "radarArea") local R, G, B = getAreaColor(winningTeam) setElementData(Area, "areaTeam", winningTeam) setElementData(Area, "areaScore",0) setAttackPermission(areaTeam,true) setRadarAreaColor(radarArea,R,G,B,150) setRadarAreaFlashing(radarArea,false) setTimer(setRadarAreaColor,(60*1000)* areaRestTime,1,radarArea,R,G,B,80) end addEventHandler("onPlayerWasted", root, function(ammo, attacker) local playerTeamName = getPlayerTeamName(source) local attackerTeamName = getPlayerTeamName(attacker) if playerTeamName ~= attackerTeamName and isTeamAllowed(playerTeamName) and isTeamAllowed(attackerTeamName) then givePlayerMoney(attacker, 100) exports["Xp_Level"]:givePlayerXP(attacker, 100) local area = getElementData(source, "areaIn") if area and isRadarAreaFlashing(getElementData(area, "radarArea")) then scoreCount(area, playerTeamName, attackerTeamName) end end end) function scoreCount(Area,playerTeamName,attackerTeamName) local areaTeam = getElementData(Area, "areaTeam") local areaScore = getElementData(Area, "areaScore") if areaTeam == playerTeamName then areaScore = areaScore + 1 else areaScore = areaScore - 1 end setElementData(Area, "areaScore",areaScore) end function sendGangAlert(attacker, defender) local teams = { attacker, defender } for _, team in ipairs(teams) do local allPlayers = getPlayersInTeam(getTeamFromName(team)) local r,g,b local message if team == attacker then message = "فريقك يهاجم في منطقة اذهب للمساعدة اذا تستطيع" r,g,b = 0,255,0 else message = "منطقتك تتعرض للهجوم اذهب للدفاع عنها" r,g,b = 255,0,0 end for _, player in ipairs(allPlayers) do outputChatBox(message, player, r,g,b) end end end function sendRemainingTime(area) local playersInArea = getElementsWithinColShape(area, "player") local remainingTime = getRemainingTime(area) for _, player in ipairs(playersInArea) do if player and isTeamAllowed(getPlayerTeamName(player)) and isElementWithinColShape(player,area) then exports ["Timer"]:timerGo(player,remainingTime) end end end
  5. Unfortunately after my experience of attacking the areas of all other gangs I discovered the same problem
  6. Hello I came back after I fixed the problem The example you gave me helped me a lot to reconsider and rebuild it again. Thank you !!! Respect Bro!
  7. Unfortunately the problem is still not fixed anyway thank you for trying to help Respect !
  8. Hello I Have problem After completing the attack on the area the area takes on the color of another gang Team Ex: The colors areas wars between Ballas and Grove are a good. Each team takes the color of its team if it wins The colors areas wars between Aztecas and Vagos are a good. Each team takes the color of its team if it wins But When an area is attacked by a team of Vagos on Grove or Vagos on Ballas or Aztecas on Ballas or Aztecas on Grove the team gang winner takes the area in the color of another gang Team I hope you have understood my problem and I hope to help me Thank you! Code: createRadarArea(2222.30,-1840.5,330,230,0,255,0,150) createRadarArea(1856.90,-1339,200,300,138,43,226,150) local spam = true local groveAttack = true -- AttackPermission local ballasAttack = true -- AttackPermission local vagosAttack = true -- AttackPermission local aztecasAttack = true -- AttackPermission local warTime = 5-- Guerrilla time local areaRestTime = 10 -- Time is required to attack the same area local allowedTeams = { "Grove Street", "Ballas", "Vagos", "Aztecas" } --المناطق-- local RadarAreas = { {"Grove Street", 1040, -1851, 12, 250, 270, 40, "Area1"}, --Areas1 {"Ballas", 593.5, -655, 12, 250, 250, 50, "Area2"}, {"Grove Street", 2308, -1379, 20, 139, 220,50, "Area3"}, {"Ballas", 1956.2, -2161.6, 12, 150, 200,40, "Area4"}, {"Grove Street", 2210, -105, 25, 187, 207,40, "Area5"}, {"Ballas", 145.6, -1818, 0.5, 210, 120,40, "Area6"}, {"Vagos", 2105, -1318, 23, 191, 285, 40, "Area7"}, {"Aztecas", 2413, -2248, 13, 322, 208, 40, "Area8"}, {"Vagos", 84.9287109375, -1609.8056640625, 14.62853717804, 503.0380859375, 475.2646484375, 40, "Area9"}, {"Aztecas", 610.3544921875, -1309.8408203125, 23.825687408447, 329.345703125, 353.1630859375, 40, "Area10"} } function getAreaColor(AreaGang) local colors = { ["Grove Street"] = {0, 255, 0}, ["Ballas"] = {100, 32, 240}, ["Vagos"] = {255, 230, 0}, ["Aztecas"] = {0, 171, 255} } return colors[AreaGang][1], colors[AreaGang][2], colors[AreaGang][3] end -- صناعة المناطق for i, areaData in ipairs(RadarAreas) do local gangName = areaData[1] local R, G, B = getAreaColor(gangName) local x, y, z, width, height, depth, elementID = areaData[2], areaData[3], areaData[4], areaData[5], areaData[6], areaData[7], areaData[8], areaData[9], areaData[10], areaData[11] local radarArea = createRadarArea(x, y, width, height, R, G, B,80) local colCuboid = createColCuboid(x, y, z, width, height, depth) setElementID(colCuboid,elementID) setElementData(colCuboid, "radarArea", radarArea) setElementData(colCuboid, "areaTeam", gangName) setElementData(colCuboid, "areaScore",0) end function getPlayerTeamName(player) if player and getElementType(player) == "player" then local playerTeam = getPlayerTeam(player) if playerTeam then return getTeamName(playerTeam) end end end function isTeamAllowed(teamName) for _, allowedTeam in ipairs(allowedTeams) do if allowedTeam == teamName then return true end end return false end function getRemainingTime(area) local areaTimeDate = getElementData(area, "areaTimeDate") or 0 local currentTime = getRealTime().timestamp local remainingTime = ((60*1000)*warTime) - (currentTime - areaTimeDate) * 1000 - 1000 return remainingTime end --عندما يدخل أو يخرج اللاعب من المنطقة addEventHandler("onColShapeHit", resourceRoot, function(player) if isElement(player) and getElementType(player) == "player" and isTeamAllowed(getPlayerTeamName(player)) then setElementData(player, "areaIn", source) if isRadarAreaFlashing(getElementData(source, "radarArea")) then local remainingTime = getRemainingTime(source) exports ["Timer"]:timerGo(player,remainingTime) end end end) addEventHandler("onColShapeLeave", resourceRoot, function(player) if isElement(player) and getElementType(player) == "player" and isTeamAllowed(getPlayerTeamName(player)) then setElementData(player, "areaIn", false) if isRadarAreaFlashing(getElementData(source, "radarArea")) then exports ["Timer"]:timerStop(player) end end end) ------------------------------------ When the player is attacked, the server determines whether or not ------------------- local attackPermission = { ["Grove Street"] = true, ["Ballas"] = true, ["Vagos"] = true, ["Aztecas"] = true } function getAttackPermission(areaTeam) return attackPermission[areaTeam] end function setAttackPermission(areaTeam, state) attackPermission[areaTeam] = state end function AreaAttack(player, commandName) if spam then spam = false setTimer(function() spam = true end, 1000, 1) local area = getElementData(player, "areaIn") if area then local areaTeam = getElementData(area, "areaTeam") local playerTeam = getPlayerTeam(player) local playerTeamName = getTeamName(playerTeam) if playerTeamName == areaTeam then exports ["info_Text"]:createInfoText(player,"You cannot attack your area",10000,225,50,50,"error_Info") elseif playerTeamName ~= areaTeam and (playerTeamName == "Grove Street" or playerTeamName == "Ballas" or playerTeamName == "Vagos" or playerTeamName == "Aztecas") then local permission = getAttackPermission(areaTeam) local radarArea = getElementData(area, "radarArea") local R, G, B, A = getRadarAreaColor(radarArea) if A >= 150 then exports ["info_Text"]:createInfoText(player,"Come back later, this is a new area",10000,225,50,50,"error_Info") return end if permission then setAttackPermission(areaTeam, false) setRadarAreaFlashing(radarArea, true) setElementData(area, "areaTimeDate", os.time()) setTimer(setWinneTeam, (60*1000)* warTime, 1, area, areaTeam) exports ["info_Text"]:createInfoText(player,"بدء الهجوم",10000) sendRemainingTime(area) sendGangAlert(playerTeamName,areaTeam) else exports ["info_Text"]:createInfoText(player,"You cannot attack an area where an area is already under attack",10000,225,50,50,"error_Info") end end end end end addCommandHandler("attack", AreaAttack) function setWinneTeam(Area, areaTeam) -- Determine the winner local playerCount = { ["Grove Street"] = 0, ["Ballas"] = 0, ["Vagos"] = 0, ["Aztecas"] = 0 } local playersInArea = getElementsWithinColShape(Area, "player") local winningTeam for _, player in ipairs(playersInArea) do local playerTeam = getPlayerTeam(player) local teamName = getTeamName(playerTeam) if teamName == "Grove Street" then playerCount["Grove Street"] = playerCount["Grove Street"] + 1 exports["Xp_Level"]:givePlayerXP(player, 100) givePlayerMoney(player, 3000) elseif teamName == "Ballas" then playerCount["Ballas"] = playerCount["Ballas"] + 1 exports["Xp_Level"]:givePlayerXP(player, 100) givePlayerMoney(player, 3000) elseif teamName == "Vagos" then playerCount["Vagos"] = playerCount["Vagos"] + 1 -- Add XP and money rewards for Vagos elseif teamName == "Aztecas" then playerCount["Aztecas"] = playerCount["Aztecas"] + 1 -- Add XP and money rewards for Aztecas end end local score = getElementData(Area, "areaScore") if (score > 0 and areaTeam == "Grove Street" and playerCount["Ballas"] > 0) or (areaTeam == "Grove Street" and playerCount["Grove Street"] == 0) then winningTeam = "Ballas" elseif (score > 0 and areaTeam == "Ballas" and playerCount["Grove Street"] > 0) or (areaTeam == "Ballas" and playerCount["Ballas"] == 0) then winningTeam = "Grove Street" elseif (score > 0 and areaTeam == "Aztecas" and playerCount["Vagos"] > 0) or (areaTeam == "Aztecas" and playerCount["Aztecas"] == 0) then winningTeam = "Vagos" elseif (score > 0 and areaTeam == "Vagos" and playerCount["Aztecas"] > 0) or (areaTeam == "Vagos" and playerCount["Vagos"] == 0) then winningTeam = "Aztecas" elseif (score > 0 and areaTeam == "Grove Street" and playerCount["Aztecas"] > 0) or (areaTeam == "Grove Street" and playerCount["Grove Street"] == 0) then winningTeam = "Aztecas" elseif (score > 0 and areaTeam == "Aztecas" and playerCount["Grove Street"] > 0) or (areaTeam == "Aztecas" and playerCount["Aztecas"] == 0) then winningTeam = "Grove Street" elseif (score > 0 and areaTeam == "Ballas" and playerCount["Aztecas"] > 0) or (areaTeam == "Ballas" and playerCount["Ballas"] == 0) then winningTeam = "Aztecas" elseif (score > 0 and areaTeam == "Aztecas" and playerCount["Ballas"] > 0) or (areaTeam == "Aztecas" and playerCount["Aztecas"] == 0) then winningTeam = "Ballas" elseif (score > 0 and areaTeam == "Grove Street" and playerCount["Vagos"] > 0) or (areaTeam == "Grove Street" and playerCount["Grove Street"] == 0) then winningTeam = "Vagos" elseif (score > 0 and areaTeam == "Vagos" and playerCount["Grove Street"] > 0) or (areaTeam == "Vagos" and playerCount["Vagos"] == 0) then winningTeam = "Grove Street" elseif (score > 0 and areaTeam == "Ballas" and playerCount["Vagos"] > 0) or (areaTeam == "Ballas" and playerCount["Ballas"] == 0) then winningTeam = "Vagos" elseif (score > 0 and areaTeam == "Vagos" and playerCount["Ballas"] > 0) or (areaTeam == "Vagos" and playerCount["Vagos"] == 0) then winningTeam = "Ballas" else winningTeam = areaTeam end WarEnd(Area, areaTeam, winningTeam) end function WarEnd(Area ,areaTeam, winningTeam) --- The end of the battle after determining the winner and returning the area to normal local radarArea = getElementData(Area, "radarArea") local R, G, B = getAreaColor(winningTeam) setElementData(Area, "areaTeam", winningTeam) setElementData(Area, "areaScore",0) setAttackPermission(areaTeam,true) setRadarAreaColor(radarArea,R,G,B,150) setRadarAreaFlashing(radarArea,false) setTimer(setRadarAreaColor,(60*1000)* areaRestTime,1,radarArea,R,G,B,80) end addEventHandler("onPlayerWasted", root, function(ammo, attacker) local playerTeamName = getPlayerTeamName(source) local attackerTeamName = getPlayerTeamName(attacker) if playerTeamName ~= attackerTeamName and isTeamAllowed(playerTeamName) and isTeamAllowed(attackerTeamName) then givePlayerMoney(attacker, 100) exports["Xp_Level"]:givePlayerXP(attacker, 100) local area = getElementData(source, "areaIn") if area and isRadarAreaFlashing(getElementData(area, "radarArea")) then scoreCount(area, playerTeamName, attackerTeamName) end end end) function scoreCount(Area,playerTeamName,attackerTeamName) local areaTeam = getElementData(Area, "areaTeam") local areaScore = getElementData(Area, "areaScore") if areaTeam == playerTeamName then areaScore = areaScore + 1 else areaScore = areaScore - 1 end setElementData(Area, "areaScore",areaScore) end function sendGangAlert(attacker, defender) local teams = { attacker, defender } for _, team in ipairs(teams) do local allPlayers = getPlayersInTeam(getTeamFromName(team)) local r,g,b local message if team == attacker then message = "Your team is attacking in the area go to help" r,g,b = 0,255,0 else message = "Your area is under attack, go defend it" r,g,b = 255,0,0 end for _, player in ipairs(allPlayers) do outputChatBox(message, player, r,g,b) end end end function sendRemainingTime(area) local playersInArea = getElementsWithinColShape(area, "player") local remainingTime = getRemainingTime(area) for _, player in ipairs(playersInArea) do if player and isTeamAllowed(getPlayerTeamName(player)) and isElementWithinColShape(player,area) then exports ["Timer"]:timerGo(player,remainingTime) end end end
  9. Please Help me to fix the script dont working the script destroy vehicles stuck in water after 4 seconds but dont working can you fix it please? client: function onVehicleStuckInWater(vehicle) local delay = 4 -- in seconds timer.start(delay, function() destroyVehicle(vehicle) end) end server: local vehiclesInWater = {} function onVehicleEnterWater(vehicle) vehiclesInWater[vehicle] = true end function onVehicleLeaveWater(vehicle) vehiclesInWater[vehicle] = nil end function onTick() for vehicle, _ in ipairs(vehiclesInWater) do local z = getVehicleZ(vehicle) if z < -1.5 then triggerClientEvent("onVehicleStuckInWater", getVehiclePlayer(vehicle), vehicle) end end end
  10. Sr.black

    Help Script

    Hi, can someone help me with the script? So that if a car falls into the sea, it will automatically destroy the vehicle after a minute has passed until the vehicles stuck in the water spawn again. I hope that there is a code that makes the boats not destroy because they are already spawned in the sea Tnx
  11. Please i want script you cant change your name in server and you cant use command change nickname tnx
  12. No, how do I create a script? I want to compile it, please server client meta
  13. I have no experience, can you put the code here and copy it to make it easier for me to add it please
  14. Hello I am looking for a mod that makes wanted level hood like the original game gta sa I want to make it appear and disappear then the stars stop in the hood like the original game Focus on the stars as they appear and disappear at 1:10. I want a mod like this, please Thank You !
  15. Sr.black

    HELP

    Hello, I need help with the glue mod, so I want to help add a script that makes you stick to a bike or a car, you cannot ride in a car you are standing on or a bike by pressing F because directly when you press F, a character moves and a glitch occurs I want to stop the process of riding any car, whether I am glued I would be glad if you help me Tnx For help The script : https://community.multitheftauto.com/index.php?p=resources&s=details&id=15189
  16. Sr.black

    Help Script

    Hello friends, I have a script to choose a weapon like GTA Fivem, but you can change a weapon with the mouse through an arrow. I want help so that I can change a weapon with the A and D buttons like the original GTA San Andreas. I will be happy for anyone who helps me in this. Thank you. I will explain in detail, if you do not understand, I want to change the control of changing the weapon from the mouse to the keyboard, so that I can change it with two buttons, A and D, like the original GTA SA. I think you understood. Forgive me if I wasted your time. Resource : Dawnload SelectGun Image:
  17. About Us Coopera LS Roleplay is an English-based MTA Server. The community is here to provide quality roleplay along with a welcoming experience.Coopera has been in dormant existence from 2017.Coopera Los Santos is supposed to give that nostalgic feeling to players and a warm and welcoming community based in Red County (Los Santos County) to support newcomers, and oldtimers alike. We are here to ensure that we can keep the English MTA Roleplaying scene alive, even if it's only on a small scale! We are determined to show true passion towards the roleplaying scene. --------------------------------------------------------- هو خادم MTA مقره باللغة الإنجليزية. المجتمع هنا لتقديم لعب أدوار عالي الجودة إلى جانب تجربة ترحيبية ، كانت كوبيرا في حالة نائمة منذ عام 2017 ، ومن المفترض أن تمنح كوبيرا لوس سانتوس هذا الشعور بالحنين للاعبين ومجتمعًا دافئًا ومرحبًا في ريد كاونتي (مقاطعة لوس سانتوس) لدعم القادمين الجدد وكبار السن على حد سواء. نحن هنا للتأكد من أنه يمكننا الحفاظ على مشهد لعب الأدوار الإنجليزي MTA على قيد الحياة ، حتى لو كان ذلك على نطاق صغير فقط! نحن مصممون على إظهار شغف حقيقي تجاه مشهد تمثيل الأدوار. Goal Our goals are easy... create a community for all to enjoy, hang out, meet new friends and rekindle with old friends. The English RP community is something that is closely-knit and often brings familiar faces around. We're not here to compete against other gamemodes, we're just here to provide what the players want. With that being said, we are always happy to take suggestions and feedback so that we can provide a community that the players can call home. --------------------------------------------------------- أهدافنا سهلة ... أنشئ مجتمعًا يستمتع به الجميع ، ويتسكع ، ويلتقي بأصدقاء جدد ويعيد الحيوية مع الأصدقاء القدامى. مجتمع اللغة الإنجليزية RP هو شيء مترابط وغالبًا ما يجلب الوجوه المألوفة حوله. لسنا هنا للتنافس ضد ألعاب أخرى ، نحن هنا فقط لتقديم ما يريده اللاعبون. مع ما يقال ، يسعدنا دائمًا تلقي الاقتراحات والتعليقات حتى نتمكن من توفير مجتمع يمكن للاعبين الاتصال به في المنزل. Staff Team Our staff team is combined with hardened veterans in the roleplaying community, along with newcomers. We have some interesting and talented folk that are with us on this project. Our staff team is the driving force behind the works, keeping the cogs turning so that players can enjoy a fluid experience. Some of our key staff members have returned to take the reigns once again to ensure that the players can achieve the experience they desire. --------------------------------------------------------- يتم دمج فريق العمل لدينا مع قدامى المحاربين في مجتمع لعب الأدوار ، جنبًا إلى جنب مع الوافدين الجدد. لدينا بعض الأشخاص المثيرين للاهتمام والموهوبين معنا في هذا المشروع. فريق العمل لدينا هو القوة الدافعة وراء الأعمال ، حيث يحافظ على التروس تدور حتى يتمكن اللاعبون من الاستمتاع بتجربة سلسة. عاد بعض أعضاء فريقنا الأساسيين لتولي زمام الأمور مرة أخرى للتأكد من أن اللاعبين يمكنهم تحقيق التجربة التي يرغبون فيها. Useful Information I have explained in detail and checked previously watch video: How to create character: 4:25 Name Character must: Full Name EX: Texas Andor YO: example : 26 minimum: 16 DD: example : 7 HT: example : 178 minimum: 160 WT: example: 89 ------------- Factions Jobs system Maps Car shops Rob system ---------------------------------------------- Custom Skin Uploads per Character(DFF/TXD) Multiple Factions per Character Imports & Exotic Vehicle Dealership NPC Drug Dealers & Buyers New Unseen before Jobs Advanced Finances and Banking, allowing for multiple bank accounts, investments, businesses etc. Monopolize the city! Advanced and realistic Weapon System with countless possibilities. Advanced and realistic Vehicle System that really sets apart the value of owning a brand new vehicle or an old beater. Scripted Vehicle & Interior Break-ins/thefts. Advanced and realistic smartphone capable of storing data, applications, custom wallpapers etc. 150+ Custom Vehicles, 100+ Custom Objects, 40+ Vehicle Upgrades, 50+ Custom Weapons and currently 50+ Uploaded Skins, all added NOT replaced. Custom Environment modding to suit the atmosphere and location we are roleplaying. Useful Links UCP: https://powercs.ro/ Forums: https://coopera.ahlamontada.com/login Discord: https://discord.gg/RXDAeQv5zm Server IP: mtasa://23.88.73.88:12641 Thank You! Thanks for taking the time to read. We hope that you stop by and check us out. We are always looking to interact with the community, because at the end of the day, without the people, a community is nothing. From the bottom of our hearts, the Coopera Staff do truly appreciate the time that people take to play, interact and contribute to the community. If you have made it this far, thank you for reading. Your time and patience is greatly appreciated. We look forward to seeing you on launch! Please visit the Forums or our Discord to stay up to date for the server's release. --------------------------------------------------------- شكرا لأخذ الوقت الكافي لقراءة. نأمل أن تتوقف وتراجعنا. نتطلع دائمًا إلى التفاعل مع المجتمع ، لأنه في نهاية اليوم ، بدون الناس ، لا يكون المجتمع شيئًا. من أعماق قلوبنا ، يقدر موظفو Coopera حقًا الوقت الذي يستغرقه الأشخاص للعب والتفاعل والمساهمة في المجتمع. إذا كنت قد وصلت إلى هذا الحد ، أشكركم على القراءة. نقدر كثيرا وقتك وصبرك. نتطلع إلى رؤيتك عند الإطلاق! يرجى زيارة المنتديات أو موقع Discord الخاص بنا للبقاء على اطلاع دائم بإصدار الخادم.
  18. I did that and the problem is still there Consol: Couldnt find script Shopsystem/Burgersdot/sTeleporter.lua for resource
  19. Hello I have the gamemode : https://github.com/DorteY/mtasa-copsNrobbers but not working in resourses: failed Please help me fix it or guide me on how to add this Gamemode TNX
  20. Thank you bro ! good work i like it !
  21. Sr.black

    Nitro value

    function drawNitroCounts() local fCamX, fCamY, fCamZ = getCameraMatrix() for _, v in ipairs(getElementsByType("vehicle")) do if getVehicleUpgradeOnSlot(v, 8) then -- Check if the vehicle has nitro installed local fX, fY, fZ = getElementPosition(v) local fCamX, fCamY, fCamZ = getCameraMatrix() local fX2, fY2 = getScreenFromWorldPosition(fX, fY, fZ + 0.85, 0.08) if fX2 then local fDistance = getDistanceBetweenPoints3D(fX, fY, fZ, fCamX, fCamY, fCamZ) if fDistance < 60 then if isLineOfSightClear(fCamX, fCamY, fCamZ, fX, fY, fZ, true, false, false, true, false) then local pVehicle = getPedOccupiedVehicle(localPlayer) if not pVehicle or pVehicle ~= v then local fScale = (60 / fDistance) * 0.7 local iNitroCount = getVehicleNitroCount(v) dxDrawText("Nitro count: " .. iNitroCount, fX2 + 1, fY2 + 1, fX2 + 1, fY2 + 1, tocolor(0, 0, 255), fScale, "default", "center", "bottom") dxDrawText("Nitro count: " .. iNitroCount, fX2, fY2, fX2, fY2, tocolor(255, 255, 255), fScale, "default", "center", "bottom") end end end end end end end addEventHandler("onClientRender", root, drawNitroCounts)
  22. addEventHandler("onClientKey", root, function (button,press) if button == "j" then triggerServerEvent("jetpackClicked", localPlayer) end end) addEvent("jetpackClicked", true) addEventHandler('jetpackClicked', getRootElement(), function ( ) setPedWearingJetpack ( source, not isPedWearingJetpack( source ) ) end)
  23. function getTopThree() sortedTable = {} for player, damage in pairs(damageTable) do if isElement(player) then local team = getPlayerTeam(player) table.insert(sortedTable, {player, damage}) end end table.sort(sortedTable, function(a, b) return a[2] > b[2] end) local t1, t2, t3 = {}, {}, {} t1 = {getPlayerName(sortedTable[1][1]), sortedTable[1][2]} or {"N/A", "0"} t2 = {getPlayerName(sortedTable[2][1]), sortedTable[2][2]} or {"N/A", "0"} if sortedTable[2] then t3 = {getPlayerName(sortedTable[3][1]), sortedTable[3][2]} or {"N/A", "0"} if sortedTable[3] then triggerClientEvent(root, "showTopZDamage", root, t1, t2, t3) end
  24. local playerSelectedTarget local targetMarker = createMarker( 0, 0, 10000, "arrow", 1.5, 255, 0, 0 ) addEventHandler("onClientRender", root, function() if ( getKeyState("mouse2") == true ) then local x,y,z = getElementPosition(localPlayer) for k,target in ipairs(getElementsByType("player",root,true)) do if not ( target == localPlayer ) then local px,py,pz = getElementPosition(target) local distance = getDistanceBetweenPoints3D( px, py, pz, x, y, z ) if ( distance < 10 ) then --target distance playerSelectedTarget = target end end end if isElement(playerSelectedTarget) then local tx,ty,tz = getElementPosition(playerSelectedTarget) setElementPosition( targetMarker, tx, ty, tz+3 ) end else if isElement(playerSelectedTarget) then setElementPosition( targetMarker, 0, 0, 10000 ) end end end )
  25. Create a custom event in your script that will trigger the NPC driving the car. Within this event, you will use the setElementData function to set a custom server-side variable that will keep track of the NPC's driving state. You will then create another custom event that will be triggered regularly (for example, using a timer) to update the NPC's driving state based on the value of the custom server-side variable set in step 2. In this second event, you will use the setPedControlState function to set the NPC's driving state. This way, you will be able to create a server-side setPedControlState that allows an NPC to drive a car in MTA.
×
×
  • Create New...