Akranes123 Posted March 5, 2017 Share Posted March 5, 2017 (edited) Hola a todos, tengo un problema con mi grupo de clanes .... Me hacerlo todo como debe ser y no dan las funciones que deben ser quiero que me ayude por favor client.lua GUIEditor = { gridlist = {}, label = {} } function Aesede() Panel = guiCreateWindow(565, 287, 518, 325, "Panel De Clan **KillZone**", false) guiWindowSetSizable(Panel, false) guiSetAlpha(Panel, 1.00) guiSetProperty(Panel, "CaptionColour", "FF670000") ListaDeJugadores = guiCreateGridList(9, 23, 202, 250, false, Panel) guiGridListAddColumn(ListaDeJugadores, "Players", 0.9) GUIEditor.label[1] = guiCreateLabel(267, 28, 264, 100, "*K.Z*", false, Panel) guiSetFont(GUIEditor.label[1], "sa-gothic") guiLabelSetColor(GUIEditor.label[1], 0, 121, 199) BusquedaRapido = guiCreateButton(9, 278, 202, 37, "Actualizar", false, Panel) guiSetFont(BusquedaRapido, "default-bold-small") guiSetProperty(BusquedaRapido, "NormalTextColour", "FF670000") ReclutarFAV = guiCreateButton(267, 103, 198, 35, "Invitar a *K.Z*", false, Panel) guiSetFont(ReclutarFAV, "default-bold-small") guiSetProperty(ReclutarFAV, "NormalTextColour", "FF670000") QuitarClan = guiCreateButton(268, 148, 197, 34, "Sacar de *K.Z*", false, Panel) guiSetFont(QuitarClan, "default-bold-small") guiSetProperty(QuitarClan, "NormalTextColour", "FF670000") SkinNormal1 = guiCreateButton(268, 192, 94, 36, "Skin 1 Player", false, Panel) guiSetFont(SkinNormal1, "default-bold-small") guiSetProperty(SkinNormal1, "NormalTextColour", "FF670000") SkinLiderChica = guiCreateButton(372, 192, 93, 36, "Skin Leader", false, Panel) guiSetFont(SkinLiderChica, "default-bold-small") guiSetProperty(SkinLiderChica, "NormalTextColour", "FF670000") SkinNormal3 = guiCreateButton(268, 238, 94, 34, "Skin 2 Player", false, Panel) guiSetFont(SkinNormal3, "default-bold-small") guiSetProperty(SkinNormal3, "NormalTextColour", "FF670000") SkinLiderChico = guiCreateButton(372, 238, 93, 34, "Skin 3 Player", false, Panel) guiSetFont(SkinLiderChico, "default-bold-small") guiSetProperty(SkinLiderChico, "NormalTextColour", "FF670000") Nombre = guiCreateLabel(217, 301, 194, 14, "Copyright © WoZ//~ZuKi|R", false, Panel) guiSetFont(Nombre, "default-bold-small") guiLabelSetColor(Nombre, 255, 0, 0) Salir = guiCreateButton(426, 294, 82, 21, "Cerrar", false, Panel) guiSetFont(Salir, "default-bold-small") guiSetProperty(Salir, "NormalTextColour", "FF670000") NombreSkinMiembros = guiCreateLabel(268, 274, 94, 13, "Skin Reclutados", false, Panel) guiSetFont(NombreSkinMiembros, "default-bold-small") guiLabelSetColor(NombreSkinMiembros, 0, 121, 199) SkinLideres = guiCreateLabel(372, 274, 93, 14, "Skin Leader", false, Panel) guiSetFont(SkinLideres, "default-bold-small") guiLabelSetColor(SkinLideres, 0, 121, 199) local players = getElementsByType("player") for k,v in ipairs(players) do local row = guiGridListAddRow(ListaDeJugadores) --grid1 is your grid... guiGridListSetItemText(ListaDeJugadores, row, 1,getPlayerName(v):gsub("#%x%x%x%x%x%x", ""), false, false) guiGridListSetItemColor(ListaDeJugadores, row, 1, getPlayerNametagColor(v)) guiSetFont(ListaDeJugadores, "default-bold-small") end showCursor (true) addEventHandler ("onClientGUIClick", SkinNormal1, Skin22, false) addEventHandler ("onClientGUIClick", SkinNormal3, Skin23, false) addEventHandler ("onClientGUIClick", SkinLiderChico, SkinLChicos, false) addEventHandler ("onClientGUIClick", SkinLiderChica, SkinLChicas, false) addEventHandler ("onClientGUIClick", QuitarClan, Echar, false) addEventHandler ("onClientGUIClick", Salir, Exit, false) addEventHandler ("onClientGUIClick", GUIEditor.gridlist[1], ColocarJugadores, false) addEventHandler ("onClientGUIClick", ReclutarFAV, Invitar, false) end addEvent( "onGreetingK", true ) addEventHandler( "onGreetingK", localPlayer, Aesede ) function Actualizar() guiGridListClear(ListaDeJugadores) for index, player in ipairs(getElementsByType("player")) do row = guiGridListAddRow(ListaDeJugadores) guiGridListSetItemText ( ListaDeJugadores, row, columna, (string.gsub ( getPlayerName(player), '#%x%x%x%x%x%x', '' ) or getPlayerName(player)), false, false) guiGridListSetItemData ( ListaDeJugadores, row, columna, getPlayerName(player)) end end addEventHandler("onClientPlayerJoin", getRootElement(), Actualizar) addEventHandler("onClientPlayerQuit", getRootElement(), Actualizar) addEventHandler("onClientPlayerChangeNick", getRootElement(), Actualizar) addEventHandler ("onClientResourceStart",getRootElement(), Actualizar) function pegarnick () if source == ListaDeJugadores then local nomeplayer = guiGridListGetItemData(ListaDeJugadores, guiGridListGetSelectedItem(ListaDeJugadores), 1) local jogadorx = getPlayerFromName(nomeplayer) thePlayer = jogadorx end end addEventHandler ("onClientResourceStart", getRootElement(), pegarnick) addEventHandler ("onClientGUIClick", ListaDeJugadores, pegarnick, false) addEventHandler("onClientPlayerJoin", getRootElement(), pegarnick) addEventHandler("onClientPlayerQuit", getRootElement(), pegarnick) addEventHandler("onClientPlayerChangeNick", getRootElement(), pegarnick) function Invitar() triggerServerEvent ( "LNZ", thePlayer() ) end addEventHandler ("onClientClick", root, Invitar) function Skin22() triggerServerEvent ( "onGreeting", thePlayer() ) end addEventHandler ("onClientClick", root, Skin22) function Skin23() triggerServerEvent ( "onGreetingC", thePlayer() ) end addEventHandler ("onClientClick", root, Skin23) function SkinLChicos() triggerServerEvent ( "onGreetingB", thePlayer() ) end addEventHandler ("onClientClick", root, SkinLChicos) function SkinLChicas() triggerServerEvent ( "onGreetingD", thePlayer() ) end addEventHandler ("onClientClick", root, SkinLChicas) function Echar() triggerServerEvent ( "EchaRDelTeam", thePlayer() ) showCursor (true) end function Exit () showCursor (false) guiSetVisible (Panel, not guiGetVisible ( Panel ) ) end server,lua Teame21 = createTeam("**KillZone**", 32, 32, 32) Team1 = createTeam("**Civiles**", 32, 32, 32) addCommandHandler ( "tbk", function ( thePlayer ) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "TBK" ) ) then triggerClientEvent ( thePlayer, "onGreetingK", thePlayer ) else end end ) function skinNormalChico (jogador) setPedSkin ( jogador, 39) end addEvent( "onGreeting", true) addEventHandler( "onGreeting", getRootElement(), skinNormalChico ) ------------------------------------------------------------------------ function skinNormalChica (jogador) setPedSkin ( jogador, 102) end addEvent( "onGreetingC", true) addEventHandler( "onGreetingC", getRootElement(), skinNormalChica ) ------------------------------------------------------------------------ function skinLiderChic0 (jogador) setPedSkin ( jogador, 306) end addEvent( "onGreetingB", true) addEventHandler( "onGreetingB", getRootElement(), skinLiderChic0 ) ------------------------------------------------------------------------- function skinLiderChica (jogador) setPedSkin ( jogador, 281) end addEvent( "onGreetingD", true) addEventHandler( "onGreetingD", getRootElement(), skinLiderChica ) ------------------------------------------------------------------------ function Invitar () local Teame21 = getTeamFromName ( "**KillZone**" ) if Teame21 then setPlayerTeam ( source, Teame21 ) else local Teame21 = getTeamFromName ( "**KillZone**" ) if Teame21 then cancelEvent() outputChatBox("Usted no tiene que usar esto otra vez!", thePlayer) end end end addEvent( "LNZ", true) addEventHandler( "LNZ", getRootElement(), Invitar ) ----------------------------------------------------------------------- ----------------- function Echar (plr) local Team1 = getTeamFromName("**Civiles**") if Team1 then setPlayerTeam(source, Team1) outputChatBox ( "#870303[CLAN]>Has Sido Invitado a el [CLAN]>**KillZone**", source, 0, 255, 0, true ) else cancelEvent() outputChatBox ( "#FF0000Te Han Expulsado de **KillZone**", source, 0, 245, 82, true ) end end addEvent( "EchaRDelTeam", true) addEventHandler( "EchaRDelTeam", getRootElement(), Echar ) ------------------------------------------------------------------------- Edited March 5, 2017 by Akranes123 Link to comment
^iiEcoo'x_) Posted March 5, 2017 Share Posted March 5, 2017 Write Command In F8 ( debugscript 3 ) , Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now