Jump to content

Need help at some stuff.


Dazsh

Recommended Posts

local blips = { }; 
  
addEventHandler( 'onResourceStart', resourceRoot, 
    function( ) 
        for _, player in ipairs( getElementsByType ( 'player' ) ) do 
            for _, aclGroup in ipairs ( { 'Admin', 'Moderator', 'SuperModerator', 'Console' } ) do 
                if isObjectInACLGroup ( "user." ..getAccountName( getPlayerAccount( player ) ) , aclGetGroup ( aclGroup ) ) then 
                    if isElement ( blips[ player ] ) then 
                        destroyElement ( blips[ player ] );  
                    end 
                    blips[ player ] = createBlipAttachedTo( player, 21, 1, 255, 255, 255, 150, nil, root ); 
                end 
            end 
        end 
    end 
); 
  
addEventHandler( 'onPlayerLogin', root, 
    function() 
        for _, aclGroup in ipairs ( { 'Admin', 'Moderator', 'SuperModerator', 'Console' } ) do 
            if isObjectInACLGroup ( "user." ..getAccountName( getPlayerAccount( source ) ) , aclGetGroup ( aclGroup ) ) then 
                if isElement ( blips[ source ] ) then 
                    destroyElement ( blips[ source ] );  
                end 
                blips[ source ] = createBlipAttachedTo( source, 21, 1, 255, 255, 255, 150, nil, root ); 
            end 
        end 
    end 
); 
  
addEventHandler ( 'onPlayerLogout',  root, 
    function( ) 
        if isElement ( blips[ source ] ) then 
            destroyElement ( blips[ source ] );  
        end 
        blips[ source ] = nil; 
    end 
); 
  
addEventHandler ( 'onPlayerQuit',  root, 
    function( ) 
        if isElement ( blips[ source ] ) then 
            destroyElement ( blips[ source ] );  
        end 
        blips[ source ] = nil 
    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...