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

Wysłany: 2017-02-25, 12:20


dida102

LUA To moja Pasja






Wiek: 25
Na forum: 3612 dni
Posty: 86
Nick w MP: Remi

Piwa: 642

Respekt: 20

Ostrzeżeń: 100%
Jak kupuje auto Jest w przecho al nie mg wyci?gn??

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

local mdestroy=createMarker(-358.73, 1199.27, 19.74, "cylinder",6,200,25,25,75)
local zone = createColSphere(-358.73, 1199.27, 19.74)
createBlipAttachedTo(mdestroy, 35)

local t=createElement("text")
setElementData(t,"scale",1)
setElementData(t,"name","Pozostawianie pojazd?w")
setElementPosition(t,-358.73, 1199.27, 19.74)


addEvent("onParkingGetRekords", true)
addEventHandler("onParkingGetRekords", root, function()
local uid=getElementData(source,"player:uid")
if not uid then return end
local org = getElementData(source,"player:organization")
local result=exports["ogrpg-db"]:dbGet("SELECT * FROM ogrpg_vehicles WHERE (ownedPlayer=? OR ownedGroup=?) AND parking=1",uid,org or "Brak")
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)
triggerClientEvent(el, "dodaj:powiadomienie", root, "* Pojazd wje?dza do przechowywalni...")
toggleControl(el,"enter_exit",false)
timeroddania=setTimer(function()
exports["ogrpg-vehicles"]:onSaveVehicle(veh)
destroyElement(veh)
exports["ogrpg-db"]:dbSet("UPDATE ogrpg_vehicles SET parking=1 WHERE id=?", id)
toggleControl(el,"enter_exit",true)
triggerClientEvent(el, "dodaj:powiadomienie", root, "* Pojazd zosta? zapisany w przechowywalni.")
end, 3000, 1)
end
end)

addEvent("onParkingVehicleSpawn", true)
addEventHandler("onParkingVehicleSpawn", root, function(id)
if not id then return end
if #getElementsWithinColShape(zone,"vehicle") >= 1 then
outputChatBox("* Respawn zastaniony!!",source)
return
end
local spawn=exports["ogrpg-vehicles"]:onRespawnVehicles(_,id,{-234.44,1154.45,19.45,359.5,0.0,2.7})
if spawn then
end
end)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-02-25, 12:58


amited







Wiek: 26
Na forum: 3714 dni
Posty: 1233
Nick w MP: Amited

Piwa: 512

Respekt: 466
Respekt: 466

Na przysz?o?? klamry LUA i po co dublujesz tematy jak w tamtym mog?em Ci pom?c ale nie poda?e? b??du???

