Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2018-03-30, 08:36


Jodla

Majster






Wiek: 22
Na forum: 3126 dni
Posty: 41
Nick w MP: Stajl

Piwa: 817

Respekt: 20,5

Witam chcia?em przenie?? przechowywalnie z PYS i przenios?em blipy napisy itd tylko problem jest taki ?e jak wjad? w blip do chowania pojazdu to on nie reaguje.
Chodzi o Cuboid
Kod:

Kod:

--[[
addEventHandler("onResourceStart", resourceRoot,
function ()
CuboidNumber_0 = createColCuboid(-1951.8657226563, 613.52954101563, 33.78190612793, 14.4, 7.3, 6.2)
end
)
--]]

--[[
addEventHandler("onResourceStart", resourceRoot,
function ()
CuboidNumber_0 = createColCuboid(-1966.6160888672, 613.84454345703, 33.78190612793, 14.4, 7.3, 6.2)
end
)
--]]


local marker=createMarker(-1983.70, 479.06, 35.17-2, "cylinder", 6.4, 255,255,255,20)
createBlip(-1983.70, 479.06, 35.17, 35,2,0,0,0,0,0,250)
local mdestroy = createColCuboid(-1983.70, 479.06, 35.17, 14.4, 7.3, 6.2)
local t=createElement("text")
setElementData(t,"scale",1.5)
setElementData(t,"name","Pozostawianie pojazd?w")
setElementPosition(t,-1983.70, 479.06, 35.17)

addEvent("onParkingGetRekords", true)
addEventHandler("onParkingGetRekords", root, function()
local sid=getElementData(source,"player:sid")
if not sid then return end
local org = getElementData(source,"player:organization")
local result=exports["pystories-db"]:dbGet("SELECT * FROM pystories_vehicles WHERE (ownedPlayer=? OR ownedGroup=?) AND parking=1",sid,org or "Brak")
if #result > 0 then
triggerClientEvent(source, "onParkingGetVehicles", source, result)
end
end)

addEventHandler("onColShapeHit", mdestroy, function(el,md)
if getElementType(el) == "player" then
local veh=getPedOccupiedVehicle(el)
if not veh then return end
if getVehicleController(veh) ~= el then return end
local id=getElementData(veh,"vehicle:id")
if not id then return end
if isTimer(timeroddania) then return end
setElementFrozen(veh,true)
outputChatBox("* Trwa Chowanie Pojazdu...", el)
toggleControl(el,"enter_exit",false)
timeroddania=setTimer(function()
setElementFrozen(veh,false)
local id=getElementData(veh,"vehicle:id")
if not id then return end
exports["pystories-vehicles"]:onSaveVehicle(veh)
destroyElement(veh)
exports["pystories-db"]:dbSet("UPDATE pystories_vehicles SET parking=1 WHERE id=?", id)
toggleControl(el,"enter_exit",true)
outputChatBox("* Pomy?lnie zchowano pojazd.", el)
end, 3000, 1)
elseif getElementType(el) == "vehicle" then
local peds= getVehicleOccupants(el)
if #peds > 0 then return end
local id=getElementData(el,"vehicle:id")
if not id then return end
if isTimer(timeroddania) then return end
timeroddania=setTimer(function()
setElementFrozen(el,false)
local id=getElementData(el,"vehicle:id")
if not id then return end
exports["pystories-vehicles"]:onSaveVehicle(el)
destroyElement(el)
exports["pystories-db"]:dbSet("UPDATE pystories_vehicles SET parking=1 WHERE id=?", id)
outputChatBox("* Pomy?lnie zchowano pojazd.", el, 255, 255 ,255 ,true)
end, 3000, 1)
setElementFrozen(el,true)
setVehicleLocked(el,true)
end
end)

addEvent("onParkingVehicleSpawn", true)
addEventHandler("onParkingVehicleSpawn", root, function(id)
if not id then return end
local spawn=exports["pystories-vehicles"]:onRespawnVehicles(_,id,{-1984.33, 471.59, 35.06, 1.1, 0.0, 179.1})
if spawn then
--addEventHandler("onClientRender",root,render1)
outputChatBox("* Pomy?lnie wyci?gni?to pojazd z przechowalni.",el)
end
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-03-30, 12:28


Kuks*







Wiek: 15
Na forum: 3030 dni
Posty: 246
Nick w MP: Kuks*

Piwa: 2208

Respekt: 115,8
Respekt: 115,8

Jodla, Jodla, Kod jest ok.
Mo?e daj ten cuboid troch? ni?ej, bo czasami przez to nie dzia?a

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-03-30, 14:09


Ciastuuś

Truck soon...






Wiek: 26
Na forum: 3071 dni
Posty: 799
Nick w MP: Ciastuuś

Piwa: 4297

Respekt: 640
Respekt: 640Respekt: 640

Polecam pos?u?y? si? komend? 'devmode', kt?ra w??czy Ci tryb dla developer?w,

addCommandHandler "devmode", 
    function ( ) 
        setDevelopmentMode not getDevelopmentMode ( ) ) 
    end 
)


Po czym wpisz /showcol, kt?ry uka?e Ci stref? cuboid'a, czym ?atwiej b?dziesz m?g? Sobie j? ustawi?, gdy? b?dziesz mia? widoczn? ;)

Podpis
Truck soon...
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-04-01, 09:30


Jodla

Majster






Wiek: 22
Na forum: 3126 dni
Posty: 41
Nick w MP: Stajl

Piwa: 817

Respekt: 20,5

Dzi?ki :-)

Podpis
znam jakieś tam podstawy

==
Skrypt wojsko ACL -
https://gtao.pl/skrypt-wojsko-acl-vt134899.htm#833500
--
Skrypt Whitelista -
https://gtao.pl/skrypt-whitelista-vt135327.htm#835548
===
Postaw piwo autorowi tego posta
 

 
Tagi: nie :: działa :: cuboid :: przy :: przenoszeniu :: przecho
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku