Witam chc? aby inni gracze nie mogli u?ywa? tego markeru tylko jedna osoba kt?ra rozpocznie prace. zrobi?em tak ale co? nie dzia?a. Oczywiscie oni tego markeru nie widz? ale jak wejda w to miejsce to i tak te funkcj? si? wykonuj? u osoby kt?ra rozpocz??a prace,
Witam, nie tworzy mi markeru do budynku prawa jazdy, czy wszystko tu jest dobrze napisane? Jezeli tak to jaki mo?e by? pow?d?
////////////////////////////////////////////////
[Lua]
createBlip(1112.52, -1835.87, 16.60, 36,2,0,0,0,0,0,275)
local text=createElement("text")
setElementPosition(text,1112.52, -1835.87, 16.60+0.8)
setElementData(m, "text","Wej?cie Prawo jazdynLos Santos")
local text=createElement("text")
setElementPosition(text,-2026.88, -103.60, 1035.18+0.8)
setElementData(text,"name","Wyj?cie z prawa jazdy nLos Santos")
setElementInterior(text, 3)
setElementDimension(text, 1)
addEventHandler("onMarkerHit", wejscie, function(el, md)
if getElementType(el) ~= "player" then return end
if isPedInVehicle(el) then return end
setElementInterior(el, 3)
setElementDimension(el, 1)
setElementPosition(el, -2029.72, -106.90, 1035.17)
end)
addEventHandler("onMarkerHit", wyjscie2, function(el, md)
if isPedInVehicle(el) then return end
setElementInterior(el, 0)
setElementDimension(el, 0)
...
witam jak w tym kodzie zmieni? to, aby "podmieniony" marker byl podmieniony pod marker o nazwie "arrow", zamiast pod "cylinder"?
[lua]
MARKER_DRAW_DISTANCE = 3000
MARKER_FADE_DISTANCE = MARKER_DRAW_DISTANCE-10
MARKER_REFRESH_TIMEOUT = 500 -- czas w ms co ile wyszukuje markery w poblizu
tick_rotation=getTickCount()
local markers = {}
local textures = {}
local iconSize = Vector2(0.8, 0.8)
function findRotation(from_x, from_y, to_x, to_y)
local result = -math.deg(math.atan2(to_x - from_x, to_y - from_y))
return result < 0 and result + 360 or result
end
local thisTick = getTickCount()
local font = exports['lrpg-dxGui']:dxGetFont('default') or 'default-bold'
function renderCustomMarkers()
local cx, cy, cz = getCameraMatrix()
local rx, ry, rz = getElementRotation(getCamera())
local posPlayerX, posPlayerY, posPlayerZ=getElementPosition(localPlayer)
local pX,pY,pZ=getElementRotation(localPlayer)
--local tick = math.abs(getTickCount() % 2500 - 2500/2) / 2500/2
local tick = interpolateBetween(0,0,0,0.3,0,0, (getTickCount()-thisTick)/2500, "SineCurve")
for i, marker in ipairs(markers) do
if isElement(marker) then
local x, y, z = getElementPosition(marker)
local radius = getMarkerSize(marker) or 3
local color = {getMarkerColor(marker)} or {255, 255, 255, 255}
local icon = getElementData(marker, "icon") or "marker"
local dist = getDistanceBet...
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:
Witam, mam jeden problem nie tworzy mi si? marker (oczywi?cie element dat? mam nadan?, po stronie serwera). B??d wywala w eventHandlerze w 2 argumencie ( Expected element at argument 1, got nil )