Jump to content

VIP Only


Recommended Posts

function togglePhone( source ) 
    -- Show the phone 
    if not guiGetVisible( phoneGui ) then 
        showCursor ( true ) 
        guiSetVisible( phoneGui, true ) 
         
        -- Update player list 
        guiGridListClear ( playerList ) 
        if ( column ) then 
            for id, player in ipairs(getElementsByType("player")) do 
                local row = guiGridListAddRow ( playerList ) 
                guiGridListSetItemText ( playerList, row, column, getPlayerName ( player ), false, false ) 
            end 
        end 
    else 
        showCursor ( false ) 
        guiSetVisible( phoneGui, false ) 
    end 
end  
addCommandHandler( "phone", togglePhone, source ) 

How to turn this just for member "VIP" can use?

Link to comment

Try this

client

function togglePhone( ) 
    -- Show the phone 
    if not guiGetVisible( phoneGui ) then 
        showCursor ( true ) 
        guiSetVisible( phoneGui, true ) 
        
        -- Update player list 
        guiGridListClear ( playerList ) 
        if ( column ) then 
            for id, player in ipairs(getElementsByType("player")) do 
                local row = guiGridListAddRow ( playerList ) 
                guiGridListSetItemText ( playerList, row, column, getPlayerName ( player ), false, false ) 
            end 
        end 
    else 
        showCursor ( false ) 
        guiSetVisible( phoneGui, false ) 
    end 
end 
addEvent("showPhoneGui", true) 
addEventHandler("showPhoneGui", getRootElement(), togglePhone ) 

add this to server side

function showGUI ( playerSource) 
    if (not isObjectInACLGroup("user."..getAccountName(getPlayerAccount(playerSource)), aclGetGroup("VIP"))) then 
        outputChatBox ("You're not a VIP Member", playerSource, 255,0,0)  return end 
    triggerClientEvent ( "showPhoneGui", playerSource )  
end 
addCommandHandler ( "phone", showGUI ) 

Pd: You must to be in ACL group "VIP"

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