Jump to content

ACL GUI


Bean666

Recommended Posts

hi , i need help in my GUI , I want it private for an ACL . And only "VIP" People can have access to it by pressing F5.

i tried isObjectinACLGroup functions , but i had some problems with it and doesnt work :/

Code:

Client.lua

  
GUIEditor = { 
    button = {}, 
    window = {}, 
    label = {}, 
    memo = {} 
} 
        GUIEditor.window[1] = guiCreateWindow(396, 152, 519, 434, "VIP Panel", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
        guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF03FA0F") 
        guiSetVisible (GUIEditor.window[1], false) 
        GUIEditor.label[1] = guiCreateLabel(121, 30, 277, 60, "Vip Panel", false, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.label[1], "sa-gothic") 
        guiLabelSetColor(GUIEditor.label[1], 253, 232, 1) 
        GUIEditor.button[1] = guiCreateButton(33, 133, 109, 41, "VIP Skin", false, GUIEditor.window[1]) 
        GUIEditor.button[2] = guiCreateButton(197, 132, 101, 42, "M4", false, GUIEditor.window[1]) 
        GUIEditor.button[3] = guiCreateButton(359, 132, 101, 42, "Deagle", false, GUIEditor.window[1]) 
        GUIEditor.button[4] = guiCreateButton(33, 223, 109, 41, "VIP Skin 2", false, GUIEditor.window[1]) 
    
        GUIEditor.button[5] = guiCreateButton(27, 380, 91, 39, "Close", false, GUIEditor.window[1])  
        GUIEditor.memo[1] = guiCreateMemo(185, 211, 324, 213, "VIP Panel By Shaman , Enjoy Donators :3\n\n--YOLO--\nFeatures:\n2 Vip Skins\nCheap Deagle , M4, M4 - 100$ , Deagle - 100$", false, GUIEditor.window[1]) 
        guiMemoSetReadOnly(GUIEditor.memo[1], true)     
  
 addEventHandler("onClientGUIClick",GUIEditor.button[5],function() 
 if ( source == GUIEditor.button[5]) then 
           guiSetVisible(GUIEditor.window[1],false) 
           showCursor(false) 
       end 
   end )   
  
   addEventHandler("onClientGUIClick",GUIEditor.button[1],function() 
        if ( source == GUIEditor.button[1]) then 
               guiSetVisible(GUIEditor.window[1], true) 
        showCursor(true) 
        triggerServerEvent("vipskin",getLocalPlayer(),vipskin)  
        end 
    end )   
     
       addEventHandler("onClientGUIClick",GUIEditor.button[4],function() 
       if ( source == GUIEditor.button[4]) then 
               guiSetVisible(GUIEditor.window[1], true) 
        showCursor(true) 
        triggerServerEvent("vipskin2",getLocalPlayer(),vipskin2)  
        end 
    end )   
     
   addEventHandler("onClientGUIClick",GUIEditor.button[2],function() 
     if ( source == GUIEditor.button[2]) then 
        guiSetVisible(GUIEditor.window[1], true) 
        showCursor(true) 
        triggerServerEvent("giveweaponm4",getLocalPlayer(),giveweaponm4)  
        end 
    end )   
     
     addEventHandler("onClientGUIClick",GUIEditor.button[3],function() 
     if ( source == GUIEditor.button[3]) then 
        guiSetVisible(GUIEditor.window[1], true) 
        showCursor(true) 
        triggerServerEvent("giveweapondeagle",getLocalPlayer(),giveweapondeagle)  
        end 
    end )   
     
    function toggleVisible (  ) 
    guiSetVisible ( GUIEditor.window[1] , not guiGetVisible(GUIEditor.window[1]) ) 
    if (guiGetVisible (GUIEditor.window[1]) == true) then 
        showCursor (true) 
    else 
        showCursor (false) 
    end 
 end 
 bindKey ("F5", "down", toggleVisible) 
  

server.lua

addEvent("vipskin",true)  
addEventHandler("vipskin",root,  
function() 
   if ( getPlayerMoney (source) >= 0 ) then 
    takePlayerMoney(source, 0) 
    setPedSkin ( source, 171 ) 
end 
end) 
  
addEvent("vipskin2",true)  
addEventHandler("vipskin2",root,  
function() 
   if ( getPlayerMoney (source) >= 0 ) then 
    takePlayerMoney(source, 0) 
    setPedSkin ( source, 173 ) 
end 
end)   
  
addEvent("giveweaponm4",true)  
addEventHandler("giveweaponm4",root,  
function() 
   if ( getPlayerMoney (source) >= 100 ) then 
    takePlayerMoney(source, 100) 
    giveWeapon (source,31,200,true) 
end 
end) 
  
addEvent("giveweapondeagle",true)  
addEventHandler("giveweapondeagle",root,  
function() 
   if ( getPlayerMoney (source) >= 100 ) then 
    takePlayerMoney(source, 100) 
    giveWeapon (source,24,200,true) 
end 
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...