Jump to content

[help]onMarkerHit


Gallagher

Recommended Posts

Posted

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 ) 

Posted
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 ) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
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?

Posted

You're welcome.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

I don't understand what do you mean.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

But these messages only show up to the person who clicks, so what's the problem?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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