-
Posts
158 -
Joined
-
Last visited
Posts posted by nk0zkh0z
-
-
What items? friends with an example.
They drop it full of sugar.
-
Players throw the items into the street. How to automatically delete it?
-
-
-
he stole the script
Where's your jetpack script part?i don't have i wanna add it
Okay no problem, i made this jetpack code for you, copy it correctly and put it to server side
--Server side:
bindKey(source,"J","down",jetpack) function jetpack(player,key,state) if ( exports.SAEGVIP:isPlayerVIP () ) then if (doesPedHaveJetPack(player)) then removePedJetPack(player) outputChatBox("Jetpack Removed.",player,255,0,0) else if (not doesPedHaveJetPack(player)) then givePedJetPack(player) outputChatBox("Jetpack Actived.",player,0,255,0) end end end end
-
This is the 'client' I'm using, you can refer to it
Just add your audio files.
local engine_sound = "sounds/engine.wav"
local idle_soundfile = "sounds/engine_idle.wav"
local engine_sound1 = "sounds/audi_start.wav"
local idle_soundfile1 = "sounds/audi_stop.wav"
local engine_sound2 = "sounds/bmw_start.wav"
local idle_soundfile2 = "sounds/bmw_stop.wav"
local engine_sound3 = "sounds/bugatti_start.wav"
local idle_soundfile3 = "sounds/bugatti_stop.wav"
local engine_sound4 = "sounds/camaro_start.wav"
local idle_soundfile4 = "sounds/camaro_stop.wav"
local engine_sound5 = "sounds/cop_start.wav"
local idle_soundfile5 = "sounds/cop_stop.wav"
local engine_sound6 = "sounds/engine_2.wav"
local idle_soundfile6 = "sounds/engine_idle_2.wav"
local engine_sound7 = "sounds/ford_start.wav"
local idle_soundfile7 = "sounds/ford_stop.wav"
local engine_sound8 = "sounds/kog_start.wav"
local idle_soundfile8 = "sounds/kog_stop.wav"
local engine_sound9 = "sounds/lambor_start.wav"
local idle_soundfile10 = "sounds/lambor_stop.wav"
local engine_sound10 = "sounds/lex_start.wav"
local idle_soundfile11 = "sounds/lex_stop.wav"
local engine_sound12 = "sounds/mer_start.wav"
local idle_soundfile12 = "sounds/mer_stop.wav"
local engine_sound13 = "sounds/mit_start.wav"
local idle_soundfile13 = "sounds/mit_stop.wav"
local engine_sound14 = "sounds/nis_start.wav"
local idle_soundfile15 = "sounds/nis_stop.wav"
local engine_sound15 = "sounds/nrg_start.wav"
local idle_soundfile16 = "sounds/nrg_stop.wav"
local engine_sound16 = "sounds/pon_start.wav"
local idle_soundfile17 = "sounds/pon_stop.wav"
local engine_sound17 = "sounds/roll_start.wav"
local idle_soundfile18 = "sounds/roll_stop.wav"
local engine_sound19 = "sounds/tus_start.wav"
local idle_soundfile19 = "sounds/tus_stop.wav"
local engine_sound20 = "sounds/_start.wav"
local idle_soundfile20 = "sounds/_stop.wav"
local sound = nil
local idle_sound = nil
function getVehicleRPM(vehicle)
if (vehicle) then
if (isVehicleOnGround(vehicle)) then
if (getVehicleEngineState(vehicle) == true) then
if(getVehicleCurrentGear(vehicle) > 0) then
vehicleRPM = math.floor(((getElementSpeed(vehicle, "kmh")/getVehicleCurrentGear(vehicle))*220) + 0.5)
if (vehicleRPM < 650) then
vehicleRPM = math.random(650, 750)
elseif (vehicleRPM >= 9800) then
vehicleRPM = 9800
end
else
vehicleRPM = math.floor(((getElementSpeed(vehicle, "kmh")/1)*220) + 0.5)
if (vehicleRPM < 650) then
vehicleRPM = math.random(650, 750)
elseif (vehicleRPM >= 9800) then
vehicleRPM = 9800
end
end
else
vehicleRPM = 0
end
else
if (getVehicleEngineState(vehicle) == true) then
vehicleRPM = vehicleRPM - 150
if (vehicleRPM < 650) then
vehicleRPM = math.random(650, 750)
elseif (vehicleRPM >= 9800) then
vehicleRPM = 9800
end
else
vehicleRPM = 0
end
end
return tonumber(vehicleRPM)
else
return 0
end
end
function getElementSpeed(element,unit)
if (unit == nil) then unit = 0 end
if (isElement(element)) then
local x,y,z = getElementVelocity(element)
if (unit=="mph" or unit==1 or unit =='1') then
return (x^2 + y^2 + z^2) ^ 0.5 * 100
else
return (x^2 + y^2 + z^2) ^ 0.5 * 1.61 * 100
end
else
outputDebugString("Not an element. Can't get speed")
return false
end
end
function engine_func()
local veh = getPedOccupiedVehicle ( getLocalPlayer())
if veh then
--Lykan
if getElementModel ( veh ) == 587 then
if getVehicleEngineState ( veh ) == true then
if getElementSpeed ( veh, "kmh" ) > 10 then
if idle_sound then
destroyElement ( idle_sound )
idle_sound = nil
end
if sound == nil then
sound = playSound3D ( engine_sound_14, 0, 0, 0, true )
setElementDimension ( sound, getElementDimension(veh) )
setElementInterior ( sound, getElementInterior(veh) )
attachElements ( sound, veh )
end
setSoundSpeed ( sound, getVehicleRPM(veh)/10000 )
elseif getElementSpeed ( veh, "kmh" ) < 10 then
if idle_sound == nil then
idle_sound = playSound3D ( idle_soundfile_14, 0, 0, 0, true )
setElementDimension ( idle_sound, getElementDimension(veh) )
setElementInterior ( idle_sound, getElementInterior(veh) )
setSoundVolume ( idle_sound, 0.5 )
attachElements ( idle_sound, veh )
end
if sound then
destroyElement ( sound )
sound = nil
end
elseif getElementSpeed ( veh, "kmh" ) == 0 then
if sound then
destroyElement ( sound )
sound = nil
end
end
else
if sound then
destroyElement ( sound )
sound = nil
end
if idle_sound then
destroyElement ( idle_sound )
idle_sound = nil
end
end
elseif getElementModel ( veh ) == 451 or getElementModel ( veh ) == 550 then
if getVehicleEngineState ( veh ) == true then
if getElementSpeed ( veh, "kmh" ) > 10 then
if idle_sound then
destroyElement ( idle_sound )
idle_sound = nil
end
if sound == nil then
sound = playSound3D ( engine_sound_4, 0, 0, 0, true )
setElementDimension ( sound, getElementDimension(veh) )
setElementInterior ( sound, getElementInterior(veh) )
attachElements ( sound, veh )
end
setSoundSpeed ( sound, getVehicleRPM(veh)/10000 )
elseif getElementSpeed ( veh, "kmh" ) < 10 then
if idle_sound == nil then
idle_sound = playSound3D ( idle_soundfile_4, 0, 0, 0, true )
setElementDimension ( idle_sound, getElementDimension(veh) )
setElementInterior ( idle_sound, getElementInterior(veh) )
setSoundVolume ( idle_sound, 0.5 )
attachElements ( idle_sound, veh )
end
if sound then
destroyElement ( sound )
sound = nil
end
elseif getElementSpeed ( veh, "kmh" ) == 0 then
if sound then
destroyElement ( sound )
sound = nil
end
end
else
if sound then
destroyElement ( sound )
sound = nil
end
if idle_sound then
destroyElement ( idle_sound )
idle_sound = nil
end
end
elseif getElementModel ( veh ) == 466 then
if getVehicleEngineState ( veh ) == true then
if getElementSpeed ( veh, "kmh" ) > 10 then
if idle_sound then
destroyElement ( idle_sound )
idle_sound = nil
end
if sound == nil then
sound = playSound3D ( engine_sound_20, 0, 0, 0, true )
setElementDimension ( sound, getElementDimension(veh) )
setElementInterior ( sound, getElementInterior(veh) )
attachElements ( sound, veh )
end
setSoundSpeed ( sound, getVehicleRPM(veh)/10000 )
elseif getElementSpeed ( veh, "kmh" ) < 10 then
if idle_sound == nil then
idle_sound = playSound3D ( idle_soundfile_20, 0, 0, 0, true )
setElementDimension ( idle_sound, getElementDimension(veh) )
setElementInterior ( idle_sound, getElementInterior(veh) )
setSoundVolume ( idle_sound, 0.5 )
attachElements ( idle_sound, veh )
end
if sound then
destroyElement ( sound )
sound = nil
end
elseif getElementSpeed ( veh, "kmh" ) == 0 then
if sound then
destroyElement ( sound )
sound = nil
end
end
else
if sound then
destroyElement ( sound )
sound = nil
end
if idle_sound then
destroyElement ( idle_sound )
idle_sound = nil
end
end
elseif getElementModel ( veh ) == 543 then
if getVehicleEngineState ( veh ) == true then
if getElementSpeed ( veh, "kmh" ) > 10 then
if idle_sound then
destroyElement ( idle_sound )
idle_sound = nil
end
if sound == nil then
sound = playSound3D ( engine_sound_21, 0, 0, 0, true )
setElementDimension ( sound, getElementDimension(veh) )
setElementInterior ( sound, getElementInterior(veh) )
-
I can find it somewhere in Freeroam?
That is default nametag system -
These scenarios do not change an object by 'TXD'.
I need the function code to write a script. ( Billboard )
-
someone please help me
-
that right. but I do not know what to do
You mean you want to change an object to TXD? -
I want to change the billboards with 'TXD' must do like. I do not know the code.
-
tks. i love you
It should works.local marker = createMarker(1650.01, 1750.13, 9.67, "cylinder", 2, 53, 53, 255, 255) veh = {} function spawn(player,x,y,z,rt) if getElementType(player) == "player" then local x,y,z = getElementPosition(source) veh[player] = createVehicle(596, x,y,z+1,0,0,rt) warpPedIntoVehicle(player, veh[player]) else outputChatBox("You already are in a vehicle!", player,255,255,2255) end end addEventHandler("onMarkerHit", marker, spawn) function vehicleExit () setTimer(destroyElement, 60000, 1, veh[player]) end addEventHandler ( "onPlayerVehicleExit", getResourceRootElement(getThisResource()), vehicleExit )
-
I write a script, when players enter the marker, they will get a bike. And when they leave the car, the car will automatically disappear after 60 seconds. But it is not working. Help
local marker = createMarker(-1247, -163, 13.14, "cylinder", 1.5, 0 ,255, 0, 155) function vehicle(thePlayer) if getElementType(thePlayer) == "player" then if isPedInVehicle(thePlayer)==true then return end if isElement( veh ) then destroyElement( veh ) end local x,y,z = getElementPosition(thePlayer) veh = createVehicle(510, x,y,z) warpPedIntoVehicle(thePlayer, veh) end end addEventHandler("onMarkerHit", marker, vehicle) function mainFunction() outputChatBox ("Xe đạp công cộng VNA[MTA:RP]") setTimer ( function() destroyElement (veh) end, 60000, 1 ) end mainFunction()
-
I see something wrong. Check me.
local marker = createMarker(-1247, -163, 13.14, "cylinder", 1.5, 0 ,255, 0, 155) function vehicle(thePlayer) if getElementType(thePlayer) == "player" then if isPedInVehicle(thePlayer)==true then return end if isElement( veh ) then destroyElement( veh ) end local x,y,z = getElementPosition(thePlayer) veh = createVehicle(510, x,y,z) warpPedIntoVehicle(thePlayer, veh) end end addEventHandler("onMarkerHit", marker, vehicle) function mainFunction() outputChatBox ("Xe đạp công cộng VNA[MTA:RP]") setTimer ( function() destroyElement (veh) end, 60000, 1 ) end mainFunction()
-
OK I will try, thank you very much
I need more. 60 seconds when the car down the vehicle will automatically disappear. tksYou can use
setTimer destroyElement
-
I need more. 60 seconds when the car down the vehicle will automatically disappear. tks
UsecreateBlip createMarker "onClientMarkerHit" triggerServerEvent createVehicle -- ID 509
-
I want to create a blip, when players step into that will give them a bike. I do like?
-
Thank you very much
-
I do not understand
-
it may work with the server RP?
maybe that help you https://community.multitheftauto.com/index.php?p= ... ils&id=488 -
I really need a script to change the car name , roleplay server
-
it does not work
-
No, roleplay
you use freeroam script? -
So how to change the car name from the system?
wrong section -,-, btw yes
AUTO DELETE ITEM?
in Scripting
Posted