Plate Posted June 23, 2012 Share Posted June 23, 2012 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
Castillo Posted June 23, 2012 Share Posted June 23, 2012 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
Plate Posted June 23, 2012 Author Share Posted June 23, 2012 listo solid exellente igual hize otro gui jaja necesito que en la columna Players in F aparescan los players con grupo acl especial y me falta hacer el serverside con tiggerServerEvent Link to comment
Plate Posted June 23, 2012 Author Share Posted June 23, 2012 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
Castillo Posted June 23, 2012 Share Posted June 23, 2012 -- 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
Plate Posted June 23, 2012 Author Share Posted June 23, 2012 no funciona u.u expect to close "("at line 14 near end Link to comment
Recommended Posts