- 
                Posts1,708
- 
                Joined
- 
                Last visited
Everything posted by iFoReX
- 
	bueeno hace un rato queria probar si me funcionaba esto con un stream y no me funciono me dice bass error function onResourceStart() local sound = playSound("http://radioservermta.listen2myradio.com/") end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), onResourceStart) Gracias de antemano
- 
	soren recien me doy cuenta que te faltaba un end xDD
- 
	NoSe es que no lo he probado con players solo con contraseña
- 
	creo que solid ya te lo habia explicado en el post que tenias sobre este script
- 
	mmm problema en el debugscript ? creo que el addEventHandler esta mal el 2 argumento
- 
	lol, oter el GUIEditor no te hace todo el trabajo solo la GUI, para ponerla visible, usa esto : guiSetVisible showCursor , ojala que ahora no me bardees
- 
	nextreme code ? , I find it in the login_panel_esp, and I send to my GUI, but only the XML save ,
- 
	vitoko me refiero a esto : addEventHandler("onClientGUIClick", root, ----Aqui un root function() if source == btnColt and source == darColt then ---- aqui vamos poniendo los botones ---Relleno----- end end)
- 
	Ok y despues lo pones aqui asi lo puedo investigar
- 
	Yo no entendi como hacerle en el server-side :c
- 
	ok es que tu me habias dicho que pusiera al jugador que se iba a enviar ese mensaje y hay lo puse
- 
	yeh , but the username and password saved , the problem is the 'autologin'
- 
	hey solid ese me serviria o no ?
- 
	Shop GUI A simple Shop GUI Made by me features : -U can buy m4 -U can buy TEC-9 -U can buy Colt-45 -U can buy Health ( +50 ) 0 buggs extras : - a setElementFrozen in onClientMarkerHit - Blips - markers - Peds - and 6 shops ( 2 LV, 2 SF, 2 LS ) Download : https://community.multitheftauto.com/index.php?p=resources&s=details&id=4778 Image : ENJOY ! SCRIPT MADE BY ELMOTA
- 
	proba esto yo hago una GUI admin y me funciona perfecto esto local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ( "user.".. accName, aclGetGroup ( "Admin" ) ) then triggerClientEvent ( thePlayer, "ElEventoClient", thePlayer ) espero averte ayudado
- 
	Podrias triggear para el isObjectinACLGroup
