DolareK
Mapper/Szkrypter
Wiek: 28 Na forum: 3760 dni Posty: 17
Nick w MP: FliX
Piwa : 190
Witam !
Mam Problem z ustawieniem tego skryptu pod acl admin, prosz? o jak najszybsz? pomoc !
Skrypt:
local NID ={
3962 , 2113 , 1784 , 2054 , 2428 , 2352
}
local postion ={- 1 , 0 ,- 0.5 }
function bindHoron4 ( veh )
if not veh then return end
local OBJECTID = tonumber ( getElementData ( veh , "neony" ))
if not OBJECTID then return end
if OBJECTID == 0 then return end
local zalozone = getElementData ( veh , "zalozone" )
if ( zalozone and type ( zalozone )== "table" ) then
destroyElement ( zalozone [ 1 ])
destroyElement ( zalozone [ 2 ])
removeElementData ( veh , "zalozone" )
else
neon1 = createObject ( NID [ OBJECTID ], 0 , 0 , 0 )
neon2 = createObject ( NID [ OBJECTID ], 0 , 0 , 0 )
setElementData ( veh , "zalozone" , { neon1 , neon2 })
attachElements ( neon1 , veh , postion [ 1 ], postion [ 2 ], postion [ 3 ])
attachElements ( neon2 , veh ,- postion [ 1 ], postion [ 2 ], postion [ 3 ])
setElementVelocity ( veh , 0 , 0 , 0.01 )
end
end
addEventHandler ( "onElementDestroy" , getRootElement (), function ()
if getElementType ( source ) == "vehicle" then
local zalozone = getElementData ( source , "zalozone" )
if ( zalozone and type ( zalozone )== "table" ) then
destroyElement ( zalozone [ 1 ])
destroyElement ( zalozone [ 2 ])
removeElementData ( source , "zalozone" )
end
end
end )
function outputChange ( dataName , oldValue )
if getElementType ( source ) == "vehicle" then
if dataName == "neony" then
local zalozone = getElementData ( source , "zalozone" )
if ( zalozone and type ( zalozone )== "table" ) then
destroyElement ( zalozone [ 1 ])
destroyElement ( zalozone [ 2 ])
removeElementData ( source , "zalozone" )
end
bindHoron4 ( source )
end
end
end
addEventHandler ( "onElementDataChange" , getRootElement (), outputChange )
function togglepanel ( player )
local seat = getPedOccupiedVehicleSeat ( player )
local vehicle = getPedOccupiedVehicle ( player )
if vehicle and seat == 0 then
triggerClientEvent ( player , "showWindow" , player )
setElementVelocity ( vehicle , 0 , 0 , 0 )
else
outputChatBox ( "*Nie jeste? w aucie lub nie siedzisz za kierownic?!" , player , 255 , 0 , 0 )
return end
end
addCommandHandler ( "melony" , togglepanel )
[ Komentarz dodany przez: Iggy : 2016-03-23, 16:30 ]
Doda?em tagi [lua]. Pami?taj, aby kod umieszcza? w przeznaczonych do tego tagach//Iggy.
Ostatnio zmieniony przez Iggy 2016-03-23, 16:29, w całości zmieniany 1 raz