Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 26/09/23 in all areas

  1. # Project:V Project:V is a server based on the game mode from GTA:V Online. We are trying to bring every feature from GTA:V to this server to create something unique and long lasting. The server is still in progress but quite a lot of progress has been made, I won't post every update here and I'll let you go to our discord server to see what the server looks like at the moment Some screens: https://streamable.com/ghma0r https://streamable.com/vdffx6 Discord: https://discord.gg/XcPJeahDQE
    1 point
  2. Hello I'm Working On a Parking Sensor For MTA:SA Also I'm New To MTA And Scripting My problem is that when I start the resource and move the car in reverse gear, there is no sound Parkings.lua -- parking sensor for mta:sa function isVehicleReversing(theVehicle) local theVehicle = getPedOccupiedVehicle ( thePlayer ) local getMatrix = getElementMatrix (theVehicle) local getVelocity = Vector3 (getElementVelocity(theVehicle)) local getVectorDirection = (getVelocity.x * getMatrix[2][1]) + (getVelocity.y * getMatrix[2][2]) + (getVelocity.z * getMatrix[2][3]) if (getVectorDirection < 0) then return true function getDistanceBetweenElements(arg1, arg2) local car = Vector3(getPedOccupiedVehicle( arg1 )) local nearObject = Vector3(getNearestElement( arg2 )) local distance = getDistanceBetweenPoints3D( car,nearObject ) if vehicle then local sound = playSound("beep.mp3") setSoundVolume(sound, 0.5) setSoundProperties(sound, 48000.0, 128.00, distance, false) return distance addEventHandler("onClientResourceStart", resourceRoot, isVehicleReversing, getDistanceBetweenElements) -- meta.xml <meta> <script src="parkings.lua" type="client" /> <file src="beep.mp3" type="client" /> </meta> What is wrong with my script?
    1 point
  3. I Changed playSound("beep.mp3", false) to playSound("beep.mp3", true) And I even tried to increase the getNearestElement limit to 300 but it didn't work
    1 point
  4. Wow , Thanks a Lot Mate ! Sorry and it still doesn't work... Everything seems fine, I don't know what the problem is
    1 point
  5. 1) Mantenha o padrão de usar aspas "duplas" em vez de aspas 'simples' nas suas strings. 2) Troque a linha do triggerClientEvent por isso: if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(element)), aclGetGroup ("Admin")) then -- Troque Admin pela ACL Group que vc quer. triggerClientEvent(element, "openPainel", element) else -- Linha opcional. outputChatBox("Acesso negado.", element, 255, 0, 0) -- Linha opcional. end
    1 point
×
×
  • Create New...