- 
	I dont know how know if the checkbox is pressed GUIEditor_Button = {} GUIEditor_Checkbox = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Radio = {} LoginWindow = guiCreateWindow(0.2763,0.3467,0.4863,0.3633,"Ventana de Loggeo",true) guiWindowSetMovable(LoginWindow,false) guiWindowSetSizable(LoginWindow,false) GUIEditor_Label[1] = guiCreateLabel(21,63,52,21,"Nick :",false,LoginWindow) guiSetFont(GUIEditor_Label[1],"clear-normal") GUIEditor_Edit[1] = guiCreateEdit(63,58,126,28,"",false,LoginWindow) GUIEditor_Label[2] = guiCreateLabel(19,110,74,19,"Contraseña : ",false,LoginWindow) GUIEditor_Edit[2] = guiCreateEdit(94,105,126,28,"",false,LoginWindow) GUIEditor_Label[3] = guiCreateLabel(19,147,227,19,"Si no Tienes una Cuenta registrate aqui : ",false,LoginWindow) guiLabelSetColor(GUIEditor_Label[3],255,0,0) guiSetFont(GUIEditor_Label[3],"default-bold-small") GUIEditor_Button[1] = guiCreateButton(19,168,100,36,"Registrarme",false,LoginWindow) GUIEditor_Checkbox[1] = guiCreateCheckBox(227,107,115,27,"Recordar Datos",false,false,LoginWindow) guiSetFont(GUIEditor_Checkbox[1],"default-bold-small") GUIEditor_Button[2] = guiCreateButton(229,55,97,35,"Logearme",false,LoginWindow) GUIEditor_Label[4] = guiCreateLabel(196,188,181,16,"GUI Creada por ElMota (c) 2012",false,LoginWindow) guiLabelSetColor(GUIEditor_Label[4],255, 255, 0) guiSetFont(GUIEditor_Label[4],"default-bold-small") GUIEditor_Radio[1] = guiCreateRadioButton(17,26,81,21,"Español",false,LoginWindow) guiRadioButtonSetSelected(GUIEditor_Radio[1],true) GUIEditor_Radio[2] = guiCreateRadioButton(109,26,81,21,"English",false,LoginWindow) RegisterWindow = guiCreateWindow(0.2937,0.3533,0.4437,0.3517,"Ventana de Registrarse",true) guiWindowSetMovable(RegisterWindow,false) guiWindowSetSizable(RegisterWindow,false) GUIEditor_Label[5] = guiCreateLabel(11,26,142,17,"Pon datos que no Olvides",false,RegisterWindow) guiSetFont(GUIEditor_Label[5],"default-bold-small") GUIEditor_Label[6] = guiCreateLabel(9,52,140,20,"---Datos Importantes.",false,RegisterWindow) guiSetFont(GUIEditor_Label[6],"default-bold-small") GUIEditor_Label[7] = guiCreateLabel(12,85,52,21,"Nick :",false,RegisterWindow) guiSetFont(GUIEditor_Label[7],"clear-normal") GUIEditor_Edit[3] = guiCreateEdit(50,80,100,26,"",false,RegisterWindow) GUIEditor_Label[8] = guiCreateLabel(12,127,87,17,"Contraseña :",false,RegisterWindow) guiSetFont(GUIEditor_Label[8],"clear-normal") GUIEditor_Edit[4] = guiCreateEdit(100,122,100,26,"",false,RegisterWindow) GUIEditor_Label[9] = guiCreateLabel(12,179,42,16,"Sexo :",false,RegisterWindow) guiSetFont(GUIEditor_Label[9],"clear-normal") GUIEditor_Radio[3] = guiCreateRadioButton(62,174,65,25,"Hombre",false,RegisterWindow) guiRadioButtonSetSelected(GUIEditor_Radio[3],true) guiSetFont(GUIEditor_Radio[3],"default-bold-small") GUIEditor_Radio[4] = guiCreateRadioButton(134,174,65,25,"Mujer",false,RegisterWindow) guiSetFont(GUIEditor_Radio[4],"default-bold-small") GUIEditor_Label[10] = guiCreateLabel(216,29,52,16,"ESPAÑOL",false,RegisterWindow) guiLabelSetColor(GUIEditor_Label[10],0,0,255) guiSetFont(GUIEditor_Label[10],"default-bold-small") GUIEditor_Label[11] = guiCreateLabel(294,29,52,16,"ENGLISH",false,RegisterWindow) guiLabelSetColor(GUIEditor_Label[11],0,0,255) guiSetFont(GUIEditor_Label[11],"default-bold-small") GUIEditor_Button[3] = guiCreateButton(215,69,123,39,"Registrarme !",false,RegisterWindow) GUIEditor_Button[4] = guiCreateButton(215,180,123,39,"Cancelar",false,RegisterWindow) guiSetVisible(RegisterWindow,false) guiSetVisible(LoginWindow,false) guiEditSetMasked(GUIEditor_Edit[2],true) guiEditSetMasked(GUIEditor_Edit[4],true) showCursor(false) addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function() guiSetVisible(RegisterWindow,false) guiSetVisible(LoginWindow,true) showCursor(true) guiSetText(GUIEditor_Edit[1], ""..getPlayerName( localPlayer ).."") guiSetText(GUIEditor_Edit[3], ""..getPlayerName( localPlayer ).."") end ) addEventHandler("onClientGUIClick", root, function() if source == GUIEditor_Button[1] then guiSetVisible(RegisterWindow,true) guiSetVisible(LoginWindow,false) elseif source == GUIEditor_Button[3] then guiSetVisible(RegisterWindow,false) guiSetVisible(LoginWindow,false) showCursor(false) elseif source == GUIEditor_Button[4] then guiSetVisible(RegisterWindow,false) guiSetVisible(LoginWindow,true) end end ) function clientSubmitLogin ( button, state ) if ( button == "left" and state == "up" ) then local username = guiGetText(GUIEditor_Edit[1]) local password = guiGetText(GUIEditor_Edit[2]) if ( username and password ) then triggerServerEvent("submitLoginEM", localPlayer, username, password) else outputChatBox("Porfavor pon tu Nick y tu Contrase?a.") end end end addEventHandler("onClientGUIClick", GUIEditor_Button[2], clientSubmitLogin, false) addEvent ( "closeLoginGUI", true ) addEventHandler ( "closeLoginGUI", root, function ( ) guiSetVisible ( LoginWindow, false ) guiSetVisible ( RegisterWindow, false ) showCursor ( false ) end ) function clientSubmitaccount ( button, state ) if ( button == "left" and state == "up" ) then local username = guiGetText(GUIEditor_Edit[3]) local password = guiGetText(GUIEditor_Edit[4]) if ( username and password ) then triggerServerEvent("addAccountEM", localPlayer, username, password) else outputChatBox("Porfavor pon tu Nick y tu Contraseña.") end end end addEventHandler("onClientGUIClick", GUIEditor_Button[3], clientSubmitaccount, false) addEvent ( "openLoginGUI", true ) addEventHandler ( "openLoginGUI", root, function ( ) guiSetVisible ( LoginWindow, true ) guiSetVisible ( RegisterWindow, false ) showCursor ( true ) end ) addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function() local xmlFile = xmlLoadFile("user.xml") if xmlFile then status = xmlNodeGetAttribute(xmlFile,"autologin") if (status == tostring(true)) then local username = tostring(xmlNodeGetAttribute(xmlFile,"username")) local password = tostring(xmlNodeGetAttribute(xmlFile,"password")) guiSetText(GUIEditor_Edit[1], ""..username.."") guiSetText(GUIEditor_Edit[2], ""..password.."") if not (username == "") and not (password == "") then saveXmlFile() end end end end ) addEventHandler("onClientGUIClick", root, function() if source == GUIEditor_Button[2] then local xmlFile = xmlLoadFile("user.xml") if not xmlFile then xmlFile = xmlCreateFile("user.xml","settings") xmlNodeSetAttribute(xmlFile,"autologin",tostring(false)) end xmlNodeSetAttribute(xmlFile,"username",tostring(guiGetText(GUIEditor_Edit[1]))) xmlNodeSetAttribute(xmlFile,"password",tostring(guiGetText(GUIEditor_Edit[2]))) xmlSaveFile(xmlFile) xmlUnloadFile(xmlFile) end end ) addEventHandler("onClientGUIClick", root, function() if GUIEditor_Checkbox[1] == true then xmlNodeSetAttribute(xmlFile,"autologin",tostring(true)) end end ) function loginHandler(username,password) local acc = getAccount(username, password) if (acc) then logIn ( source, acc, password ) fadeCamera(source, true) setCameraTarget(source) triggerClientEvent ( source, "closeLoginGUI", source ) outputChatBox("Enjoy your time!", source) else outputChatBox("invalid username and password. Please re-connect and try again.", source) end end addEvent("submitLoginEM",true) addEventHandler("submitLoginEM",root, loginHandler) function registerPlayerEM ( username, password ) if ( password ~= "" and password ~= nil and username ~= "" and username ~= nil ) then if ( not getAccount ( username ) ) then local accountAdded = addAccount ( username, password ) if ( accountAdded ) then outputChatBox ( "Gracias " .. getPlayerName ( source ) .. ", Ya estas Registrado ahora loggeate", source ) triggerClientEvent ( source, "openLoginGUI", source ) else outputChatBox ( "Error creando la Cuenta por Favor contacta a un Admin.", source ) end else outputChatBox ( "Esta Cuenta Ya Existe..", source ) end else outputChatBox ( "Porfavor Pon tus datos Correctos.", source ) end end addEvent("addAccountEM", true) addEventHandler("addAccountEM", root, registerPlayerEM) thank in advanced