--[[ 
ResourceOURGame v2 
DevelopersSplit <split.programista@gmail.comYou have no right to use this code without my permission. 
(c2015 <split.programista@gmail.com>. All rights reserved. 
]] 

local mdestroy=createMarker(-358.731199.2719.74"cylinder",6,200,25,25,75local zone createColSphere(-358.731199.2719.74createBlipAttachedTo(mdestroy35local t=createElement("text"setElementData(t,"scale",1setElementData(t,"name","Pozostawianie pojazd?w"setElementPosition(t,-358.731199.2719.74addEvent("onParkingGetRekords"trueaddEventHandler("onParkingGetRekords"root, function() 
local uid=getElementData(source,"player:uid") 
if not uid then return end 
local org getElementData(source,"player:organization"local result=exports["ogrpg-db"]:dbGet("SELECT * FROM ogrpg_vehicles WHERE (ownedPlayer=? OR ownedGroup=?) AND parking=1",uid,org or "Brak") 
if #result > 0 then 
triggerClientEvent(source"onParkingGetVehicles"sourceresultend 
endaddEventHandler("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(timeroddaniathen return end 
setElementFrozen(veh,truetriggerClientEvent(el"dodaj:powiadomienie"root"* Pojazd wje?dza do przechowywalni..."toggleControl(el,"enter_exit",falsetimeroddania=setTimer(function() 
exports["ogrpg-vehicles"]:onSaveVehicle(vehdestroyElement(vehexports["ogrpg-db"]:dbSet("UPDATE ogrpg_vehicles SET parking=1 WHERE id=?"idtoggleControl(el,"enter_exit",truetriggerClientEvent(el"dodaj:powiadomienie"root"* Pojazd zosta? zapisany w przechowywalni."end30001end 
endaddEvent("onParkingVehicleSpawn"trueaddEventHandler("onParkingVehicleSpawn"root, function(id) 
if not id then return end 
local pojazdy getElementsWithinColShape(zone,"vehicle")
if #pojazdy > 0 then 
outputChatBox("* Respawn zastaniony!!",source) 
return end 
local spawn=exports["ogrpg-vehicles"]:onRespawnVehicles(_,id,{-234.44,1154.45,19.45,359.5,0.0,2.7}) 
if spawn then 
outputChatBox("Zrespiono pojazd",source)
else
outputChatBox("Nie udalo sie zrespic pojazdu",source)
end
end)


Podpis
"amited" napisał/a:
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-02-25, 13:03


dida102

LUA To moja Pasja






Wiek: 25
Na forum: 3612 dni
Posty: 86
Nick w MP: Remi

Piwa: 642

Respekt: 20

Ostrzeżeń: 100%
nic

Podpis
Witaj na Moim Profilu.
Chętnie Pomogę Skype Pazdaix.
Szukam Mapera,Web Mastera,Modelarza Na Serwer Autorski Pod SQL .
Co Potrafię ,XML,LUA,Mapować,CSS,gui editor,siren editor.

!Pomogłem?Zostaw Respekt Oraz Piwo.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-02-25, 14:17


amited







Wiek: 26
Na forum: 3714 dni
Posty: 1233
Nick w MP: Amited

Piwa: 512

Respekt: 466
Respekt: 466


--[[ 
ResourceOURGame v2 
DevelopersSplit <split.programista@gmail.comYou have no right to use this code without my permission. 
(c2015 <split.programista@gmail.com>. All rights reserved. 
]] 

local mdestroy=createMarker(-358.731199.2719.74"cylinder",6,200,25,25,75local zone createColSphere(-358.731199.2719.74createBlipAttachedTo(mdestroy35local t=createElement("text"setElementData(t,"scale",1setElementData(t,"name","Pozostawianie pojazd?w"setElementPosition(t,-358.731199.2719.74addEvent("onParkingGetRekords"trueaddEventHandler("onParkingGetRekords"root, function() 
local uid=getElementData(source,"player:uid") 
if not uid then return end 
local org getElementData(source,"player:organization"local result=exports["ogrpg-db"]:dbGet("SELECT * FROM ogrpg_vehicles WHERE (ownedPlayer=? OR ownedGroup=?) AND parking=1",uid,org or "Brak") 
if #result > 0 then 
triggerClientEvent(source"onParkingGetVehicles"sourceresultend 
endaddEventHandler("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(timeroddaniathen return end 
setElementFrozen(veh,truetriggerClientEvent(el"dodaj:powiadomienie"root"* Pojazd wje?dza do przechowywalni..."toggleControl(el,"enter_exit",falsetimeroddania=setTimer(function() 
exports["ogrpg-vehicles"]:onSaveVehicle(vehdestroyElement(vehexports["ogrpg-db"]:dbSet("UPDATE ogrpg_vehicles SET parking=1 WHERE id=?"idtoggleControl(el,"enter_exit",truetriggerClientEvent(el"dodaj:powiadomienie"root"* Pojazd zosta? zapisany w przechowywalni."end30001end 
endaddEvent("onParkingVehicleSpawn"trueaddEventHandler("onParkingVehicleSpawn"root, function(id)
local spawn=exports["ogrpg-vehicles"]:onRespawnVehicles(_,id,{-234.44,1154.45,19.45,359.5,0.0,2.7}) 
if spawn then 
outputChatBox("Zrespiono pojazd",source)
else
outputChatBox("Nie udalo sie zrespic pojazdu",source)
end
end)
----------------------CLIENT SIDE---------------------------
local zone createColSphere(-358.731199.2719.74local pojazdy getElementsWithinColShape(zone,"vehicle")
if #pojazdy > 0 then 
outputChatBox("* Respawn zastaniony!!",source) 
return end 

Server side wgraj tak jak tutaj jest a do client side dopisz to co jest wy?ej

Podpis
"amited" napisał/a:
Postaw piwo autorowi tego posta
 

 
Tagi: 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