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

Wysłany: 2017-12-28, 23:21


Ozzaku







Wiek: 29
Na forum: 3817 dni
Posty: 41
Nick w MP: Ozzaku

Piwa: 4

Respekt: 35,3

Witam Mam rozgrywke w sf i chc? zrobi? r?wniez w fc i jak daje auto do przecho to oddaje normalnie.A jak chce je wzi?? w fc to daje mi je do sf licze na pomoc . Stawiam piwko !

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-12-29, 00:26


piotr172







Wiek: 26
Na forum: 4417 dni
Posty: 130

Piwa: 2329

Respekt: 105,3
Respekt: 105,3

Podaj kod, bez kodu nic nie zdzia?amy.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-12-29, 00:30


Ozzaku







Wiek: 29
Na forum: 3817 dni
Posty: 41
Nick w MP: Ozzaku

Piwa: 4

Respekt: 35,3

Kod:

--[[
Resource: OURGame v2
Developers: Split <split.programista@gmail.com>
You have no right to use this code without my permission.
(c) 2015 <split.programista@gmail.com>. All rights reserved.
]]

local mdestroy=createMarker(-251.3076171875, 1216.080078125, 19.7421875-2, "cylinder", 5,0,71,255,60)
createBlipAttachedTo(mdestroy, 35)

local t=createElement("text")
setElementData(t,"scale",1.5)
setElementData(t,"name","Pozostawianie pojazd?w")
setElementPosition(t,-251.314453125, 1215.29296875, 19.7421875)

addEvent("onParkingGetRekords", true)
addEventHandler("onParkingGetRekords", root, function()
local uid=getElementData(source,"player:uid")
if not uid then return end
local result=exports["og-db"]:getRekord("SELECT * FROM og_vehicles WHERE ownedPlayer=? AND parking=1", uid)
if #result > 0 then
triggerClientEvent(source, "onParkingGetVehicles", source, result)
end
end)

addEventHandler("onMarkerHit", 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 oddawanie pojazdu.", el,255,255,255,true)
toggleControl(el,"enter_exit",false)
timeroddania=setTimer(function()
exports["og-vehicles"]:onSaveVehicle(veh)
destroyElement(veh)
exports["og-db"]:setRekord("UPDATE og_vehicles SET parking=1 WHERE id=?", id)
toggleControl(el,"enter_exit",true)
outputChatBox("* Pomy?lnie oddano pojazd.", el, 255, 255 ,255 ,true)
end, 3000, 1)
end
end)