- 
	mmm... solo se me ocurrio esto GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(0.3375,0.1983,0.5013,0.655,"GUI PM",true) guiWindowSetSizable(GUIEditor_Window[1],false) guiWindowSetMovable(GUIEditor_Window[1],false) GUIEditor_Label[1] = guiCreateLabel(11,46,96,28,"",false,GUIEditor_Window[1]) GUIEditor_Memo[1] = guiCreateMemo(9,57,383,281,"",false,GUIEditor_Window[1]) guiMemoSetReadOnly(GUIEditor_Memo[1],true) GUIEditor_Edit[1] = guiCreateEdit(10,344,288,36,"",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(302,346,85,37,"Enviar",false,GUIEditor_Window[1]) GUIEditor_Label[2] = guiCreateLabel(36,27,335,32,"PM A : ",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[2],"clear-normal") GUIEditor_Window[2] = guiCreateWindow(0.1663,0.1983,0.1737,0.6533,"GUI Players",true) GUIEditor_Grid[1] = guiCreateGridList(10,28,122,375,false,GUIEditor_Window[2]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) column = guiGridListAddColumn(GUIEditor_Grid[1],"Players",0.6) guiSetVisible(GUIEditor_Window[1],false) guiSetVisible(GUIEditor_Window[2],false) bindKey ( "F7", "down", function ( ) guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) guiSetVisible ( GUIEditor_Window[2], not guiGetVisible ( GUIEditor_Window[2] ) ) showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) end ) function clientsideResourceStart () guiGridListClear(GUIEditor_Grid[1]) if (guiGridListClear) then for id, playeritem in ipairs(getElementsByType("player")) do local row = guiGridListAddRow ( GUIEditor_Grid[1] ) guiGridListSetItemText ( GUIEditor_Grid[1], row, column, getPlayerName ( playeritem ), false, false ) end end end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), clientsideResourceStart ) addEventHandler ( "onClientPlayerJoin", getRootElement(), clientsideResourceStart ) addEventHandler ( "onClientPlayerQuit", getRootElement(), clientsideResourceStart ) addEventHandler ( "onClientPlayerChangeNick", getRootElement(), clientsideResourceStart ) addEventHandler("onClientGUIDoubleClick", root, function() if ( source == GUIEditor_Grid[1] ) then row, col = guiGridListGetSelectedItem ( source ) if ( row and col and row ~= -1 and col ~= -1 ) then local playername = guiGridListGetItemText ( source, row, col ) guiSetText(GUIEditor_Label[2], "PM a : "..playername) local thePlayer = getPlayerFromName ( playername ) end end end ) function send() if source == GUIEditor_Button[1] then local getText = guiGetText(GUIEditor_Edit[1]) local getName = getPlayerName( localPlayer ) guiSetText(GUIEditor_Memo[1], ""..getName.." : "..getText.."") guiSetText(GUIEditor_Edit[1], "") triggerServerEvent("enviar", localPlayer, playerName) end end addEventHandler("onClientGUIClick", root, send) local mensajes = { } function enviar ( playerName, mensaje ) if ( not mensajes [ source ] ) then mensajes [ source ] = { } end if ( not mensajes [ source ] [ getPlayerFromName ( playerName ) ] ) then mensajes [ source ] [ getPlayerFromName ( playerName ) ] = { } end table.insert ( mensajes [ source ] [ getPlayerFromName ( playerName ) ], mensaje ) end addEvent("enviar", true) addEventHandler("enviar", getRootElement(), enviar)
