Jump to content

marker doesnt work?


SirniNamaz

Recommended Posts

When i go in the marker it doesnt show up gui

Client:

addEvent("mrkMakeDrugC",true) 
addEventHandler("mrkMakeDrugC",getRootElement(), 
function() 
    activateDrugSystem = "false" 
    guiSetVisible(guiMakingDrugs,true) 
end) 

Server:

mrkMakeDrug1 = createMarker(2560.2534179688, -1304.4836425781, 1044.125, "cylinder", 1) 
setElementInterior (mrkMakeDrug1, 2) 
  
  
  
function mrkMakeDrug() 
    triggerClientEvent(source,"mrkMakeDrugC",getRootElement()) 
end 
addEventHandler("onMarkerHit", mrkMakeDrug1, mrkMakeDrug) 

Link to comment

Give us the GUI code

And also try this code: (serverside)

local mrkMakeDrug1 = createMarker(2560.2534179688, -1304.4836425781, 1044.125, "cylinder", 1) 
    setElementInterior (mrkMakeDrug1, 2) 
  
  
  
function mrkMakeDrug(hitElement,matchingDimension) 
    if ( source == mrkMakeDrug1 ) then 
        if ( hitElement and getElementType(hitElement)=="player" and matchingDimension ) then 
            triggerClientEvent("mrkMakeDrugC",hitElement) 
        end 
    end 
end 
addEventHandler("onMarkerHit", root, mrkMakeDrug) 

Link to comment
Give us the GUI code

And also try this code: (serverside)

local mrkMakeDrug1 = createMarker(2560.2534179688, -1304.4836425781, 1044.125, "cylinder", 1) 
    setElementInterior (mrkMakeDrug1, 2) 
  
  
  
function mrkMakeDrug(hitElement,matchingDimension) 
    if ( source == mrkMakeDrug1 ) then 
        if ( hitElement and getElementType(hitElement)=="player" and matchingDimension ) then 
            triggerClientEvent("mrkMakeDrugC",hitElement) 
        end 
    end 
end 
addEventHandler("onMarkerHit", root, mrkMakeDrug) 

if he want that trigger happens only on the player when he hit the marker and not all players, you have to try this

function mrkMakeDrug(hitElement,matchingDimension) 
    if ( source == mrkMakeDrug1 ) then 
        if ( hitElement and getElementType(hitElement)=="player" and matchingDimension ) then 
            triggerClientEvent(hitElement,"mrkMakeDrugC",hitElement) 
        end 
    end 
end 
addEventHandler("onMarkerHit", root, mrkMakeDrug) 

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...