server:
privatecar = createVehicle ( 409, 0, 0, 3 )
addEventHandler ( "onVehicleEnter", root,
function ( player, seat, jacked )
if ( source == privatecar ) then
if not ( getPlayerName ( player ) == "Torran" ) then
removePedFromVehicle ( player )
end
end
end
)
1) Для клонирования объектов подойдет: Roller_Coaster_Generator
2) Как вариант:
client
function jumpBind ( _, keyState )
local vehicle = getPedOccupiedVehicle ( localPlayer )
if isPedInVehicle ( localPlayer ) and getVehicleController ( vehicle ) == localPlayer then
if ( keyState == "down" ) then
local x, y, z = getElementVelocity ( vehicle )
setElementVelocity ( vehicle, x, y, z + 0.3 )
end
end
end
bindKey ( "lshift", "both", jumpBind )
addEvent( "Zomb_Moan", true )
function Zmoan ( ped, randnum )
if (isElement(ped)) then
local Zx,Zy,Zz = getElementPosition( ped )
if ( randnum == 5 or randnum == 7 ) then
return
end
local sound = playSound3D("sounds/mgroan"..randnum..".ogg", Zx, Zy, Zz, false)
setSoundMaxDistance(sound, 20)
end
end
addEventHandler( "Zomb_Moan", getRootElement(), Zmoan )