Witam!
Ot?? wsiadaj?c do pojazdu na miejsce pasa?era mog? obs?ugiwa? Interakcj?.
M?g?by mi to kto? powiedzie? jak to zablokowa?? Stawiam oraz za pomoc!
bindKey("lshift","down",function()
local theVehicle = getPedOccupiedVehicle(localPlayer)
if theVehicle and getVehicleController(pedzik) == localPlayer then
if bind == false then
addEventHandler("onClientRender",root,gui)
bind = true
showCursor(true)
else
removeEventHandler("onClientRender",root,gui)
bind = false
showCursor(false)
end
end
end)
albo tak jak kolega wy?ej
bindKey("lshift","down",function()
local theVehicle = getPedOccupiedVehicle(localPlayer)
if theVehicle and getPedOccupiedVehicleSeat ( thePed ) == 1 then
if bind == false then
addEventHandler("onClientRender",root,gui)
bind = true
showCursor(true)
else
removeEventHandler("onClientRender",root,gui)
bind = false
showCursor(false)
end
end
end)
no nie do ko?ca tak jak napisa?e?:
W pierwszym powinno by?:
Yasuo, Niestety ?aden z kod?w nie dzia?a, interakcja si? nie otwiera ani po stronie pasa?era ani po stronie kierowcy.
[ Dodano: 2018-04-12, 21:00 ] Eitho, Teraz tak wygl?da kod:
bindKey("lshift","down",function()
local theVehicle = getVehicleController(theVehicle) == localPlayer
if theVehicle and getPedOccupiedVehicleSeat(localPlayer) == 0 then
if bind == false then
addEventHandler("onClientRender",root,gui)
bind = true
showCursor(true)
else
removeEventHandler("onClientRender",root,gui)
bind = false
showCursor(false)
end
end
end)
local theVehicle = getVehicleController(theVehicle) == localPlayer
deklarujesz w zly sposob
i wystarczy ze dasz tylko ta funkcje gdzie
if getPedOccupiedVehicleSeat(localPlayer) == 0
wtedy wiadomo ze gracz siedzi na miejscu kierowcy i jest w jakims pojezdzie wiec dasz mu dostep do gui
bindKey("lshift","down",function()
if getPedOccupiedVehicleSeat(localPlayer) == 0 then
if bind == false then
addEventHandler("onClientRender",root,gui)
bind = true
showCursor(true)
else
removeEventHandler("onClientRender",root,gui)
bind = false
showCursor(false)
end
end
end)
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