Jump to content

ماركر


Recommended Posts

local Marker = createMarker (X, Y, Z, "cylinder", 1.5, 0, 255, 0, 255) 
addEventHandler("onClientMarkerHit",Marker, 
function( player ) 
    if ( player == localPlayer and getElementType(player) == "player" )  then 
        guiSetVisible(windowName,true) 
        showCursor(true) 
    end 
end) 
Link to comment
local Marker = createMarker (X, Y, Z, "cylinder", 1.5, 0, 255, 0, 255) 
addEventHandler("onClientMarkerHit",Marker, 
function( player ) 
    if ( player == localPlayer and getElementType(player) == "player" )  then 
        guiSetVisible(windowName,true) 
        showCursor(true) 
    end 
end) 

تسلم

Link to comment
local Marker = createMarker (X, Y, Z, "cylinder", 1.5, 0, 255, 0, 255) 
addEventHandler("onClientMarkerHit",Marker, 
function( player ) 
    if ( player == localPlayer and getElementType(player) == "player" )  then 
        guiSetVisible(windowName,true) 
        showCursor(true) 
    end 
end) 

الكود فيه مشكلة اول ما اخش السيرفر تفتح اللوحه علطول

Link to comment
  
--اكواد صنع اللوحة هنا 
guiSetVisible(windowName,false) 
  
local Marker = createMarker (X, Y, Z, "cylinder", 1.5, 0, 255, 0, 255) 
addEventHandler("onClientMarkerHit",Marker, 
function( player ) 
    if ( player == localPlayer and getElementType(player) == "player" )  then 
        guiSetVisible(windowName,true) 
        showCursor(true) 
    end 
end) 

Link to comment
local Marker1 = createMarker (X, Y, Z, "cylinder", 1.5, 0, 255, 0, 255) 
local Marker2 = createMarker (X, Y, Z, "cylinder", 1.5, 0, 255, 0, 255) 
  
addEventHandler("onClientMarkerHit", resourceRoot, 
function( player ) 
    if source == Marker1 or  source == Marker2 then 
        if ( player == localPlayer and getElementType(player) == "player" )  then 
            guiSetVisible(windowName,true) 
            showCursor(true) 
        end 
    end 
end) 

Link to comment
  
-- ألجدول 
Markers = { -- x,y,z 
{-714.08746,960.65112,12.26602}, 
{-720.15747,955.95697,12.13281}, 
{-710.36823,954.53931,12.40875}, 
} 
  
-- فنكشن صنع الماركرات 
function createMarkers() 
    for index, data in pairs(Markers) do -- يطلع قيم الاحداثيات داخل الجدول 
        local marker = createMarker(data[1], data[2], data[3]) -- يسوي الماركر 
        addEventHandler("onClientMarkerHit", marker, YourFunction) -- حدث دخوله على الماركر 
    end  
end 
addEventHandler("onClientResourceStart", resourceRoot, createMarkers) 
  
-- الفنكشن ذا حط فيه الي تبي تحطه لما الاعب يدخل على الماركر 
function YourFunction()  
outputChatBox("TEST") 
end 
  

Link to comment
حط اكوادك
local Marker = createMarker (-294.83737182617, 1539.7805175781, 74.5625, "cylinder", 1, 0, 255, 0, 255) 
 local Marker = createMarker (-357.54867553711, 2199.1669921875, 42.484375, "cylinder", 1, 0, 255, 0, 255) 
addEventHandler("onClientMarkerHit",Marker, 
  
  
  
function( player ) 
    if ( player == localPlayer and getElementType(player) == "player" )  then 
        guiSetVisible(GUIEditor.window[1],true) 
        showCursor(true) 
    end 
end) 
  
local Table = {  
{-294.83737182617,1539.7805175781,75.5625}, 
{-357.54867553711,2199.1669921875,42.484375}, 
} 
  
for i,v in ipairs ( Table ) do  
Marker = createMarker ( v[1] , v[2] , v[3]-1, 'cylinder' , 1.5 , 255 , 255 , 0, 255) 
end 

Link to comment
  
-- ألجدول 
Markers = { -- x,y,z 
{-714.08746,960.65112,12.26602}, 
{-720.15747,955.95697,12.13281}, 
{-710.36823,954.53931,12.40875}, 
} 
  
-- فنكشن صنع الماركرات 
function createMarkers() 
    for index, data in pairs(Markers) do -- يطلع قيم الاحداثيات داخل الجدول 
        local marker = createMarker(data[1], data[2], data[3]) -- يسوي الماركر 
        addEventHandler("onClientMarkerHit", marker, YourFunction) -- حدث دخوله على الماركر 
    end  
end 
addEventHandler("onClientResourceStart", resourceRoot, createMarkers) 
  
-- الفنكشن ذا حط فيه الي تبي تحطه لما الاعب يدخل على الماركر 
function YourFunction()  
outputChatBox("TEST") 
end 
  

الفنكشن الاخير احط بدال تست اسم اللوحه ؟

Link to comment
انت مو فاهم وش ابي

انا اللي ابغاه ابغا اربط اكثر من لوحه مع اكثر من ماركر فهمت علي ؟

لآزم تسوي كل ماركر على حدى اذا تبي تربطه بلوحة معينة مالها دخل بالماركرات الثانية

Link to comment
انت مو فاهم وش ابي

انا اللي ابغاه ابغا اربط اكثر من لوحه مع اكثر من ماركر فهمت علي ؟

لآزم تسوي كل ماركر على حدى اذا تبي تربطه بلوحة معينة مالها دخل بالماركرات الثانية

يعني اسوي اكثر من مود !

Link to comment
local Marker = createMarker (-294.83737182617, 1539.7805175781, 74.5625, "cylinder", 1, 0, 255, 0, 255) 
local Marker2 = createMarker (-357.54867553711, 2199.1669921875, 42.484375, "cylinder", 1, 0, 255, 0, 255) 
---------------- 
addEventHandler("onClientMarkerHit", resourceRoot, 
function  (player)   
    if ( player == localPlayer and getElementType(player) == "player" ) then 
        if ( source == Marker ) then 
            guiSetVisible(UrWindow1 ,not guiGetVisible(UrWindow1)) 
            showCursor(guiGetVisible(UrWindow1)) 
        elseif ( source == Marker2 ) then 
            guiSetVisible(UrWindow2 ,not guiGetVisible(UrWindow2)) 
            showCursor(guiGetVisible(UrWindow2)) 
        end 
    end 
end) 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...