function isPlayerInFaction1(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;', "SARA", sid)
if result[1] then
return true
else
return false
end
end
local bramaSARA = createObject(971, -489.29,-562.46,25.52, 0, 0, 180)
local bramaSARAm = createMarker(-489.77,-563.30,25.34, "cylinder", 8, 255, 255, 255, 0)
addEventHandler("onMarkerHit", bramaSARA, function(el)
if not isPlayerInFaction1(el) then return end
local px, py, pz = getElementPosition(bramaSARA)
moveObject(bramaSARA, 4000, px, py, pz-15)
end)
addEventHandler("onMarkerLeave", bramaSARAm, function(el)
if not isPlayerInFaction1(el) then return end
moveObject(bramaSARA, 4000, -489.77,-563.30,25.34)
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