Jump to content

What the problem in this gui?


RenanPG

Recommended Posts

Posted
  
GUIEditor = { 
    button = {}, 
    window = {}, 
    label = {}, 
    staticimage = {} 
} 
  
function teamgui(player) 
    if not isPlayerInTeam( Player, 'Civil' ) then 
        GUIEditor.window[1] = guiCreateWindow(0.28, 0.25, 0.42, 0.48, "Team panel - ONIX", true) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
  
        GUIEditor.label[1] = guiCreateLabel(0.01, 0.10, 0.96, 0.08, "Escolha seu grupo:  (Choose your team)", true, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.label[1], "default-bold-small") 
        GUIEditor.button[1] = guiCreateButton(0.15, 0.83, 0.25, 0.10, "Cidadão (Citizen)", true, GUIEditor.window[1]) 
        GUIEditor.button[2] = guiCreateButton(0.60, 0.83, 0.25, 0.10, "Civil (Civilian)", true, GUIEditor.window[1])     
         
        GUIEditor.staticimage[1] = guiCreateStaticImage(0.61, 0.18, 0.24, 0.61, "logo1.png", true, GUIEditor.window[1])   
        GUIEditor.staticimage[1] = guiCreateStaticImage(0.16, 0.18, 0.24, 0.61, "logo2.png", true, GUIEditor.window[1])  
    else 
    outputChatBox('Você já possui grupo', player) 
    end 
end 
addEventHandler("onResourceStart", getRootElement(), teamgui) 
  
  

this is a panel for selection of team, it is useful when player join in the server in first time and dont have a team. i will make butons, but my problem, i want that it must be show only when player dont have team.

Posted
if not isPlayerInTeam( Player, 'Civil' ) then 

Your argument name is "player" not "Player".

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
addEventHandler("onResourceStart", getRootElement(), teamgui) 

onResourceStart is server-side event!

Diet with russian vodka, lose 3 days in one week !

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