Jump to content

[help]onMarkerHit


Gallagher

Recommended Posts

how do I open my dashboard when a player touches the marker?

function PlayerHaveLevel( ) 
    local accName = getAccountName ( getPlayerAccount ( source ) ) 
    if ( isObjectInACLGroup ("user."..accName, aclGetGroup ( "VIP" ) ) ) then 
        triggerClientEvent(source, "ShowVipPanel", source ) 
    else 
        outputChatBox("Você não e V.I.P para usar esse comando",source) 
    end 
end 
  
addEvent( "ClientHaveLevel", true ) 
addEventHandler( "ClientHaveLevel", getRootElement(), PlayerHaveLevel ) 
addEventHandler("onMarkerHit",marker16,PlayerHaveLevel) 
  
marker16 = createMarker(-62.98583984375,-1121.4749755859,0.172990322113, "cylinder", 2, 0, 255, 0, 255 ) 
blip = createBlip( -62.98583984375,-1121.4749755859,0.172990322113, 6 ) 

Link to comment
marker16 = createMarker(-62.98583984375,-1121.4749755859,0.172990322113, "cylinder", 2, 0, 255, 0, 255 ) 
  
function PlayerHaveLevel ( hitElement ) 
    if ( getElementType ( hitElement ) == "player" and not isPedInVehicle ( hitElement ) ) then 
        local accName = getAccountName ( getPlayerAccount ( hitElement ) ) 
        if ( isObjectInACLGroup ("user.".. accName, aclGetGroup ( "VIP" ) ) ) then 
            triggerClientEvent ( hitElement, "ShowVipPanel", hitElement ) 
        else 
            outputChatBox ( "Você não e V.I.P para usar esse comando", hitElement ) 
        end 
    end 
end 
addEventHandler ( "onMarkerHit", marker16, PlayerHaveLevel ) 
  
addEvent( "ClientHaveLevel", true ) 
addEventHandler( "ClientHaveLevel", getRootElement(), PlayerHaveLevel ) 
  
blip = createBlip( -62.98583984375,-1121.4749755859,0.172990322113, 6 ) 

Link to comment
marker16 = createMarker(-62.98583984375,-1121.4749755859,0.172990322113, "cylinder", 2, 0, 255, 0, 255 ) 
  
function PlayerHaveLevel ( hitElement ) 
    if ( getElementType ( hitElement ) == "player" and not isPedInVehicle ( hitElement ) ) then 
        local accName = getAccountName ( getPlayerAccount ( hitElement ) ) 
        if ( isObjectInACLGroup ("user.".. accName, aclGetGroup ( "VIP" ) ) ) then 
            triggerClientEvent ( hitElement, "ShowVipPanel", hitElement ) 
        else 
            outputChatBox ( "Você não e V.I.P para usar esse comando", hitElement ) 
        end 
    end 
end 
addEventHandler ( "onMarkerHit", marker16, PlayerHaveLevel ) 
  
addEvent( "ClientHaveLevel", true ) 
addEventHandler( "ClientHaveLevel", getRootElement(), PlayerHaveLevel ) 
  
blip = createBlip( -62.98583984375,-1121.4749755859,0.172990322113, 6 ) 

The way you spoke before had worked: D Thanks

Another question now, it is possible to attach the Marker in a player?

example, I type / markerme, and the bullet is stuck in me, and if any come near me opens the panel?

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