Jump to content

que esta mal? ["GUI"]


Plate

Recommended Posts

Hola alguien me podria decir que esta mal en esto

GUIEditor_Window = {} 
GUIEditor_Button = {} 
GUIEditor_Grid = {} 
  
panel = guiCreateWindow(217,172,327,240,"Panel",false) 
Players = guiCreateGridList(24,46,133,162,false,Players) 
guiGridListSetSelectionMode(GUIEditor_Grid[1],2) 
  
guiGridListAddColumn(GUIEditor_Grid[1],"Players",0.2) 
add = guiCreateButton(189,58,112,35,"Add Player",false,panel) 
remove = guiCreateButton(188,125,113,41,"Remove Player",false,panel) 
guiWindowSetMovable(panel,false) 
guiWindowSetSizable(panel,false) 
guiSetVisible(panel,false) 
  
function addP() 
guiSetVisible (panel,true) 
showCursor(true) 
end 
addCommandHandler("AFP",getRootElement(),addP) 
  
function closePanel() 
if guiGetVisible(panel) then  
        guiSetVisible(panel,false) 
        showCursor(false) 
    end 
end 
addCommandHandler("CFP",getRootElement(),closePanel) 
  

Link to comment
panel = guiCreateWindow(217,172,327,240,"Panel",false) 
Players = guiCreateGridList(24,46,133,162,false,Players) 
guiGridListSetSelectionMode(Players,2) 
guiGridListAddColumn(Players,"Players",0.2) 
add = guiCreateButton(189,58,112,35,"Add Player",false,panel) 
remove = guiCreateButton(188,125,113,41,"Remove Player",false,panel) 
guiWindowSetMovable(panel,false) 
guiWindowSetSizable(panel,false) 
guiSetVisible(panel,false) 
  
function addP() 
guiSetVisible (panel,true) 
showCursor(true) 
end 
addCommandHandler("AFP",addP) -- getRootElement() esta de mas. 
  
function closePanel() 
    if guiGetVisible(panel) then 
        guiSetVisible(panel,false) 
        showCursor(false) 
    end 
end 
addCommandHandler("CFP",closePanel) -- getRootElement() esta de mas. 

Link to comment

que esta mal de esto solid

addEvent ("addST", true) 
addEventHandler ("addST", getRootElement(), 
function (playerSource, commandName, accountName) 
 local usuario = getAccountName ( getPlayerAccount ( playerSource ) ) 
     if isObjectInACLGroup ("user."..usuario, aclGetGroup ( "LiderFTFP" ) )  then 
          if accountName then 
local pname = getPlayerName( playerSource ) 
          aclGroupAddObject (aclGetGroup("FTFP"), "user."..accountName) 
         outputChatBox(tostring(pname) .." agrego a  '"..accountName.."' a S.T.A.R.S", getRootElement(), 0, 255, 255, true ) 
        end 
    end 
 ) 

function STARS() 
triggerServerEvent ("addST", getRootElement(), playerSource, commandName, accountName) 
end 
addEventHandler ("onClientGUIClick", Add, STARS, false) 

Link to comment

-- server side:

addEvent ( "addST", true ) 
addEventHandler ( "addST", getRootElement(), 
    function ( accountName ) 
        local usuario = getAccountName ( getPlayerAccount ( source ) ) 
        if isObjectInACLGroup ( "user.".. usuario, aclGetGroup ( "LiderFTFP" ) )  then 
            if ( accountName ) then 
                local pname = getPlayerName ( source ) 
                aclGroupAddObject ( aclGetGroup ( "FTFP" ), "user.".. accountName ) 
                outputChatBox ( tostring ( pname ) .." agrego a  '".. accountName .."' a S.T.A.R.S", getRootElement(), 0, 255, 255, true ) 
            end 
        end 
    end 
) 

-- client side:

function STARS ( ) 
    triggerServerEvent ( "addST", localPlayer, accountName ) 
end 
addEventHandler ( "onClientGUIClick", Add, STARS, false ) 

Link to comment
  • Recently Browsing   0 members

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