addEvent("onParkingVehicleSpawn", true)
addEventHandler("onParkingVehicleSpawn", root, function(id)
if not id then return end
local spawn=exports["og-vehicles"]:onRespawnVehicles(_,id,{-243.939453125, 1216.3740234375, 19.7421875, 0, 0, 183.60905456543})
if spawn then
outputChatBox("* Wydano pojazd.", source)
end
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-12-29, 00:49


Gravgor







Wiek: 22
Na forum: 3619 dni
Posty: 380
Nick w MP: 1944

Piwa: 702

Respekt: 57,8

"Ozzaku" napisał/a:

Kod:

--[[
Resource: OURGame v2
Developers: Split <split.programista@gmail.com>
You have no right to use this code without my permission.
(c) 2015 <split.programista@gmail.com>. All rights reserved.
]]

local mdestroy=createMarker(-251.3076171875, 1216.080078125, 19.7421875-2, "cylinder", 5,0,71,255,60)
createBlipAttachedTo(mdestroy, 35)

local t=createElement("text")
setElementData(t,"scale",1.5)
setElementData(t,"name","Pozostawianie pojazd?w")
setElementPosition(t,-251.314453125, 1215.29296875, 19.7421875)

addEvent("onParkingGetRekords", true)
addEventHandler("onParkingGetRekords", root, function()
local uid=getElementData(source,"player:uid")
if not uid then return end
local result=exports["og-db"]:getRekord("SELECT * FROM og_vehicles WHERE ownedPlayer=? AND parking=1", uid)
if #result > 0 then
triggerClientEvent(source, "onParkingGetVehicles", source, result)
end
end)

addEventHandler("onMarkerHit", 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 oddawanie pojazdu.", el,255,255,255,true)
toggleControl(el,"enter_exit",false)
timeroddania=setTimer(function()
exports["og-vehicles"]:onSaveVehicle(veh)
destroyElement(veh)
exports["og-db"]:setRekord("UPDATE og_vehicles SET parking=1 WHERE id=?", id)
toggleControl(el,"enter_exit",true)
outputChatBox("* Pomy?lnie oddano pojazd.", el, 255, 255 ,255 ,true)
end, 3000, 1)
end
end)

addEvent("onParkingVehicleSpawn", true)
addEventHandler("onParkingVehicleSpawn", root, function(id)
if not id then return end
local spawn=exports["og-vehicles"]:onRespawnVehicles(_,id,{-243.939453125, 1216.3740234375, 19.7421875, 0, 0, 183.60905456543})
if spawn then
outputChatBox("* Wydano pojazd.", source)
end
end)

To
local spawn=exports["og-vehicles"]:onRespawnVehicles(_,id,{-243.9394531251216.374023437519.742187500183.60905456543}) 


Zmie? na swoje kordy

local spawn=exports["og-vehicles"]:onRespawnVehicles(_,id,{})


Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-12-29, 00:57


Ozzaku







Wiek: 29
Na forum: 3817 dni
Posty: 41
Nick w MP: Ozzaku

Piwa: 4

Respekt: 35,3

PieselDragon, Mam pytanie jaka komenda sie bierze kordy ? jestem jeszcze w tym zielony ;v

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-12-29, 00:58


Gravgor







Wiek: 22
Na forum: 3619 dni
Posty: 380
Nick w MP: 1944

Piwa: 702

Respekt: 57,8

"Ozzaku" napisał/a:

PieselDragon, Mam pytanie jaka komenda sie bierze kordy ? jestem jeszcze w tym zielony ;v


/gp lub /gp2 ale polecam drug? komende

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-12-29, 01:05


Ozzaku







Wiek: 29
Na forum: 3817 dni
Posty: 41
Nick w MP: Ozzaku

Piwa: 4

Respekt: 35,3

dobra jutro to ogarne i dam znac :) jak cos to piwko leci ;3

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-12-29, 12:11


BoskiJohnyy







Wiek: 25
Na forum: 3284 dni
Posty: 18

Piwa: 502

Respekt: 35,3

Ostrzeżeń: 20%
"PieselDragon" napisał/a:

"Ozzaku" napisał/a:

PieselDragon, Mam pytanie jaka komenda sie bierze kordy ? jestem jeszcze w tym zielony ;v


/gp lub /gp2 ale polecam drug? komende


Ale, i tak si? respi auto w innej przecho, bo my chcemy rozgrywk? powiekszy? o 1 miasto, i poiprostu all dzia?a respia sie auta ale nie tam gdzie zmieni?em kordy tylko w tej innej przecho... I nwm czemu tak jest..

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-12-29, 12:51


Kalizman







Wiek: 23
Na forum: 3651 dni
Posty: 1394

Piwa: 4619

Respekt: 358,8
Respekt: 358,8Respekt: 358,8Respekt: 358,8Respekt: 358,8

W takim razie trzeba rozszerzy? kod, np. poprzez stworzenie tabeli, w kt?rej b?d? znajdowa? si? kordy markera odbioru, oddania i kordy respienia auta.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-12-29, 13:22


BoskiJohnyy







Wiek: 25
Na forum: 3284 dni
Posty: 18

Piwa: 502

Respekt: 35,3

Ostrzeżeń: 20%
"Kalizman" napisał/a:

W takim razie trzeba rozszerzy? kod, np. poprzez stworzenie tabeli, w kt?rej b?d? znajdowa? si? kordy markera odbioru, oddania i kordy respienia auta.


Jak bym umia?.. zr? jak bys umia? ;P pls dam piwko ;p

Postaw piwo autorowi tego posta
 

 
Tagi: przecho :: daje :: auto :: samo :: miejsce
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