Jump to content

Funciones y eventos


Plate

Recommended Posts

Si un poco puede ser

PD:Perdon no habia leido bien la funcion que me habias dado

Creo que me mande alto enchastre

addEvent("ACL", true) 
function create( ) 
aclCreateGroup ("..Clan.." ) 
end 
addEventHandler("ACL",getRootElement(),create) 
  
function showPanel(thePlayer) 
     local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) -- get his account name 
     if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then 
        triggerClientEvent(thePlayer, "GUI", getRootElement()) 
    else 
        outputChatBox ("Acesso Negado", thePlayer, 193, 13, 13) 
    end 
end 
addCommandHandler("create", showPanel) 

client

GUIEditor_Window = {} 
GUIEditor_Button = {} 
GUIEditor_Label = {} 
GUIEditor_Edit = {} 
GUIEditor_Progress = {} 
GUIEditor_Grid = {} 
  
WindowC = guiCreateWindow(96,83,447,342,"Clan create",false) 
GUIEditor_Grid[1] = guiCreateGridList(11,22,197,206,false,WindowC) 
guiGridListSetSelectionMode(GUIEditor_Grid[1],2) 
  
guiGridListAddColumn(GUIEditor_Grid[1],"Clanes",0.2) 
GUIEditor_Edit[1] = guiCreateEdit(237,32,184,24,"Clan Name",false,WindowC) 
local Clan = guiCreateLabel(439,-91,5,5,"",false,WindowC) 
Create = guiCreateButton(250,64,144,24,"Create my Clan",false,WindowC) 
addEventHandler("onClientGUIClick",getRootElement(),create, Create) 
GUIEditor_Edit[2] = guiCreateEdit(244,98,170,26,"Clan_rank 1",false,WindowC) 
GUIEditor_Edit[3] = guiCreateEdit(243,126,173,26,"Clan_rank 2",false,WindowC) 
GUIEditor_Edit[4] = guiCreateEdit(244,155,172,26,"Clan_rank 3",false,WindowC) 
GUIEditor_Edit[5] = guiCreateEdit(243,185,174,24,"Clan_rank 4",false,WindowC) 
GUIEditor_Edit[6] = guiCreateEdit(239,211,177,24,"Clan_rank 5",false,WindowC) 
GUIEditor_Button[2] = guiCreateButton(249,244,151,25,"Create Ranks",false,WindowC) 
Destroy = guiCreateButton(32,237,145,27,"Delete Clan",false,WindowC) 
fechar = guiCreateButton(254,287,133,23,"Close",false,WindowC) 
addEvent("GUI",true) 
function GUI() 
    guiSetVisible(WindowC, true) 
    showCursor(true) 
end 
addEventHandler("GUI",getRootElement(),GUI) 
  
    addEventHandler("onClientGUIClick", fechar, function() 
        guiSetVisible( WindowC, false) 
        showCursor( false) 
    end, false ) 
function create() 
Clan = guiGetText ( Clan ) 
tiggerServerEvent("ACL",getLocalPlayer()) 
end 

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...