Jump to content

FLUSHBICEPS

Members
  • Posts

    100
  • Joined

  • Last visited

  • Days Won

    4

FLUSHBICEPS last won the day on May 1 2023

FLUSHBICEPS had the most liked content!

1 Follower

Recent Profile Visitors

1,384 profile views

FLUSHBICEPS's Achievements

Punk-@ss B*tch

Punk-@ss B*tch (12/54)

26

Reputation

  1. connection variable used in the dbQuery call is not defined or assigned a valid database connection local mysql = exports.rp_mysql function getAllInts(thePlayer, commandName, ...) if exports.rp_integration:isPlayerAdmin(thePlayer) then local interiorsList = {} local mQuery1 = nil local connection = mysql:getConnection() if not connection then outputChatBox("Failed to establish a database connection.", thePlayer, 255, 0, 0) return end dbQuery( function(qh) local res, rows, err = dbPoll(qh, 0) if rows > 0 then for index, row in ipairs(res) do table.insert(interiorsList, { row["iID"], row["type"], row["name"], row["cost"], row["charactername"], row["username"], row["cked"], row["DiffDate"], row["locked"], row["supplies"], row["safepositionX"], row["disabled"], row["deleted"], '', row["iCreatedDate"],row["iCreator"], row["`interiors`.`x`"], row["`interiors`.`y`"], row["`interiors`.`z`"], row['fowner'] } ) end triggerClientEvent(thePlayer, "createIntManagerWindow", thePlayer, interiorsList, getElementData( thePlayer, "account:username" )) end end, connection, "SELECT factions.name AS fowner, interiors.id AS iID, interiors.type AS type, interiors.name AS name, cost, charactername, username, cked, locked, supplies, safepositionX, disabled, deleted, interiors.createdDate AS iCreatedDate, interiors.creator AS iCreator, DATEDIFF(NOW(), lastused) AS DiffDate, interiors.x, interiors.y, interiors.y FROM interiors LEFT JOIN characters ON interiors.owner = characters.id LEFT JOIN accounts ON characters.account = accounts.id LEFT JOIN factions ON interiors.faction=factions.id ORDER BY interiors.createdDate DESC") end end
  2. --serverside function onHit(player) if (#m > 0 and #b > 0) then destroyElement(m[1]) destroyElement(b[1]) table.remove(m, 1) table.remove(b, 1) end for i, k in ipairs(Bomb2) do if (isElementAttached(Bomb2[i])) then detachElements(Bomb2[i], helic[1]) plantedBombs = plantedBombs + 1 outputChatBox("Bomb has been successfully installed, Do the same with the rest!", root, 34, 139, 34) outputChatBox(plantedBombs) ---- This returns what it should return triggerClientEvent(player, "updatePlantedBombs", root, plantedBombs) end end if (plantedBombs == 5) then triggerEvent("stopMission", root, onHit) givePlayerMoney(player, 50000) outputChatBox("Congratulations, you have passed the mission and got $50,000 as a reward!", root, 34, 139, 34) end end --clientside addEvent("updatePlantedBombs", true) addEventHandler("updatePlantedBombs", root, function(plantedBombsFromServer) plantedBombs = plantedBombsFromServer end) function renderTimer() local white = tocolor(255, 255, 255, 255) if (isTimer(startTimer)) then local remaining = getTimerDetails(startTimer) local remaining = remaining / 1000 outputChatBox(plantedBombs) ---- Should now print the updated value dxDrawText("Delivered Bombs : "..plantedBombs.."", 1162, 654, screenW, 711, white, 1.3, "default-bold", "right", "bottom") dxDrawText("Time Remaining : "..math.floor(remaining / 60)..":"..math.floor(remaining % 60).."", 1228, 725, screenW, 740, white, 1.3, "default-bold", "right", "bottom") end end
  3. Dynamic Weather System Ever wished to bring your server’s world to life? Dynamic weather systems offer an extra level of immersion and unpredictability to your game, giving each session a true one-of-a-kind feel. In this tutorial we are going to create dynamic basic weather system which’ll change over time and based on certain conditions. Introduction A dynamic weather system will periodically change the weather in your server, ensuring players experience a variety of conditions. This can be based on real-world data, predefined patterns, or random selections. Setting Up Weather Table: First, create a table of weather types you want to use. local weathers = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16} Time-Based Changes: To make the weather change based on in-game time: setTimer(function() local hour, minute = getTime() if hour == 6 or hour == 12 or hour == 18 then setWeather(table.random(weathers)) end end, 60000, 0) -- Check every minute Random Weather Patterns: If you want more unpredictability: setTimer(function() if math.random(1, 10) > 7 then -- 30% chance every 10 minutes setWeather(table.random(weathers)) end end, 600000, 0) Advanced Features Weather Transitions: Instead of abrupt changes, smoothly transition between weathers. setWeatherBlended(table.random(weathers)) Seasonal Changes: Make certain weathers more likely during specific in-game months. local winterWeathers = {12, 13, 14, 15, 16} local summerWeathers = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11} local month = getRealTime().month if month >= 11 or month <= 2 then setWeather(table.random(winterWeathers)) else setWeather(table.random(summerWeathers)) end Player Feedback: Notify players of significant weather changes. local weatherNames = { [0] = "Clear", [1] = "Cloudy", -- ... add all weather names } addEventHandler("onWeatherChange", root, function(newWeather) outputChatBox("The weather is now " .. weatherNames[newWeather] .. "!") end)
  4. Can you describe the issue? Why you need onPlayerWasted? getDistanceBetweenPoints3D is missing the target coordinates outputChatBox functions are missing messages to display to the player spawn points for the condition are not defined
  5. theres a small issue in your code The Z position in the createMarker function has a subtraction without proper spacing change this line bombMarker = createMarker(364.70267, 186.29311, 1019.98438 -0.5, "cylinder", 1, 255, 0, 0) to this line bombMarker = createMarker(364.70267, 186.29311, 1019.98438 - 0.5, "cylinder", 1, 255, 0, 0)
  6. https://wiki.multitheftauto.com/wiki/EngineReplaceAnimation
  7. --server side local startTime = getTickCount() addEvent("requestMusicPosition", true) addEventHandler("requestMusicPosition", root, function() local elapsedTime = getTickCount() - startTime local soundDuration = 20 * 60 * 1000 local playbackPosition = elapsedTime % soundDuration triggerClientEvent(client, "playClubMusic", client, playbackPosition) end ) --clientside addEventHandler('onClientResourceStart', resourceRoot, function() triggerServerEvent("requestMusicPosition", localPlayer) end ) addEvent("playClubMusic", true) addEventHandler("playClubMusic", root, function(playbackPosition) local sound = playSound3D("Dj_Ivan.mp3", -2677, 1411, 908, true) setSoundMaxDistance(sound, 100) setSoundVolume(sound, 4) setSoundPosition(sound, playbackPosition / 1000) end ) This setup ensures that when a player enters the club, they hear the music from the same position as everyone else
  8. I guess he wants the ability to cycle through and select different nearby players and not always target the closet one on the screen local playerSelectedTarget local alpha = 255 local nearbyPlayers = {} local selectedIndex = 1 addEventHandler("onClientRender", root, function() if getKeyState("mouse2") then local x, y, z = getElementPosition(localPlayer) nearbyPlayers = {} -- reset the table for _, target in ipairs(getElementsByType("player", root, true)) do if target ~= localPlayer then local px, py, pz = getElementPosition(target) local distance = getDistanceBetweenPoints3D(px, py, pz, x, y, z) if distance < 30 then table.insert(nearbyPlayers, target) end end end playerSelectedTarget = nearbyPlayers[selectedIndex] if isElement(playerSelectedTarget) then -- ur code to display the selection effect end else if isElement(playerSelectedTarget) then alpha = 0 setElementData(localPlayer, "Select", false) end end end ) addEventHandler("onClientKey", root, function(button, press) if button == "mouse_wheel_up" and press then selectedIndex = selectedIndex - 1 if selectedIndex < 1 then selectedIndex = #nearbyPlayers end elseif button == "mouse_wheel_down" and press then selectedIndex = selectedIndex + 1 if selectedIndex > #nearbyPlayers then selectedIndex = 1 end end end )
  9. the gate is not closing because the "Reset" event is being triggered immediately after the gate is opened local GateCloseTimer = nil -- variable to hold the timer addEventHandler("onClientClick", root, function(button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedElement) if GateMenu and button == "left" and state == "down" then if isMouseInPosition(sx*.42, sy*.6, sx*.15, sy*.08) then GateMenu = false moveObject(TheGate, 5000, 51.62455, -1524.62549, 0) GateStatus = true if isTimer(GateCloseTimer) then killTimer(GateCloseTimer) end GateCloseTimer = setTimer(function() triggerEvent("Reset", localPlayer) end, 5000, 1) -- This is the delay before the gate closes end end end) addEvent("Reset", true) addEventHandler("Reset", root, function() if (GateStatus) then moveObject(TheGate, 5000, 51.62455, -1524.62549, 5.05399) GateStatus = false end end )
  10. /plant cmd is called multiple times and multiple stones being created this could cause some stones to not be destroyed because the markers are overlapping add a delay
  11. thePlayer is nil and not defined, you’ve wrote “theplayer” function Kamshodan(thePlayer) setTimer(function() if isElement(thePlayer) then -- check if thePlayer is valid setPedStat(thePlayer, 23, getPedStat(thePlayer, 23) - 2) setPedStat(thePlayer, 22, getPedStat(thePlayer, 22) + 2) end end, 3600, 1, thePlayer) end addEventHandler('onResourceStart', getResourceRootElement(getThisResource()), Kamshodan)
  12. Pretty sure it just creates an illusion of a quicker firing speed and not actually increasing the fire rate you can make a rapid fire script you'd want to listen to the onClientPlayerWeaponFire event, and when it's fired, set a timer that triggers multiple shootings
  13. MenuPoints table values are hardcoded ur using absolute positioning use relative positioning instead
  14. the logic for creating and destroying markers and blips is :Oed up status2 = false -- Initialize status2 function unit1() local playerskin = getElementModel(source) local x, y, z = getElementPosition(source) if validSkin[playerskin] then if not status2 then statusB2 = createBlipAttachedTo(source, 0, 4, 0, 0, 255) statusMarker1 = createMarker(x, y, z, "checkpoint", 4, 255, 0, 0) attachElements(statusMarker1, source) if not validSkin[playerskin] then setElementAlpha(statusMarker1,0) -- Hide the marker else setElementAlpha(statusMarker1,255) -- Show the marker end outputChatBox("#898c8f<<#2c469cNeXoN Roleplay#898c8f>> #0f5720Sikeressen megváltoztatad az egységed állapotát: #ffffff||Üldözés||", source, 255, 255, 255, true) status2 = true else outputChatBox("#898c8f<<#2c469cNeXoN Roleplay#898c8f>> #0f5720Már ez az egységed állapota.", source, 255, 255, 255, true) end end end addEvent("Button2", true) addEventHandler("Button2", root, unit1)
×
×
  • Create New...