Jump to content

Search the Community

Showing results for tags 'panel'.

  • 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
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • 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

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

  1. 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)
  2. __ السلام عليكم__ -:واما بعد .اولا: ياريت اللى مايفهم بالبرمجة شى اصلا نصيحة لاتضيع وقتك هون* . بردو لاتضيع وقتك هون 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 !
  3. 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
  4. 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?
  5. 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.
  6. 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
  7. 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?
  8. 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)
  9. 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.
×
×
  • Create New...