Létezik, de nem nehéz írni egyet. moveObject, gui, trigger. Plusz az apró.
Ha géphez férek írok egy alapot, amit nézegethetsz, fejlesztheted. Nem vahyok profi, de ha tényleg nem tudsz, az segíthet
local x,y = guiGetScreenSize()function panelRender()dxDrawRectangle((x-230)/2,(y-120)/2,230,120,tocolor(0,0,0,160))dxCreateButton((x-230)/2,(y-30)/1.93,230,30,tocolor(73, 150, 122,160),\"Átkelés\")dxCreateButton((x-230)/2,(y-30)/1.78,230,30,tocolor(150, 73, 73,160),\"Bezárás\")endfunction buttons(b,s)local theVehicle = getPedOccupiedVehicle ( localPlayer )if theVehicle then if b == \"left\" and s == \"down\" then if isCursorInPosition((x-230)/2,(y-30)/1.93,230,30) then core(\"ok\") elseif isCursorInPosition((x-230)/2,(y-30)/1.78,230,30) then core(\"close\") end endend endaddEventHandler(\"onClientClick\", getRootElement(), buttons)function core(type)if type == \"Hit\"then showCursor(true) addEventHandler(\"onClientRender\", getRootElement(), panelRender)elseif type == \"Leave\" or type == \"close\" then showCursor(false) removeEventHandler(\"onClientRender\", getRootElement(), panelRender)elseif type == \"ok\" then outputChatBox(\"Sikeres\") showCursor(false) removeEventHandler(\"onClientRender\", getRootElement(), panelRender) triggerServerEvent(\"openGate\",localPlayer)endendaddEvent(\"inTheMarker\",true)addEventHandler(\"inTheMarker\",getRootElement(),core)function dxCreateButton(sx,sy,w,h,color,text)dxDrawRectangle(sx,sy,w,h,color)dxDrawText(text,sx+w,sy+h,sx,sy,tocolor(255,255,255),1,\"arial\",\"center\",\"center\")endfunction isCursorInPosition(boxX, boxY, boxW, boxH)if isCursorShowing() then local absoluteX, absoluteY = getCursorPosition() absoluteX, absoluteY = absoluteX*x, absoluteY*y return (absoluteX >= boxX and absoluteX <= boxX+boxW) and (absoluteY >= boxY and absoluteY <= boxY+boxH)else return falseendend
local Marker = createMarker(2476.72925, -1670.19153, 12.3,\"cylinder\",1.4,73, 150, 122,160)local defaultGate = createObject( 968, 2473.53613, -1669.20337, 13.32032, 90, 0, 0 )addEvent( \"openGate\", true )addEventHandler( \"openGate\", root, function(thePlayer)moveObject(defaultGate, 2000, 2473.53613, -1669.20337, 13.32032, -90, 0, 0)setTimer(function() moveObject(defaultGate, 2000, 2473.53613, -1669.20337, 13.32032, 90, 0, 0)end, 3000, 1)end)addEventHandler(\'onMarkerHit\', root, function(hitElement, hitDimension)if getElementType(hitElement) ~= \'player\' then return endlocal vehicle = getPedOccupiedVehicle(hitElement)if vehicle then if source == Marker then triggerClientEvent(hitElement, \"inTheMarker\", hitElement, \"Hit\") endendend)addEventHandler(\'onMarkerLeave\', root, function(hitElement, hitDimension)if getElementType(hitElement) ~= \'player\' then return endlocal vehicle = getPedOccupiedVehicle(hitElement)if vehicle then if source == Marker then triggerClientEvent(hitElement, \"inTheMarker\", hitElement, \"Leave\") endendend)
Ne haragudj, elhúzódott a film. Client: local x,y = guiGetScreenSize()function panelRender()dxDrawRectangle((x-230)/2,(y-120)/2,230,120,tocolor(0,0,0,160))dxCreateButton((x-230)/2,(y-30)/1.93,230,30,tocolor(73, 150, 122,160),\"Átkelés\")dxCreateButton((x-230)/2,(y-30)/1.78,230,30,tocolor(150, 73, 73,160),\"Bezárás\")endfunction buttons(b,s)local theVehicle = getPedOccupiedVehicle ( localPlayer )if theVehicle then if b == \"left\" and s == \"down\" then if isCursorInPosition((x-230)/2,(y-30)/1.93,230,30) then core(\"ok\") elseif isCursorInPosition((x-230)/2,(y-30)/1.78,230,30) then core(\"close\") end endend endaddEventHandler(\"onClientClick\", getRootElement(), buttons)function core(type)if type == \"Hit\"then showCursor(true) addEventHandler(\"onClientRender\", getRootElement(), panelRender)elseif type == \"Leave\" or type == \"close\" then showCursor(false) removeEventHandler(\"onClientRender\", getRootElement(), panelRender)elseif type == \"ok\" then outputChatBox(\"Sikeres\") showCursor(false) removeEventHandler(\"onClientRender\", getRootElement(), panelRender) triggerServerEvent(\"openGate\",localPlayer)endendaddEvent(\"inTheMarker\",true)addEventHandler(\"inTheMarker\",getRootElement(),core)function dxCreateButton(sx,sy,w,h,color,text)dxDrawRectangle(sx,sy,w,h,color)dxDrawText(text,sx+w,sy+h,sx,sy,tocolor(255,255,255),1,\"arial\",\"center\",\"center\")endfunction isCursorInPosition(boxX, boxY, boxW, boxH)if isCursorShowing() then local absoluteX, absoluteY = getCursorPosition() absoluteX, absoluteY = absoluteX*x, absoluteY*y return (absoluteX >= boxX and absoluteX <= boxX+boxW) and (absoluteY >= boxY and absoluteY <= boxY+boxH)else return falseendend Server: local Marker = createMarker(2476.72925, -1670.19153, 12.3,\"cylinder\",1.4,73, 150, 122,160)local defaultGate = createObject( 968, 2473.53613, -1669.20337, 13.32032, 90, 0, 0 )addEvent( \"openGate\", true )addEventHandler( \"openGate\", root, function(thePlayer)moveObject(defaultGate, 2000, 2473.53613, -1669.20337, 13.32032, -90, 0, 0)setTimer(function() moveObject(defaultGate, 2000, 2473.53613, -1669.20337, 13.32032, 90, 0, 0)end, 3000, 1)end)addEventHandler(\'onMarkerHit\', root, function(hitElement, hitDimension)if getElementType(hitElement) ~= \'player\' then return endlocal vehicle = getPedOccupiedVehicle(hitElement)if vehicle then if source == Marker then triggerClientEvent(hitElement, \"inTheMarker\", hitElement, \"Hit\") endendend)addEventHandler(\'onMarkerLeave\', root, function(hitElement, hitDimension)if getElementType(hitElement) ~= \'player\' then return endlocal vehicle = getPedOccupiedVehicle(hitElement)if vehicle then if source == Marker then triggerClientEvent(hitElement, \"inTheMarker\", hitElement, \"Leave\") endendend) Közel sem tökéletes, de kiindulási alapnak talán jó.
Igen, de a groove street-re rakja le, ott teszteltem.
type=\"\"server\"/>
type=\"\"server\"/> 2 idézőjelet írtál egymás mellé.
dxDrawRectangle Meg keress rá a forumon a dx gomb kifejezésre, nem csak én, ezer ember kérdezte régen.