- 
	Now Doesnt work my Dimension Button GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(0.4925,0.3317,0.51,0.6717,"GUI Admin",true) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Grid[1] = guiCreateGridList(11,87,167,307,false,GUIEditor_Window[1]) column = guiGridListAddColumn(GUIEditor_Grid[1],"Players",0.7) GUIEditor_Edit[1] = guiCreateEdit(11,46,167,34,"",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(191,46,103,38,"Mute",false,GUIEditor_Window[1]) GUIEditor_Button[15] = guiCreateButton(191,46,103,38,"UnMute",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(191,96,103,38,"Ban",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(191,146,103,38,"Kick",false,GUIEditor_Window[1]) GUIEditor_Button[4] = guiCreateButton(191,200,103,38,"Dimension",false,GUIEditor_Window[1]) GUIEditor_Button[5] = guiCreateButton(191,259,103,38,"Warp to Player",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(190,345,213,51,"Admin Panel By ElMota",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[1],"clear-normal") GUIEditor_Button[6] = guiCreateButton(313,46,86,38,"Resources",false,GUIEditor_Window[1]) GUIEditor_Window[2] = guiCreateWindow(0.35,0.2783,0.3388,0.4217,"Ban Times",true) guiWindowSetSizable(GUIEditor_Window[2],false) GUIEditor_Button[7] = guiCreateButton(32,39,189,40,"1 Year",false,GUIEditor_Window[2]) GUIEditor_Button[8] = guiCreateButton(32,87,189,40,"1 Month",false,GUIEditor_Window[2]) GUIEditor_Button[9] = guiCreateButton(32,138,189,38,"1 Day",false,GUIEditor_Window[2]) GUIEditor_Button[10] = guiCreateButton(172,216,90,28,"Cancelar",false,GUIEditor_Window[2]) GUIEditor_Window[3] = guiCreateWindow(0.2988,0.2867,0.4737,0.4267,"Dimension GUI",true) GUIEditor_Label[2] = guiCreateLabel(48,102,107,18,"Set Dimension ...",false,GUIEditor_Window[3]) GUIEditor_Edit[2] = guiCreateEdit(131,123,65,27,"",false,GUIEditor_Window[3]) GUIEditor_Button[11] = guiCreateButton(246,199,120,44,"Set Dimension",false,GUIEditor_Window[3]) GUIEditor_Button[12] = guiCreateButton(9,199,120,44,"Cancel",false,GUIEditor_Window[3]) GUIEditor_Window[4] = guiCreateWindow(0.3613,0.13,0.3025,0.845,"GUI Resources",true) guiWindowSetSizable(GUIEditor_Window[4],false) GUIEditor_Grid[2] = guiCreateGridList(21,71,201,358,false,GUIEditor_Window[4]) guiGridListSetSelectionMode(GUIEditor_Grid[2],2) guiGridListAddColumn(GUIEditor_Grid[2],"resources :",0.2) GUIEditor_Edit[3] = guiCreateEdit(23,32,197,35,"",false,GUIEditor_Window[4]) GUIEditor_Button[13] = guiCreateButton(141,453,92,37,"Start Resource",false,GUIEditor_Window[4]) GUIEditor_Button[14] = guiCreateButton(10,453,92,37,"Cancel",false,GUIEditor_Window[4]) guiSetVisible ( GUIEditor_Window[1], false ) guiSetVisible ( GUIEditor_Window[2], false ) guiSetVisible ( GUIEditor_Window[3], false ) guiSetVisible ( GUIEditor_Window[4], false ) guiSetVisible ( GUIEditor_Button[15], false ) showCursor ( false ) function GUIOpen ( ) guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) end addEvent ( "onVisibleAdmin", true ) addEventHandler ( "onVisibleAdmin", getLocalPlayer(), GUIOpen ) function clientsideResourceStart ( ) guiGridListClear ( GUIEditor_Grid[1] ) for id, playeritem in ipairs(getElementsByType("player")) do local row = guiGridListAddRow ( GUIEditor_Grid[1] ) guiGridListSetItemText ( GUIEditor_Grid[1], row, column, getPlayerName ( playeritem ), false, false ) end end addEventHandler ( "onClientResourceStart", resourceRoot, clientsideResourceStart ) addEventHandler ( "onClientPlayerJoin", root, clientsideResourceStart ) addEventHandler ( "onClientPlayerQuit", root, clientsideResourceStart ) addEventHandler ( "onClientPlayerChangeNick", root, clientsideResourceStart ) addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == GUIEditor_Button[2] ) then guiSetVisible(GUIEditor_Window[2],true) elseif ( source == GUIEditor_Button[10] ) then guiSetVisible ( GUIEditor_Window[2], false ) elseif ( source == GUIEditor_Button[4] ) then guiSetVisible ( GUIEditor_Window[3], true) elseif ( source == GUIEditor_Button[12] ) then guiSetVisible ( GUIEditor_Window[3], false ) elseif ( source == GUIEditor_Button[1] ) then local row, col = guiGridListGetSelectedItem ( GUIEditor_Grid[1] ) if ( row and col and row ~= -1 and col ~= -1 ) then playerName = guiGridListGetItemText ( GUIEditor_Grid[1], row, column ) triggerServerEvent ( "mute", localPlayer, playerName ) guiSetVisible(GUIEditor_Button[1], false) guiSetVisible ( GUIEditor_Button[15], true ) end elseif ( source == GUIEditor_Button[15] ) then local row, col = guiGridListGetSelectedItem ( GUIEditor_Grid[1] ) if ( row and col and row ~= -1 and col ~= -1 ) then playerName = guiGridListGetItemText ( GUIEditor_Grid[1], row, column ) triggerServerEvent ( "unmute", localPlayer, playerName ) guiSetVisible(GUIEditor_Button[1], true) guiSetVisible ( GUIEditor_Button[15], false ) end elseif source == GUIEditor_Button[11] then local row, col = guiGridListGetSelectedItem ( GUIEditor_Grid[1] ) if ( row and col and row ~= -1 and col ~= -1 ) then playerName = guiGridListGetItemText ( GUIEditor_Grid[1], row, column ) setElementDimension( playerName, (tonumber(guiGetText(GUIEditor_Edit[2])))) end end end ) addEventHandler ( "onClientGUIChanged", GUIEditor_Edit[1], function ( ) local text = guiGetText ( source ) for row = 1, guiGridListGetRowCount ( GUIEditor_Grid[1] ) do if ( guiGridListGetItemText ( GUIEditor_Grid[1], row, 1 ) == text ) then guiGridListSetSelectedItem ( GUIEditor_Grid[1], row, 1 ) end end end ,false )
- 
	y hago un trigger verdad ?
- 
	thank you solid work the mute button, now I done it but the message in chatbox doesnt appear and the player dont unmuted :c function opGUI ( thePlayer ) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ( "user.".. accName, aclGetGroup ( "Admin" ) ) then triggerClientEvent ( thePlayer, "onVisibleAdmin", thePlayer ) end end addEventHandler ( "onPlayerJoin", root, function ( ) bindKey ( source, "p", "down", opGUI ) end ) addEventHandler ( "onResourceStart", resourceRoot, function ( ) for index, player in ipairs ( getElementsByType ( "player" ) ) do bindKey ( player, "p", "down", opGUI ) end end ) addEvent("mute", true) addEventHandler("mute", getRootElement(), function ( playerName ) local thePlayer = getPlayerFromName ( playerName ) if ( not thePlayer ) then outputChatBox ( "Este jugador no esta online.", source ) end if setPlayerMuted ( thePlayer, true ) then outputChatBox ( "Has Sido Muteado por un admin", thePlayer ) end end ) addEvent("unmute", true) addEventHandler("unmute", getRootElement(), function ( playerName ) local thePlayer = getPlayerFromName ( playerName ) if ( not thePlayer ) then outputChatBox ( "Este jugador no esta online.", source ) end if setPlayerMuted ( thePlayer, false ) then outputChatBox ( "te ha sacado el mute", thePlayer ) end end ) GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(0.4925,0.3317,0.51,0.6717,"GUI Admin",true) guiWindowSetSizable(GUIEditor_Window[1],false) GUIEditor_Grid[1] = guiCreateGridList(11,87,167,307,false,GUIEditor_Window[1]) column = guiGridListAddColumn(GUIEditor_Grid[1],"Players",0.7) GUIEditor_Edit[1] = guiCreateEdit(11,46,167,34,"",false,GUIEditor_Window[1]) GUIEditor_Button[1] = guiCreateButton(191,46,103,38,"Mute",false,GUIEditor_Window[1]) GUIEditor_Button[15] = guiCreateButton(191,46,103,38,"UnMute",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(191,96,103,38,"Ban",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(191,146,103,38,"Kick",false,GUIEditor_Window[1]) GUIEditor_Button[4] = guiCreateButton(191,200,103,38,"Dimension",false,GUIEditor_Window[1]) GUIEditor_Button[5] = guiCreateButton(191,259,103,38,"Warp to Player",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(190,345,213,51,"Admin Panel By ElMota",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Label[1],"clear-normal") GUIEditor_Button[6] = guiCreateButton(313,46,86,38,"Resources",false,GUIEditor_Window[1]) GUIEditor_Window[2] = guiCreateWindow(0.35,0.2783,0.3388,0.4217,"Ban Times",true) guiWindowSetSizable(GUIEditor_Window[2],false) GUIEditor_Button[7] = guiCreateButton(32,39,189,40,"1 Year",false,GUIEditor_Window[2]) GUIEditor_Button[8] = guiCreateButton(32,87,189,40,"1 Month",false,GUIEditor_Window[2]) GUIEditor_Button[9] = guiCreateButton(32,138,189,38,"1 Day",false,GUIEditor_Window[2]) GUIEditor_Button[10] = guiCreateButton(172,216,90,28,"Cancelar",false,GUIEditor_Window[2]) GUIEditor_Window[3] = guiCreateWindow(0.2988,0.2867,0.4737,0.4267,"Dimension GUI",true) GUIEditor_Label[2] = guiCreateLabel(48,102,107,18,"Set Dimension ...",false,GUIEditor_Window[3]) GUIEditor_Edit[2] = guiCreateEdit(131,123,65,27,"",false,GUIEditor_Window[3]) GUIEditor_Button[11] = guiCreateButton(246,199,120,44,"Set Dimension",false,GUIEditor_Window[3]) GUIEditor_Button[12] = guiCreateButton(9,199,120,44,"Cancel",false,GUIEditor_Window[3]) GUIEditor_Window[4] = guiCreateWindow(0.3613,0.13,0.3025,0.845,"GUI Resources",true) guiWindowSetSizable(GUIEditor_Window[4],false) GUIEditor_Grid[2] = guiCreateGridList(21,71,201,358,false,GUIEditor_Window[4]) guiGridListSetSelectionMode(GUIEditor_Grid[2],2) guiGridListAddColumn(GUIEditor_Grid[2],"resources :",0.2) GUIEditor_Edit[3] = guiCreateEdit(23,32,197,35,"",false,GUIEditor_Window[4]) GUIEditor_Button[13] = guiCreateButton(141,453,92,37,"Start Resource",false,GUIEditor_Window[4]) GUIEditor_Button[14] = guiCreateButton(10,453,92,37,"Cancel",false,GUIEditor_Window[4]) guiSetVisible ( GUIEditor_Window[1], false ) guiSetVisible ( GUIEditor_Window[2], false ) guiSetVisible ( GUIEditor_Window[3], false ) guiSetVisible ( GUIEditor_Window[4], false ) guiSetVisible ( GUIEditor_Button[15], false ) showCursor ( false ) function GUIOpen ( ) guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) showCursor ( guiGetVisible ( GUIEditor_Window[1] ) ) end addEvent ( "onVisibleAdmin", true ) addEventHandler ( "onVisibleAdmin", getLocalPlayer(), GUIOpen ) function clientsideResourceStart ( ) guiGridListClear ( GUIEditor_Grid[1] ) for id, playeritem in ipairs(getElementsByType("player")) do local row = guiGridListAddRow ( GUIEditor_Grid[1] ) guiGridListSetItemText ( GUIEditor_Grid[1], row, column, getPlayerName ( playeritem ), false, false ) end end addEventHandler ( "onClientResourceStart", resourceRoot, clientsideResourceStart ) addEventHandler ( "onClientPlayerJoin", root, clientsideResourceStart ) addEventHandler ( "onClientPlayerQuit", root, clientsideResourceStart ) addEventHandler ( "onClientPlayerChangeNick", root, clientsideResourceStart ) addEventHandler ( "onClientGUIClick", root, function ( ) if ( source == GUIEditor_Button[2] ) then guiSetVisible(GUIEditor_Window[2],true) elseif ( source == GUIEditor_Button[10] ) then guiSetVisible ( GUIEditor_Window[2], false ) elseif ( source == GUIEditor_Button[4] ) then guiSetVisible ( GUIEditor_Window[3], true) elseif ( source == GUIEditor_Button[12] ) then guiSetVisible ( GUIEditor_Window[3], false ) elseif ( source == GUIEditor_Button[1] ) then local row, col = guiGridListGetSelectedItem ( GUIEditor_Grid[1] ) if ( row and col and row ~= -1 and col ~= -1 ) then playerName = guiGridListGetItemText ( GUIEditor_Grid[1], row, column ) triggerServerEvent ( "mute", localPlayer, playerName ) guiSetVisible(GUIEditor_Button[1], false) guiSetVisible ( GUIEditor_Button[15], true ) end end end ) addEventHandler("onClientGUIClick", root, function() if ( source == GUIEditor_Button[15] ) then if ( row and col and row ~= -1 and col ~= -1 ) then triggerServerEvent ( "unmute", localPlayer, playerName ) guiSetVisible(GUIEditor_Button[15], false) guiSetVisible ( GUIEditor_Button[1], true ) end end end ) addEventHandler ( "onClientGUIChanged", GUIEditor_Edit[1], function ( ) local text = guiGetText ( source ) for row = 1, guiGridListGetRowCount ( GUIEditor_Grid[1] ) do if ( guiGridListGetItemText ( GUIEditor_Grid[1], row, 1 ) == text ) then guiGridListSetSelectedItem ( GUIEditor_Grid[1], row, 1 ) end end end ,false ) I added the button 15 ' unmute button '

 
        