Search the Community

Showing results for tags 'panel'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • Open Source Contributors
    • Suggestions
  • General MTA
    • News
    • Media
    • Site/Forum/IRC/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • community.mtasa.com
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash
  • Private Bugtracker

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Gang


Location


Occupation


Interests

Found 24 results

  1. So i have a shop script wich pretty much allows to buy items/weapons from this shop, the shop sells with "K.B.K Points" which is the player money but with another name to fit the server. The problem i have is when player buys one of the item they get all of them. I want to make them get the item they buy ONLY and get the right amount, for example if you buy a MK 48 Mod 0 Mag, you should get 100x of this item in your inventory because the mag itself is 100, otherwise wich ive tested it only gave 1x. But the problem is when i add more lines which i have shown below, it gives the player all the items listed below, i was trying to use if, and else if, but because i lack experience in lua coding i was not able to debug this even with debugscript! I would appreciate if someone could work out or help me out on how to make the shop only give the player the item the player buys and the right amount! The "+1" in the lists are the amount the player should get! If you need more of the code to understand and help me out then i will add it on request local items = { --items,cena(K.B.K Points) {"M1911",50}, {"PDW",150}, {"Winchester 1866",150}, {"AK-107",300}, {"M4A1 Holo",300}, {"MK 48 Mod 0",450}, {"CZ550",300}, {"DMR",400}, {"M1911 Mag",50}, {"PDW Mag",100}, {"1866 Slug",125}, {"AK-107 Mag",100}, {"M4A1 Holo Mag",50}, {"MK 48 Mod 0 Mag",200}, {"CZ550 Mag",50}, {"DMR Mag",25}, {"Medic Kit",50}, {"Painkiller",10}, {"Morphine",10}, {"Bandage",5}, {"Water Bottle",15}, {"Burger",15}, {"Tire",75}, {"Engine",125}, {"Tank Parts",50}, {"Camouflage Clothing",100}, {"Army Clothing",150}, {"Ghost Clothing",200}, {"K.B.K Backpack",150}, {"Ghillie Suit",200}, {"Civilian Clothing",30}, {"GPS",15}, {"Map",15}, {"Toolbox",25}, } SHOP = { button = {}, window = {}, gridlist = {}, label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() SHOP.window[1] = guiCreateWindow(0.17, 0.23, 0.65, 0.55, "Kill Or Be Killed Shop", true) guiWindowSetMovable(SHOP.window[1], false) guiWindowSetSizable(SHOP.window[1], false) guiSetProperty(SHOP.window[1], "CaptionColour", "FF075205") SHOP.gridlist[1] = guiCreateGridList(0.01, 0.06, 0.97, 0.63, true, SHOP.window[1]) column = guiGridListAddColumn(SHOP.gridlist[1], "Item", 0.5) column2 =guiGridListAddColumn(SHOP.gridlist[1], "K.B.K Points", 0.5) for _, v in ipairs(items) do local row = guiGridListAddRow ( SHOP.gridlist[1] ) guiGridListSetItemText ( SHOP.gridlist[1], row, column, v[1], false, false ) guiGridListSetItemText ( SHOP.gridlist[1], row, column2, v[2].."", false, false ) end guiSetProperty(SHOP.gridlist[1], "SortSettingEnabled", "False") SHOP.label[1] = guiCreateLabel(0.02, 0.69, 0.97, 0.08, "Select item which you want to buy! \nThe shop value is K.B.K Points", true, SHOP.window[1]) guiLabelSetColor( SHOP.label[1],255,255,255) guiSetFont(SHOP.label[1], "default-bold-small") guiLabelSetHorizontalAlign(SHOP.label[1], "center", true) guiLabelSetVerticalAlign(SHOP.label[1], "center") SHOP.button[1] = guiCreateButton(0.35, 0.79, 0.30, 0.12, "BUY", true, SHOP.window[1]) guiSetFont(SHOP.button[1], "default-bold-small") guiSetVisible ( SHOP.window[1], false ) addEventHandler ( "onClientGUIClick", SHOP.gridlist[1], click ) addEventHandler ( "onClientGUIClick", SHOP.button[1], buttonClick ) end ) bindKey ( "f4", "down", function ( ) if getElementData(localPlayer, "logedin") then -- if getElementData (getLocalPlayer(),"playerlevel") >= 3 then local state = ( not guiGetVisible (SHOP.window[1]) ) guiSetVisible ( SHOP.window[1], state ) showCursor ( state ) -- else -- outputChatBox (" 3!") -- end end end ) function buttonClick(button) if getElementData(localPlayer, "logedin") then if button == "left" then local nRow, nColumn = guiGridListGetSelectedItem( SHOP.gridlist[1] ) if nRow ~= -1 and nColumn ~= - 1 then local selectedItem = guiGridListGetItemText ( SHOP.gridlist[1], guiGridListGetSelectedItem ( SHOP.gridlist[1] ), 1 ) local price = guiGridListGetItemText ( SHOP.gridlist[1], guiGridListGetSelectedItem ( SHOP.gridlist[1] ), 2 ) local money = getPlayerMoney(thePlayer) if (money) >= tonumber(price) then guiLabelSetColor( SHOP.label[1],255,255,255) -- guiSetText( SHOP.label[1],"pietiek nauda") setPlayerMoney(money -tonumber(price)) setElementData(getLocalPlayer(),"PDW",getElementData(getLocalPlayer(),"PDW")+1) setElementData(getLocalPlayer(),"Winchester 1866",getElementData(getLocalPlayer(),"Winchester 1866")+1) setElementData(getLocalPlayer(),"M1911",getElementData(getLocalPlayer(),"M1911")+1) setElementData(getLocalPlayer(),"AK-107",getElementData(getLocalPlayer(),"AK-107")+1) setElementData(getLocalPlayer(),"M4A1 Holo",getElementData(getLocalPlayer(),"M4A1 Holo")+1) setElementData(getLocalPlayer(),"DMR",getElementData(getLocalPlayer(),"DMR")+1) setElementData(getLocalPlayer(),"CZ550",getElementData(getLocalPlayer(),"CZ550")+1) setElementData(getLocalPlayer(),"MK 48 Mod 0",getElementData(getLocalPlayer(),"MK 48 Mod 0")+1) setElementData(getLocalPlayer(),"M4A1 Holo Mag",getElementData(getLocalPlayer(),"M4A1 Holo Mag")+20) setElementData(getLocalPlayer(),"DMR Mag",getElementData(getLocalPlayer(),"DMR Mag")+5) setElementData(getLocalPlayer(),"CZ550 Mag",getElementData(getLocalPlayer(),"CZ550 Mag")+10) setElementData(getLocalPlayer(),"M1911 Mag",getElementData(getLocalPlayer(),"M1911 Mag")+100) setElementData(getLocalPlayer(),"PDW Mag",getElementData(getLocalPlayer(),"PDW Mag")+10) setElementData(getLocalPlayer(),"1866 Slug",getElementData(getLocalPlayer(),"1866 Slug")+7) setElementData(getLocalPlayer(),"MK 48 Mod 0 Mag",getElementData(getLocalPlayer(),"MK 48 Mod 0 Mag")+100) setElementData(getLocalPlayer(),"Medic Kit",getElementData(getLocalPlayer(),"Medic Kit")+1) setElementData(getLocalPlayer(),"Painkiller",getElementData(getLocalPlayer(),"Painkiller")+1) setElementData(getLocalPlayer(),"Morphine",getElementData(getLocalPlayer(),"Morphine")+1) setElementData(getLocalPlayer(),"Bandage",getElementData(getLocalPlayer(),"Bandage")+1) setElementData(getLocalPlayer(),"Water Bottle",getElementData(getLocalPlayer(),"Water Bottle")+1) setElementData(getLocalPlayer(),"Burger",getElementData(getLocalPlayer(),"Burger")+1) setElementData(getLocalPlayer(),"Tire",getElementData(getLocalPlayer(),"Tire")+1) setElementData(getLocalPlayer(),"Engine",getElementData(getLocalPlayer(),"Engine")+1) setElementData(getLocalPlayer(),"Tank Parts",getElementData(getLocalPlayer(),"Tank Parts")+1) setElementData(getLocalPlayer(),"Camouflage Clothing",getElementData(getLocalPlayer(),"Camouflage Clothing")+1) setElementData(getLocalPlayer(),"Army Clothing",getElementData(getLocalPlayer(),"Army Clothing")+1) setElementData(getLocalPlayer(),"Ghost Clothing",getElementData(getLocalPlayer(),"Ghost Clothing")+1) setElementData(getLocalPlayer(),"K.B.K Backpack",getElementData(getLocalPlayer(),"K.B.K Backpack")+1) setElementData(getLocalPlayer(),"Ghillie Suit",getElementData(getLocalPlayer(),"Ghillie Suit")+1) setElementData(getLocalPlayer(),"Civilian Clothing",getElementData(getLocalPlayer(),"Civilian Clothing")+1) setElementData(getLocalPlayer(),"GPS",getElementData(getLocalPlayer(),"GPS")+1) setElementData(getLocalPlayer(),"Map",getElementData(getLocalPlayer(),"Map")+1) setElementData(getLocalPlayer(),"Toolbox",getElementData(getLocalPlayer(),"Toolbox")+1) end guiLabelSetColor( SHOP.label[1],10,255,10) guiSetText( SHOP.label[1],"You succesfully bought "..selectedItem.." and you still have "..(money -tonumber(price)).." K.B.K Points") else guiLabelSetColor( SHOP.label[1],255,10,10) guiSetText( SHOP.label[1],"You are missing "..(price -tonumber(money)).." K.B.K Points") end else guiSetText( SHOP.label[1],"Select something first") guiLabelSetColor( SHOP.label[1],255,255,255) end end end function click () local selectedItem = guiGridListGetItemText ( SHOP.gridlist[1], guiGridListGetSelectedItem ( SHOP.gridlist[1] ), 1 ) local price = guiGridListGetItemText ( SHOP.gridlist[1], guiGridListGetSelectedItem ( SHOP.gridlist[1] ), 2 ) guiSetText( SHOP.label[1],"To buy "..selectedItem.." for "..price.." K.B.K Points press button below") guiLabelSetColor( SHOP.label[1],255,255,255) end
  2. GalaxyExx

    clan panel

    hey , i want make a clan list that are showed in panel ( each clan has informations like xp , leader , kills , members , online , members .. ) can anyone help me ?
  3. Angel Carvajal

    TeamSpawnPanel

    Quisiera como pudiera hacer que mi panel cuando muera alguien se abra automaticamente ya que solo abre cuando entras al sv x,y = guiGetScreenSize() JobsWin = guiCreateWindow(x/3 - 170,y/3 - 20,200,320,"Selecciona Tu Equipo",false) teamsList = guiCreateGridList(0,22,186,255,false,JobsWin) column = guiGridListAddColumn( teamsList, "Teams", 0.85 ) for id, team in ipairs(getElementsByType("team")) do local row = guiGridListAddRow ( teamsList ) guiGridListSetItemText ( teamsList, row, 1, getTeamName ( team ), false, false ) guiGridListSetItemColor ( teamsList, row, 1, getTeamColor ( team ) ) end guiWindowSetMovable ( teamsList, false ) guiWindowSetMovable ( JobsWin, false ) guiWindowSetSizable ( teamsList, false ) guiWindowSetSizable ( JobsWin, false ) send = guiCreateButton(0,285,90,25,"Seleccionar",false,JobsWin) CloseButton = guiCreateButton(105,285,90,25,"Cerrar",false,JobsWin) guiSetVisible(JobsWin, true) showCursor(true) setTimer ( showingTeams, 1000, 1) function close() if source == CloseButton then guiSetVisible(JobsWin, false) showCursor(false) end end addEventHandler ( "onClientGUIClick", root, function ( button ) if button == "left" then if source == send then local row, col = guiGridListGetSelectedItem ( teamsList ) local teamName = guiGridListGetItemText ( teamsList, row, col ) triggerServerEvent ( "onPlayerChooseTeam", getLocalPlayer(), teamName ) end end end) addEventHandler("onClientGUIClick", getResourceRootElement(getThisResource()), close)
  4. Andu333

    tuning panel/tuning menu

    where is located tuning panel/tuning menu in resources??? pleasee help i have owl gamemode
  5. KINGKHAN

    Simple gate system with panel

    Hi guys we all know how to make gates and open them with commands or colshape hit etc.. I just replaced same trick with panel I added 2 buttons open the gate & close the gate !this will be help full for team base ,houses or any restricts area ! Hope you like it watch the video from here https://youtu.be/_VjlhdCV-74
  6. KingBC

    Wind sound in Login Panel

    Guys, I have a problem with my login panel. I set to play a song but the wind is still in the background. Help me
  7. Sayonara

    Panel opening on Ped Click

    Hello guys! I have a Ped on serverside, and a Panel on clientside. How can I open my panel on serverside just for the localplayer?
  8. Personally, I'm posting in this category, in case this post can not be here I remove. Well, I'm putting together a "Vip Panel" for my server. The problem I'm having is that when I set up the position with the DX for example: Skin 1 - Skin 2 Vehicle 1 - Vehicle 2 Life / Armor - Weapons Destroy vehicle Skins 1 and 2 work perfectly when you click Vehicles 1 and 2 are also working properly But when I click either on Life / Armor or on Guns he gives me the cars I set for the buttons on vehicles Can someone help me? Below are the codes server.lua function showPanel(thePlayer) accountname = getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup("user." .. accountname, aclGetGroup("hawk")) then triggerClientEvent(thePlayer, "STOP", getRootElement()) else end end function onResStart() for index, player in ipairs(getElementsByType("player")) do bindKey(player, "o", "down", showPanel) end end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), onResStart) function onPlayerJoin() bindKey(source, "o", "down", showPanel) end addEventHandler("onPlayerJoin", getRootElement(), onPlayerJoin) function cleanAll(player) for index, player in ipairs(getElementsByType("player")) do unbindKey(player, "o", "down", showPanel) end end addEventHandler("onResourceStop", getResourceRootElement(getThisResource()), cleanAll) function skin1 () setPedSkin ( source, 1 ) end addEvent("skinns1",true) addEventHandler ( "skinns1", getRootElement(), skin1 ) function skin2 () setPedSkin ( source, 303 ) end addEvent("skinns2",true) addEventHandler ( "skinns2", getRootElement(), skin2 ) veh = {} function criarxx() if veh[source] and isElement( veh[source] ) then destroyElement( veh[source] ) veh[source] = nil end local x,y,z = getElementPosition(source) veh[source] = createVehicle(562, x,y,z + 2) warpPedIntoVehicle (source,veh[source]) end addEvent("carro1",true) addEventHandler("carro1",root,criarxx) veh = {} function criarxx() if veh[source] and isElement( veh[source] ) then destroyElement( veh[source] ) veh[source] = nil end local x,y,z = getElementPosition(source) veh[source] = createVehicle(413, x,y,z + 2) warpPedIntoVehicle (source,veh[source]) end addEvent("carro2",true) addEventHandler("carro2",root,criarxx) function vida() setElementHealth(source, 100) setPedArmor(source, 100) end addEvent("vida", true) addEventHandler("vida", root, vidas) function arms () giveWeapon ( source, 31, 9999 ) giveWeapon ( source, 34, 9999 ) giveWeapon ( source, 28, 9999 ) giveWeapon ( source, 27, 9999 ) giveWeapon ( source, 24, 9999 ) giveWeapon ( source, 23, 9999 ) end addEvent("arms",true) addEventHandler ( "arms", getRootElement(), arms ) function destruircarro () destroyElement ( veh[source] ) end addEvent ("destroy", true) addEventHandler ("destroy", getRootElement(), destruircarro) client.lua painel = false function abrir () dxDrawRectangle(24, 230, 450, 280, tocolor(0, 0, 0, 190), false) dxDrawRectangle(34, 245, 210, 50, tocolor(254, 254, 254, 150), false) dxDrawRectangle(254, 245, 210, 50, tocolor(254, 254, 254, 150), false) dxDrawRectangle(34, 305, 210, 50, tocolor(254, 254, 254, 150), false) dxDrawRectangle(254, 305, 210, 50, tocolor(254, 254, 254, 150), false) dxDrawRectangle(34, 365, 210, 50, tocolor(254, 254, 254, 150), false) dxDrawRectangle(254, 365, 210, 50, tocolor(254, 254, 254, 150), false) dxDrawRectangle(34, 425, 430, 50, tocolor(181, 15, 19, 169), false) dxDrawRectangle(24, 172, 450, 48, tocolor(0, 0, 0, 190), false) dxDrawText("PAINEL EXCLUSIVO [Hawk]", 24, 172, 474, 220, tocolor(255, 255, 255, 255), 0.90, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("SKIN 1", 34, 245, 244, 295, tocolor(255, 255, 255, 255), 0.90, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("SKIN 2", 254, 245, 464, 295, tocolor(255, 255, 255, 255), 0.90, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("VEÍCULO 1", 34, 305, 244, 355, tocolor(255, 255, 255, 255), 0.90, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("VEÍCULO 2", 254, 305, 464, 355, tocolor(255, 255, 255, 255), 0.90, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("VIDA/COLETE", 34, 365, 244, 415, tocolor(255, 255, 255, 255), 0.90, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("ARMAS", 254, 365, 464, 415, tocolor(255, 255, 255, 255), 0.90, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("DESTRUIR VEÍCULO", 34, 425, 464, 475, tocolor(255, 255, 255, 255), 0.90, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("Créditos: KingBC | Role Play Brasil", 24, 485, 474, 505, tocolor(255, 255, 255, 255), 1.00, "clear", "center", "center", false, false, false, false, false) end function abrirbind() if painel == false then showCursor (true) addEventHandler ("onClientRender", root,abrir) painel = true else if painel == true then showCursor(false) removeEventHandler("onClientRender",root,abrir) painel = false end end end addEvent("STOP", true) addEventHandler("STOP", getRootElement(), abrirbind) function isCursorOnElement(x,y,w,h) local mx,my = getCursorPosition () local fullx,fully = guiGetScreenSize() cursorx,cursory = mx*fullx,my*fully if cursorx > x and cursorx < x + w and cursory > y and cursory < y + h then return true else return false end end function skin1 (_,state) if painel == true then if state == "down" then if isCursorOnElement(34, 245, 244, 295 ) then triggerServerEvent ("skinns1", localPlayer) end end end end addEventHandler ("onClientClick", root, skin1) function skin2 (_,state) if painel == true then if state == "down" then if isCursorOnElement(254, 245, 464, 295 ) then triggerServerEvent ("skinns2", localPlayer) end end end end addEventHandler ("onClientClick", root, skin2) function veiculo1 (_,state) if painel == true then if state == "down" then if isCursorOnElement(34, 305, 244, 355 ) then triggerServerEvent ("carro1", localPlayer) end end end end addEventHandler ("onClientClick", root, veiculo1) function veiculo2 (_,state) if painel == true then if state == "down" then if isCursorOnElement(254, 305, 464, 355 ) then triggerServerEvent ("carro2", localPlayer) end end end end addEventHandler ("onClientClick", root, veiculo2) function vidas(_,state) if painel == true then if state == "down" then if isCursorOnElement (34, 365, 244, 415) then triggerServerEvent ("vida", getLocalPlayer()) end end end end addEventHandler ("onClientClick", root, vidas) function arms (_,state) if painel == true then if state == "down" then if isCursorOnElement(254, 365, 464, 415 ) then triggerServerEvent ("arms", localPlayer) end end end end addEventHandler ("onClientClick", root, arms) function destroy (_,state) if painel == true then if ( isCursorOnElement (34, 425, 464, 475) ) then --- destruir triggerServerEvent ("destroy", localPlayer) end end end addEventHandler ("onClientClick", root, destroy)
  9. Hani2001

    [Help]TXD checkbox

    Hi Please i need function if checkbox checked txd will be remplaced if unchek Return Normal
  10. I want create a help panel, with html, but i don't know how to make this.. Anyone can help?
  11. Jeffield

    Ayuda con panel

    Buenas tardes, me podrían ayudar a cómo hacer para solucionar el siguiente problema, cuando realizo un panel y creo un Edit Box, al intentar ingresar texto en el Edit Box existe problemas con las teclas que tienen bind, por ejemplo con la t(para el say) o p(para el panel de admin). Este es el código de un ejemplo simple (Client): function asd() Panel = guiCreateWindow(216, 166, 942, 231, "", false) guiWindowSetSizable(Panel, false) Ingreso = guiCreateEdit(51, 41, 858, 68, "", false, Panel) showCursor (true) end addCommandHandler ("cp", asd) Aquí las SS del problema con la "t": http://prntscr.com/gw9g0z http://prntscr.com/gw9gp2 lo mismo pasa al presionar la "p" mientras se escribe en el Editbox: http://prntscr.com/gw9h3t ¿Cómo puedo hacer que sin importar la tecla que presione el bin de esa no se active del mismo modo que este ejemplo? http://prntscr.com/gw9hlm
  12. i have a loginpanel, and i added this lines: time = getTickCount() x = 1000 y = 200 z = 20 function anim() x = x+0.31 y = y+0.32 setCameraMatrix(x,y,z, 0, 0, 0) if (getTickCount() - time >= 5000) then removeEventHandler("onClientPreRender", getRootElement(), anim) end end addEventHandler("onClientPreRender", getRootElement(), anim) but when i log in, how to set camera to the player? because when i login, the loginpanel disappear, and the camera stay there sorry for my bad english :c
  13. MBAUser

    Boton Panel > Función de "Job"

    Mi problema es que obviamente no se scriptear bien jaja, pero tengo la idea de como hacerlo, es a partir del panel, (AL PULSAR > "ABOTON1" en el panel(Ventana2) empezar un recorrido, y hacer que se cree 1 marker, y asi apenas llega, que espere 3 segundos, se destruya el marker, y se cree 1 nuevo en otra parada y asi. Al llegar que le de dinero, no veo que sea algo dificil de hacer, pero intente de todo, por eso recurro a la comunidad... Espero que no sea mucha molestia, gracias por leer! ----------------------------------------------------- -- Esto seria la parte del panel para que empieze a trabajar osea "Aboton1" ----------------------------------------------------- addEventHandler("onClientGUIClick", guiRoot, function() local getGui = guiGetVisible(Ventana2) if source == Aboton13 then if getGui then guiSetVisible(Ventana2, false) showCursor(false) end elseif source == Aboton1 then --Para empezar el trabajo if getGui then guiSetVisible(Ventana2, false) showCursor(false) setElementVisibleTo ( Linea54terminal, root, false ) end end end ) Linea54terminal = createMarker(2482.2924804688, 1917.4254150391, 9.768750190735,"cylinder",2,0,218,255) setElementVisibleTo ( Linea54terminal, root, false ) veh = {} function Linea54A (source) --Empieza el trabajo haciendo click en Aboton1<< if isElementWithinMarker(source, Linea54terminal) --Cuando toca con el Marker de la terminal la cosa es q empieze e lrecorrido then if veh[source] and isElement( veh[source] ) --Con determinado vehiculo del team then destroyElement ( Linea54terminal ) --Se destruye el marker de terminal Linea54Parada1 = createMarker(2482.2924804688, 1917.4254150391, 9.768750190735,"cylinder",2,0,218,255) end end end addEventHandler( "onMarkerHit", Linea54terminal, incio ) -------------------------------
  14. السلام عليكم شباب انا عندي vps Debian GNU/Linux 8 مطلوب برمجة لوحة Open Game Panel ومقابل vps Windows او Linux البرمجة راح تتم عن طريق TeamViewer للتواصل مع اصاحب الاستضافة عن طريق Skaype https://join.skype.com/l6WJnoXTBrsi
  15. Turbo777

    Why not hide the loginpanel?

    client: function asdasd111() removeEventHandler("onClientRender",root,a123) guiSetVisible(buttonLogin,false) guiSetVisible(buttonRegister,false) guiSetVisible(buttonGuest,false) guiSetVisible(editPassword,false) guiSetVisible(editUsername,false) guiSetVisible(G1,false) guiSetVisible(G2,false) showCursor(false) end addEvent ( "onClientPlayerLogin", true ) addEventHandler ( "onClientPlayerLogin", root, asdasd111 ) server: function triggerLogin ( player, username, password ) triggerClientEvent ( player, "onClientPlayerLogin", player, username, password ) end what wrong?
  16. Buenas!, este script está muy bueno, basicamente lo que hace es darte la posibilidad de seleccionar tu personaje con unos blink para moverte y a su vez decidír el sexo del mismo. El problema deviene cuando has seleccionado a tu personaje? este al iniciar se quita el skin que te pusiste y automaticamente se pone el skin inicial, no sé si me doy a entender?. Lo que quiero es saber como hago para qu el skin pretederminado de mi server Day-Z no reemplaze el de panel menú selección, aquí el script!: femaleSkins = {179, 93} maleSkins = {73, 287} --------**-------- -------//\\------- ------// \\------ -----// \\----- ----// \\---- ---// \\--- --// \\-- --\\ Settings //-- local defaultSex = "male" -- Set the default sex (Can be "male" or "female") -- Please note that any of the timers below are in milliseconds (ms) local skinCamTimer = 100 -- Timer to switch the camera to the selected skin (Change to a higher value if the camera doesn't switch to the Ped Selection Screen) local playerCamTimer = 100 -- Timer to switch the camera back to the player (Change to a higher value if the camera doesn't switch back to the player) local setSkinTimer = 50 -- Timer to override any skin change done by other scripts (Change to a higher value if the player's skin doesn't change) -- Scroll settings local autoScrollStart = 200 -- Set the time it takes in ms to enable auto scroll when holding down your arrow keys (cannot be lower than 50) local autoScrollSpeed = 80 -- Set the time it takes in ms to switch between skins when holding down your arrow keys (cannot be lower than 50) --// \\-- --\\ //-- ---\\ //--- ----\\ //---- -----\\ //----- ------\\ //------ -------\\//------- --------**-------- local sWidth,sHeight = guiGetScreenSize() local origWidth,origHeight = 1280,960 local isScreenVisible = false local skinRequested = false function text(text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI) dxDrawText(text, x/origWidth*sWidth+1.5, y/origHeight*sHeight+1.5, w/origWidth*sWidth+1.5, h/origHeight*sHeight+1.5, tocolor(0,0,0,255), scale/origWidth*sWidth, font, alignX, alignY, clip, wordBreak, postGUI) dxDrawText(text, x/origWidth*sWidth, y/origHeight*sHeight, w/origWidth*sWidth, h/origHeight*sHeight, color, scale/origWidth*sWidth, font, alignX, alignY, clip, wordBreak, postGUI) end function image(x, y, w, h, image, rotation, rotationCenterOffsetX, rotationCenterOffsetY, color, postGUI) dxDrawImage(x/origWidth*sWidth, y/origHeight*sHeight, w/origWidth*sWidth, h/origHeight*sHeight, image, rotation, rotationCenterOffsetX, rotationCenterOffsetY, color, postGUI) end function mainScreen() dxDrawImage(0,0,sWidth,sHeight,"img/bg.png",0,0,0,tocolor(255,255,255,255),true) text("Selecciona a tu superviviente:", 74, 35, 610, 136, tocolor(0, 155, 255, 255), 5.00, "default", "left", "top", false, false, true, false, false) text("Soldado-Z: "..selectedSkin.."/"..totalSkins, 290, 198, 440, 249, tocolor(0, 155, 255, 255), 2.50, "default", "left", "top", false, false, true, false, false) text("Use el ratón o las flechas de tu teclado para seleccionar. Presiona [Enter] cuando hallas decidido.", 322, 837, 1042, 875, tocolor(255, 255, 255, 255), 2.00, "default", "center", "center", false, false, true, false, false) image(473, 419, 96, 140, "img/arrow.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) image(767.75, 419, 96, 140, "img/arrow.png", 180, 0, 0, tocolor(255, 255, 255, 255), true) image(45, 207, 130, 131, "img/male.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) image(55, 380, 130, 131, "img/female.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) end function prevArrowBlink() image(473, 419, 96, 140, "img/arrow-blink.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) end function nextArrowBlink() image(767.75, 419, 96, 140, "img/arrow-blink.png", 180, 0, 0, tocolor(255, 255, 255, 255), true) end function maleActivated() image(45, 207, 130, 131, "img/male-active.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) end function femaleActivated() image(55, 380, 130, 131, "img/female-active.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) end local prevButtonClickable = guiCreateStaticImage(0.36, 0.44, 0.08, 0.15, "img/transparent.png", true) local nextButtonClickable = guiCreateStaticImage(0.62, 0.44, 0.07, 0.15, "img/transparent.png", true) local maleButtonClickable = guiCreateStaticImage(0.06, 0.21, 0.10, 0.14, "img/transparent.png", true) local femaleButtonClickable = guiCreateStaticImage(0.06, 0.40, 0.07, 0.14, "img/transparent.png", true) function showClickables(isScreenVisible) guiSetVisible(prevButtonClickable,isScreenVisible) guiSetVisible(nextButtonClickable,isScreenVisible) guiSetVisible(maleButtonClickable,isScreenVisible) guiSetVisible(femaleButtonClickable,isScreenVisible) end showClickables(isScreenVisible) function toggleScreen() if isScreenVisible then closeScreen() else addEventHandler("onClientRender",root,mainScreen) if defaultSex == "male" then addEventHandler("onClientRender",root,maleActivated) elseif defaultSex == "female" then addEventHandler("onClientRender",root,femaleActivated) end isScreenVisible = true showClickables(isScreenVisible) showCursor(true) setTimer(function()showChat(false)end,200,1) setPlayerHudComponentVisible("all",false) bindKey("enter","down",changePlayerSkin) end end function closeScreen() skinRequested = false firstTime = false setTimer(function()setCameraTarget(localPlayer)end,playerCamTimer,1) triggerServerEvent("setElemDimen",localPlayer,localPlayer,0) removeEventHandler("onClientRender",root,mainScreen) removeEventHandler("onClientRender",root,femaleActivated) removeEventHandler("onClientRender",root,maleActivated) isScreenVisible = false showClickables(isScreenVisible) showCursor(false) setTimer(function()showChat(true)end,200,1) setPlayerHudComponentVisible("all",true) unbindKey("enter","down",changePlayerSkin) end function onSpawn(firstTime) if skinRequested == true or firstTime == true then toggleScreen() triggerServerEvent("setElemDimen",localPlayer,localPlayer,2) triggerServerEvent("setElemFrozen",localPlayer,localPlayer,true) setTimer(function()setCameraMatrix(-4949.8793945313, 1934.9215087891, 1.1398046016693)end,skinCamTimer,1) elseif firstTime == true then addEventHandler("onClientPlayerSpawn",localPlayer,onSpawn) end firstTime = false end addEvent("onJoin",true) addEventHandler("onJoin",root,onSpawn) function requestSkinChange() if skinRequested == false then skinRequested = true addEventHandler("onClientPlayerSpawn",localPlayer,onSpawn) if not firstTime == true then outputChatBox("¡Podrá seleccionar otro skin después del siguiente spanw!.",0,225,75,true) end end end bindKey("F4","down",requestSkinChange) function changePlayerSkin() toggleScreen() setPlayerTheirSkin() skinChosen = true triggerServerEvent("setElemFrozen",localPlayer,localPlayer,false) removeEventHandler("onClientPlayerSpawn",localPlayer,onSpawn) end function setChosenSkinOnSpawn() if skinChosen == true then setTimer(function()setPlayerTheirSkin()end,50,1) end end addEventHandler("onClientPlayerSpawn",localPlayer,setChosenSkinOnSpawn) local ped = createPed(-4952.5239257813, 1940.0152587891, 1.1328125) setElementDimension(ped,2) local tune = playSFX3D("radio","Ambience",-4949.8793945313, 1934.9215087891, 1.1398046016693,true) setSoundVolume(tune,1) setSoundMaxDistance(tune,50) setElementDimension(tune,2) function getSelectedSkinID() local ID = skinTable[selectedSkin] return ID end function setMenuPedSkin() local ID = getSelectedSkinID() setElementModel(ped,ID) end function changeSex(sex) if source == maleButtonClickable or sex == "male" then defaultSex = "male" setPedAnimation(ped,"GANGS","Invite_Yes",_,_,false,false,_) skinTable = maleSkins totalSkins = #skinTable selectedSkin = 1 setMenuPedSkin() if isScreenVisible then removeEventHandler("onClientRender",root,femaleActivated) addEventHandler("onClientRender",root,maleActivated) end elseif source == femaleButtonClickable or sex == "female" then defaultSex = "female" setPedAnimation(ped,"BEACH","SitnWait_loop_W",_,_,false,false,_) skinTable = femaleSkins totalSkins = #skinTable selectedSkin = 1 setMenuPedSkin() if isScreenVisible then removeEventHandler("onClientRender",root,maleActivated) addEventHandler("onClientRender",root,femaleActivated) end end end addEventHandler("onClientGUIClick",resourceRoot,changeSex) changeSex(defaultSex) function selectNextSkin() if selectedSkin == totalSkins then selectedSkin = 1 else selectedSkin = selectedSkin+1 end end function selectPrevSkin() if selectedSkin == 1 then selectedSkin = totalSkins else selectedSkin = selectedSkin-1 end end function setPlayerTheirSkin() local ID = getSelectedSkinID() setTimer(function()triggerServerEvent("changePlayerSkin",localPlayer,ID,selectedSkin)end,setSkinTimer,1) end -- Button prev < local renderprev = true function prevPedButton() if isScreenVisible then playSound("scroll.mp3") if renderprev == true then addEventHandler("onClientRender",root,prevArrowBlink) renderprev = false end setTimer(function()removeEventHandler("onClientRender",root,prevArrowBlink) renderprev = true end,50,1) selectPrevSkin() setMenuPedSkin() end end addEventHandler("onClientGUIClick",prevButtonClickable,prevPedButton,false) bindKey("arrow_l","down",prevPedButton) -- Button next > local rendernext = true function nextPedButton() if isScreenVisible then playSound("scroll.mp3") if rendernext == true then addEventHandler("onClientRender",root,nextArrowBlink) rendernext = false end setTimer(function()removeEventHandler("onClientRender",root,nextArrowBlink) rendernext = true end,50,1) selectNextSkin() setMenuPedSkin() end end addEventHandler("onClientGUIClick",nextButtonClickable,nextPedButton,false) bindKey("arrow_r","down",nextPedButton) -- Scroll functions function nextPed_scroll() timernext = setTimer( function() timernext2 = setTimer( function() nextPedButton() end ,autoScrollSpeed,0) end ,autoScrollStart,1) end bindKey("arrow_r","down",nextPed_scroll) function prevPed_scroll() timerprev = setTimer( function() timerprev2 = setTimer( function() prevPedButton() end ,autoScrollSpeed,0) end ,autoScrollStart,1) end bindKey("arrow_l","down",prevPed_scroll) function killAutoScroll_next() if isTimer(timerprev) then killTimer(timerprev) elseif isTimer(timerprev2) then killTimer(timerprev2) end end bindKey("arrow_l","up",killAutoScroll_next) function killAutoScroll_prev() if isTimer(timernext) then killTimer(timernext) elseif isTimer(timernext2) then killTimer(timernext2) end end bindKey("arrow_r","up",killAutoScroll_prev)
  17. __ السلام عليكم__ -:واما بعد .اولا: ياريت اللى مايفهم بالبرمجة شى اصلا نصيحة لاتضيع وقتك هون* . بردو لاتضيع وقتك هون mta ثانيا : اللى هيقلى انا ابرمج فى* شى اساسى طبعا! linux ثالثا : نبداء بالشى المهم اول شى لازم يعرف فى نظام* .ip,tcp,udp,ports,other.....وثانى شى لازما يعرف فى مجال الشبكات يعنى مثال& . ثالث شى يالحلوين يحط فى حسابة انة مايشتغل على فى بى اس عادى يعنى بختصار فى مودم منجر& رابع شى الوقت مهم ولله بسبب تكالف الباهظة الفى بى اس يعنى يخلص الاستضافة فى يوم اقصى& .شى 24 مفهو م ماعم امزح نرجع بقى لعنوان الموضوع *-- كيف يعنى اكبر استضافة عربية --*! قق $$$يب راح اجوابك الحين $$$ 35 vCPUs ,200 GB memory -1 HDD :10000 Tb -2 Internet speed :2000 mb and Unlimited -3 4-Servers : America, Asia and Europe the cost : 1500 $ in month بختصار الموضوع كله بلكلمتين :ا اذا انطبقت عليك هالشروط ببساطة تقدر تنورنا اسكيب الحين عبر اللينك اسفل الموضوع* ثانى شى لك اجرك اللى تطلبة او فى بى اس بمواصفات محددة لمدة شهر او ادمن فى اللوحة لمدة سنة ولك تشغل4 سيرفرات لاى لعبة تبيها * اخر شى : https://join.skype.com/lZqspfo3VEc2 :بالاخير Thanks for watching my Topic !
  18. Fist

    MTA DayZ Admin Panel

    Handy tool for DayZ servers, very easy to use and neatlooking DayZ Admin Panel. It's completly open sourcefeel free to edit it to your likings but please do notremove original author (me) also credit goes to Supermanaddon creator Ryden, without him this handy tool wouldnot be so cool. Default open bind is OOnce you go in Duty Mod you are invincible and you can fly.==-- To doInventory inspectorSuperAdmin featuresBan List (also unbaning)Report systemSpectate (maybe?)==-- FeaturesDuty Mode, Kick, Ban, Mute, Freeze, Warp,Warp Player To, Set Stats, Change Weather, Kill Player,Spawn Items, Spawn Vehicles, Send Global Message,Fix Car, Destroy Car, Blow Car, See Stats about player. If you find any bug report here or pm me, i'll fix it as soon as possible. Download Link: https://community.multitheftauto.com/index.php?p=resources&s=details&id=14187
  19. client: local localPlayer = getLocalPlayer() local playerName = getPlayerName(localPlayer) function noBinds() guiSetInputMode("no_binds_when_editing") end addEventHandler("onClientResourceStart", root, noBinds) function createLoginWindow() windowLogin = guiCreateWindow(0.3945,0.3646,0.2109,0.2018,"Magyar Play Szerver - Loginpanel by turbesz",true) guiSetSize(windowLogin, 270, 175, false) guiSetAlpha(windowLogin,1) labelUsername = guiCreateLabel(10,52,59,24,"Felh.név:",false,windowLogin) guiSetAlpha(labelUsername,1) guiLabelSetColor(labelUsername,255,255,255) guiLabelSetVerticalAlign(labelUsername,"center") guiLabelSetHorizontalAlign(labelUsername,"left",false) labelPassword = guiCreateLabel(10,86,59,24,"Jelszó:",false,windowLogin) guiSetAlpha(labelPassword,1) guiLabelSetColor(labelPassword,255,255,255) guiLabelSetVerticalAlign(labelPassword,"center") guiLabelSetHorizontalAlign(labelPassword,"left",false) labelInfo = guiCreateLabel(10,26,250,17,"Regizz, és jelentkezz be a játékhoz.",false,windowLogin) guiSetAlpha(labelInfo,1) guiLabelSetColor(labelInfo,255,255,255) guiLabelSetVerticalAlign(labelInfo,"top") guiLabelSetHorizontalAlign(labelInfo,"center",false) guiSetFont(labelInfo,"default-bold-small") editUsername = guiCreateEdit(79,52,181,25,"",false,windowLogin) guiSetAlpha(editUsername,1) guiEditSetMaxLength(editUsername, 50) editPassword = guiCreateEdit(79,86,181,25,"",false,windowLogin) guiSetAlpha(editPassword,1) guiEditSetMasked(editPassword, true) guiEditSetMaxLength(editPassword, 50) buttonLogin = guiCreateButton(10,121,120,21,"Bejelentkezés",false,windowLogin) guiSetAlpha(buttonLogin,1) buttonRegister = guiCreateButton(143,121,117,21,"Regisztrálás",false,windowLogin) guiSetAlpha(buttonRegister,1) buttonGuest = guiCreateButton(10,145,121,21,"Vendég",false,windowLogin) guiSetAlpha(buttonGuest,1) checkbox_save = guiCreateCheckBox(157,145,117,21,"Adatok mentése",false,false,windowLogin) guiSetFont(checkbox_save,"default-small") guiWindowSetSizable ( windowLogin, false ) guiSetVisible(windowLogin, false) addEventHandler("onClientGUIClick", buttonLogin, clientSubmitLogin, false) addEventHandler("onClientGUIClick", buttonRegister, clientSubmitRegister, false) local username, password = loadLoginFromXML() if not( username == "" or password == "") then guiCheckBoxSetSelected ( checkbox_save, true ) guiSetText ( editUsername, tostring(username)) guiSetText ( editPassword, tostring(password)) else guiCheckBoxSetSelected ( checkbox_save, false ) guiSetText ( editUsername, tostring(username)) guiSetText ( editPassword, tostring(password)) end end function loadLoginFromXML() local xml_save_log_File = xmlLoadFile ("files/xml/adatok.xml") if not xml_save_log_File then xml_save_log_File = xmlCreateFile("files/xml/adatok.xml", "login") end local usernameNode = xmlFindChild (xml_save_log_File, "username", 0) local passwordNode = xmlFindChild (xml_save_log_File, "password", 0) if usernameNode and passwordNode then return xmlNodeGetValue(usernameNode), xmlNodeGetValue(passwordNode) else return "", "" end xmlUnloadFile ( xml_save_log_File ) end function saveLoginToXML(username, password) local xml_save_log_File = xmlLoadFile ("files/xml/adatok.xml") if not xml_save_log_File then xml_save_log_File = xmlCreateFile("files/xml/adatok.xml", "login") end if (username ~= "") then local usernameNode = xmlFindChild (xml_save_log_File, "username", 0) if not usernameNode then usernameNode = xmlCreateChild(xml_save_log_File, "username") end xmlNodeSetValue (usernameNode, tostring(username)) end if (password ~= "") then local passwordNode = xmlFindChild (xml_save_log_File, "password", 0) if not passwordNode then passwordNode = xmlCreateChild(xml_save_log_File, "password") end xmlNodeSetValue (passwordNode, tostring(password)) end xmlSaveFile(xml_save_log_File) xmlUnloadFile (xml_save_log_File) end addEvent("saveLoginToXML", true) addEventHandler("saveLoginToXML", getRootElement(), saveLoginToXML) function resetSaveXML() local xml_save_log_File = xmlLoadFile ("files/xml/adatok.xml") if not xml_save_log_File then xml_save_log_File = xmlCreateFile("files/xml/adatok.xml", "login") end if (username ~= "") then local usernameNode = xmlFindChild (xml_save_log_File, "username", 0) if not usernameNode then usernameNode = xmlCreateChild(xml_save_log_File, "username") end end if (password ~= "") then local passwordNode = xmlFindChild (xml_save_log_File, "password", 0) if not passwordNode then passwordNode = xmlCreateChild(xml_save_log_File, "password") end xmlNodeSetValue (passwordNode, "") end xmlSaveFile(xml_save_log_File) xmlUnloadFile (xml_save_log_File) end addEvent("resetSaveXML", true) addEventHandler("resetSaveXML", getRootElement(), resetSaveXML) addEventHandler("onClientGUIClick",root, function () if source == buttonGuest then guiSetVisible ( windowLogin , false ) showCursor(false) end end ) function resourceStart() createLoginWindow() if (windowLogin ~= nil) then guiSetVisible(windowLogin, true) else outputChatBox("Whoops, valami error történt.") end showCursor(true) guiSetInputEnabled(true) end function clientSubmitLogin(button, state) if button == "left" and state == "up" then local username = guiGetText(editUsername) local password = guiGetText(editPassword) if username and password then triggerServerEvent("submitLogin", getRootElement(), localPlayer, username, password) else guiSetText(labelInfo, "Írj be felh.nevet és jelszót.") end end end function clientSubmitRegister(button, state) if button == "left" and state == "up" then local username = guiGetText(editUsername) local password = guiGetText(editPassword) if username and password then triggerServerEvent("submitRegister", getRootElement(), localPlayer, username, password) else guiSetText(labelInfo, "Írj be felh.nevet és jelszót.") end end end function hideLoginWindow() guiSetInputEnabled(false) guiSetVisible(windowLogin, false) showCursor(false) end function unknownError() guiSetText(labelInfo, "Ismeretlen hiba.") end function loginWrong() guiSetText(labelInfo, "Hibás adatok.") end function registerTaken() guiSetText(labelInfo, "Felhasználó név regisztrálva van.") end addEvent("hideLoginWindow", true) addEvent("unknownError", true) addEvent("loginWrong", true) addEvent("registerTaken", true) addEventHandler("hideLoginWindow", getRootElement(), hideLoginWindow) addEventHandler("unknownError", getRootElement(), unknownError) addEventHandler("loginWrong", getRootElement(), loginWrong) addEventHandler("registerTaken", getRootElement(), registerTaken) addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), resourceStart) fileDelete("client.lua") server: function loginHandler(player, username, password, checksave) local account = getAccount(username, password) if (account ~= false) then if (logIn(player, account, password) == true) then triggerClientEvent (player, "hideLoginWindow", getRootElement()) if checksave == true then triggerClientEvent(source,"saveLoginToXML",getRootElement(),username,password) else triggerClientEvent(source,"resetSaveXML",getRootElement(),username,password) end else triggerClientEvent (player, "unknownError", getRootElement()) end else triggerClientEvent (player, "loginWrong", getRootElement()) end end function registerHandler(player, username, password) local account = getAccount(username, password) if (account ~= false) then triggerClientEvent(player, "registerTaken", getRootElement()) else account = addAccount(username, password) if (logIn(player, account, password) == true) then triggerClientEvent(player, "hideLoginWindow", getRootElement()) else triggerClientEvent(player, "unknownError", getRootElement()) end end end addEvent("submitLogin", true) addEvent("submitRegister", true) addEventHandler("submitLogin", root, loginHandler) addEventHandler("submitRegister", root, registerHandler) why not save?
  20. Seyer

    Login panel bug

    Hola, tengo un problema y no sé si es cosa mía o de como configuré este log-in (lo hice a partir de un video que decía como configurarlo y crearlo) el tema es que en el video (llegado el momento) dice que ejecutemos el comando anteriormente puesto y se le abre la ventana del login pero a mí me sucede todo lo contrario aunque yo haya establecido el mismo comando, haya puesto los mismos nombres en las funciones, etc. no pasa nada. Y ahora, no sé por qué, no me abre el "editor_gui" aunque ponga "/guied" o apriete "shift+c" (este dejo de funcionar a la segunda vez que use el "editor_gui") y como no lo puedo abrir, no puedo agregar un botón de regresar que me faltó en el registro para que vuelva al log-in panel. La verdad, no tengo ni idea de lo que sucede ni como arreglarlo ya que soy nuevo en Scripting y lo relacionado. (Mi primer resource es este login y al ver que no pasa nada es medio frustrante, jaja) Este es el client.lua: local screenM, screenH = guiGetScreenSize() function reg() winRegister = guiCreateWindow(387, 256, 414, 313, "Register panel by Seyer", false) guiWindowSetSizable(winRegister, false) usuario = guiCreateEdit(236, 24, 167, 43, "", false, winRegister) GUIEditor.label[1] = guiCreateLabel(17, 23, 159, 44, "Usuario:", false, winRegister) guiSetFont(GUIEditor.label[1], "sa-header") guiLabelSetColor(GUIEditor.label[1], 15, 239, 253) GUIEditor.label[2] = guiCreateLabel(19, 92, 217, 44, "Contraseña:", false, winRegister) guiSetFont(GUIEditor.label[2], "sa-header") guiLabelSetColor(GUIEditor.label[2], 15, 239, 253) GUIEditor.label[3] = guiCreateLabel(19, 160, 217, 44, "Contraseña:", false, winRegister) guiSetFont(GUIEditor.label[3], "sa-header") guiLabelSetColor(GUIEditor.label[3], 15, 239, 253) contraseña1 = guiCreateEdit(236, 94, 167, 42, "", false, winRegister) guiEditSetMasked(contraseña1,true) contraseña2 = guiCreateEdit(236, 160, 167, 44, "", false, winRegister) guiEditSetMasked(contraseña2,true) brtRegistrar = guiCreateButton(9, 234, 394, 69, "Register", false, winRegister) guiSetFont(GUIEditor.button[1], "sa-header") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF0FEFFD") GUIEditor.label[4] = guiCreateLabel(27, 205, 56, 19, "(máx. 25)", false, winRegister) guiSetFont(GUIEditor.label[4], "default-bold-small") guiLabelSetColor(GUIEditor.label[4], 254, 254, 254) GUIEditor.label[5] = guiCreateLabel(27, 136, 56, 19, "(máx. 25)", false, winRegister) guiSetFont(GUIEditor.label[5], "default-bold-small") guiLabelSetColor(GUIEditor.label[5], 254, 254, 254) GUIEditor.label[6] = guiCreateLabel(27, 67, 56, 19, "(máx. 25)", false, winRegister) guiSetFont(GUIEditor.label[6], "default-bold-small") guiLabelSetColor(GUIEditor.label[6], 254, 254, 254) addEvent("onClientGUIClick",brtRegistrar,function() user=guiGetText(usuario) c=guiGetText(contraseña1) c1=guiGetText(contraseña2) if(c==c1)then triggerServerEvent("rg",getLocalPlayer(),user,c) outputChatBox("Las contraseñas coinciden.") else outputChatBox("Las contraseñas no coinciden.") end addEvent("cerrar",true") addEventHandler("cerrar,getLocalPlayer(),function() guiSetVisible(winRegister,false) showCursor(false) addEvent("cerrar2",true") addEventHandler("cerrar,getLocalPlayer(),function() guiSetVisible(winLogin,false) showCursor(false) function login() winLogin = guiCreateWindow(387, 256, 414, 316, "Log-in panel by Seyer", false) guiWindowSetSizable(winLogin, false) usuario = guiCreateEdit(236, 24, 167, 43, "", false, winLogin) GUIEditor.label[1] = guiCreateLabel(17, 23, 159, 44, "Usuario:", false, winLogin) guiSetFont(GUIEditor.label[1], "sa-header") guiLabelSetColor(GUIEditor.label[1], 15, 239, 253) GUIEditor.label[2] = guiCreateLabel(19, 92, 217, 44, "Contraseña:", false, winLogin) guiSetFont(GUIEditor.label[2], "sa-header") guiLabelSetColor(GUIEditor.label[2], 15, 239, 253) contraseña1 = guiCreateEdit(236, 94, 167, 42, "", false, winLogin) btrLoggearse = guiCreateButton(10, 165, 394, 68, "Login", false, winLogin) guiSetFont(GUIEditor.button[1], "sa-header") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF0FEFFD") GUIEditor.label[3] = guiCreateLabel(27, 136, 56, 19, "(máx. 25)", false, winLogin) guiSetFont(GUIEditor.label[3], "default-bold-small") guiLabelSetColor(GUIEditor.label[3], 254, 254, 254) GUIEditor.label[4] = guiCreateLabel(27, 67, 56, 19, "(máx. 25)", false, winLogin) guiSetFont(GUIEditor.label[4], "default-bold-small") guiLabelSetColor(GUIEditor.label[4], 254, 254, 254) registro = guiCreateButton(11, 240, 393, 66, "Register", false, winLogin) guiSetFont(GUIEditor.button[2], "sa-header") guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FF0FEFFD") showCursor(true) addEvent("onClientGUIClick",registro,function() guiSetVisible(winLogin, false) reg() end) addEvent("onClientGUIClick",btrLoggearse,function() user = guiGetText(usuario) clave = guiGetText(pass) triggerServerEvent("lg",getLocalPlayer(),user,clave) end addCommandHandler("log",login) addEvent("abrirlogin",true) addEventHandler("abrirlogin",getLocalPlayer(),login) y este es el server.lua: function rg(user,clave) if(addAccount(user,clave))then outputChatBox("Regristado correctamente.") triggerClientEvent(source,"cerrar",source) logIn(source,getAccount(user,clave),clave) else outputChatBox("La cuenta ya existe.") end addEvent("rg",true) addEventHandler("rg", getRootElement(),rg) function lg(user,clave) cuenta = getAccount(user,clave) if(cuenta)then logIn(source,getAccount(user,clave),clave) triggerClientEvent(source,"cerrar2",source) else outputChatBox("La cuenta no existe o usuario y/o contraseña incorrectos.") end addEvent("lg",true) addEventHandler("lg", getRootElement(),lg) addEventHandler("onPlayerJoin",getRootElement(),function() triggerClientEvent(source,"abrirlogin",source) end) Saludos y gracias de antemano.
  21. El problema ES Q TODOS LOS USUARIOS PUEDEN ABRIR EL panel de administración PERO TIENE SU PARTES BLOQUIADAS PERO LO PUEDEN ABRIR Y VER EL administración de chat. COMO LOS SOLUCIONO
  22. Razor70538

    Problema con panel gui

    Buenas, quisiera que me ayudaran en algo: Creé un panel y quiero que se active mediante el contacto con un marker, aquí está el detalle.. Cuando activo el panel en el marker, el panel les aparece a todos los usuarios, quiero que le aparezca solamente al que toca el marker, no a todo el mundo, ¿Cómo haría para que sucediera eso?
  23. Benjamin171

    Set Dimension Problems

    Hello, I am scripting a panel that will set people into diffrent dimensions. But i need the code for chaning the Dimension Only, Please Every Answer would be to help. function teleportPlayer() if(source == GUIEditor.button[1]) then local teleportX, teleportY, teleportZ = 1210.48621, 2358.32373, 8.01253 setElementPosition(getLocalPlayer(), teleportX, teleportY, teleportZ) outputChatBox("You Have Been Set To The Arabian Server") end end addEventHandler("onClientGUIClick", root, teleportPlayer) ------------------------- function teleportPlayer() if(source == GUIEditor.button[2]) then local teleportX, teleportY, teleportZ = 1923.0625, -1760.005859375, 13.546875 setElementPosition(getLocalPlayer(), teleportX, teleportY, teleportZ) outputChatBox("You Have Been Set To The English Server") end end addEventHandler("onClientGUIClick", root, teleportPlayer)
  24. aka Blue

    HTML Login panel - Soporte

    Buenas, estoy intentando realizar un panel login mediante HTML con el uso de CEF. La duda que tengo es que quiero, con la ayuda de los input de HTML, al apretar un botón, realizar una función en Lua de MTA, ¿Cómo podría hacerlo? Gracias de antemano.