Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: wychodzenie
1. wychodzenie z pojazdu
M?g? by mnie kto? o?wieci? jak zrobi? aby po wyjsciu z pojazdu do kt?rego zosta? przeniesiony gracz zosta? on tp w ustalone miejsce?
2. Wychodzenie z pojazdu
Witam, mam pytanko, jak zablokowa? wyj?cie z pojazdu, ?e je?eli klikniemy np f czy enter, to anuluje ten event.
3. Wychodzenie z Cuboidu oraz zabieranie broni
Witam ot?? pomo?e mi kto?, bo chce ?e jak wyjdziemy z strefy DM zabierze nam bro?, pom?g?by kto?>?
kod
[lua]local area=createRadarArea(-123.19,1653.11, 520, 450, 450, 0, 0, 40)
--2918.59,-896.90
setRadarAreaFlashing(area, true)

local strefa = createColRectangle(-123.19,1653.11, 520, 450)

local strefa = createColCuboid(758.02,8.2,999.70, 5.5, 5.5, 3) -- Siłownia
setElementDimension(strefa, 31)

addEventHandler("onColShapeHit", resourceRoot,
function(plr,dim)
if (getElementType(plr) == "player") then
if dim then
if getElementDimension(plr)==0 then
if getElementInterior(plr) == 0 then
setElementData(plr, "strefadm", true)
exports["es-komunikaty"]:komunikat("Wchodzisz do strefy DM.", plr)

if getElementData(plr, "kajdanki") or getElementData(plr, "delikwent") then
return
end
if not isControlEnabled(plr, "enter_exit") and isPedInVehicle(plr) then
return
end
toggleControl(plr, "fire", true)
toggleControl(plr, "aim_weapon", true)
end
end
end
end
end
)

addEventHandler("onColShapeLeave", resourceRoot,
function(plr,dim)
if (getElementType(plr) == "player") then
if dim then
if getElementData(plr,"Policja:sluzba") then
setElementData(plr, "strefadm&qu...
4. Wychodzenie z markeru
Witam, mam pytanie
robie skrypt kt?ry robi bramy i jest marker gdy osoba w niego wejdzie sprawdza czy jest w bazie danych jest wszystko ok, tylko jest jeden problem jak zrobic aby po wyjsciu z markeru wykona?o si? moveobject. tylko zeby to nie by? timer.
kod:

local ow1 
createObject(5422945.70, -1535.4014.600090)
local wejscie1 createMarker(945.62,-1535.30,12.65"cylinder"32552552550)

function 
isPlayerInFaction(plr)
    
local sid=getElementData(plr,'player:sid')
    if 
not sid then return end

    local result
=exports['pystories-db']:dbGet('SELECT 1 FROM pystories_factions WHERE code=? AND sid=? LIMIT 1;'"SAMC"sid)
    if 
result[1then
        
return true
    
else
        return 
false
    end
end

addEventHandler
('onMarkerHit'wejscie1, function (plr)
    if 
isPlayerInFaction then
        moveObject 
(ow11000945.70, -1535.405.60)
5. wychodzenie z markera
witam, robie skrypt z gui i czy jest jakis event z zastosowaniem jak ziomek wyjdzie z markera to mu znika to?

za pomoc daje piwko i repke