Jump to content

Soren

Members
  • Posts

    581
  • Joined

  • Last visited

Everything posted by Soren

  1. Ya edite como se supone que deberia estar arreglado
  2. Esete le setearia el money a -100 lo que quiero hacer es quitarle dinero a un player
  3. cierto no me habia fijado Sigue sin funcionarme
  4. Hola a todos hice este login pannel pero este no aparece cuando me meto al server Client side: function() GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Image = {} wdwLogin = guiCreateWindow(500,176,572,448,"",false) button = guiCreateButton(391,336,161,54,"Log-In",false,GUIEditor_Window[1]) guiSetFont(GUIEditor_Button[1],"sa-header") GUIEditor_Edit[1] = guiCreateEdit(39,24,293,267,"Alien Invasion.n/ Survive the Alien hordes . n/Scripted by ISoRen",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(38,332,60,15,"Username",false,GUIEditor_Window[1]) username = guiCreateEdit(99,330,156,25,"",false,GUIEditor_Window[1]) GUIEditor_Label[2] = guiCreateLabel(38,376,60,15,"Password",false,GUIEditor_Window[1]) pass = guiCreateEdit(99,371,156,25,"",false,GUIEditor_Window[1]) GUIEditor_Image[1] = guiCreateStaticImage(383,94,180,158,"images/mtalogo.png",false,GUIEditor_Window[1]) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function () -- create the log in window and its components login() -- if the GUI was successfully created, then show the GUI to the player if (wdwLogin ~= nil) then guiSetVisible(wdwLogin, true) else -- if the GUI hasnt been properly created, tell the player outputChatBox("An unexpected error has occurred and the log in GUI has not been created.") end -- enable the players cursor (so they can select and click on the components) showCursor(true) -- set the input focus onto the GUI, allowing players (for example) to press 'T' without the chatbox opening guiSetInputEnabled(true) end ) addEventHandler("onClientGUIClick", button, clientSubmitLogin, false) function clientSubmitLogin(button,state) -- if our login button was clicked with the left mouse button, and the state of the mouse button is up if button == "left" and state == "up" then -- move the input focus back onto the game (allowing players to move around, open the chatbox, etc) guiSetInputEnabled(false) -- hide the window and all the components guiSetVisible(wdwLogin, false) -- hide the mouse cursor showCursor(false) end end function clientSubmitLogin(button,state) if button == "left" and state == "up" then -- get the text entered in the 'username' field local username = guiGetText(username) -- get the text entered in the 'password' field local password = guiGetText(pass) -- if the username and password both exist if username and password then -- trigger the server event 'submitLogin' and pass the username and password to it triggerServerEvent("submitLogin", getRootElement(), username, password) -- hide the gui, hide the cursor and return control to the player guiSetInputEnabled(false) guiSetVisible(wdwLogin, false) showCursor(false) else -- otherwise, output a message to the player, do not trigger the server -- and do not hide the gui outputChatBox("Please enter a username and password.") end end end Server side: -- create our loginHandler function, with username and password parameters (passed from the client gui) function loginHandler(username,password) end -- define our custom event, and allow it to be triggered from the client ('true') addEvent("submitLogin",true) -- add an event handler so that when submitLogin is triggered, the function loginHandler is called addEventHandler("submitLogin",root,loginHandler) function loginHandler(username,password) -- check that the username and password are correct if username == "user" and password == "apple" then -- the player has successfully logged in, so spawn them if (client) then spawnPlayer(client, 1959.55, -1714.46, 10) fadeCamera(client, true) setCameraTarget(client, client) outputChatBox("Welcome to My Server.", client) end else -- if the username or password are not correct, output a message to the player outputChatBox("Invalid username and password. Please re-connect and try again.",client) end end addEvent("submitLogin",true) addEventHandler("submitLogin",root,loginHandler) Que hice mal?
  5. Me sirvio a la perfeccion muchas gracias. Pueden cerrar el topic
  6. =========================================================== = Multi Theft Auto: San Andreas v1.3 =========================================================== = Server name : Default MTA Server = Server IP address: = Server port : 22003 = = Log file : .. 1.3/server/mods/deathmatch/logs/server.log = Maximum players : 32 = HTTP port : 22005 = Voice Chat : Disabled =========================================================== [2012-03-10 09:58:01] ERROR: Couldn't parse meta file for resource 'AlienInvasion' [2012-03-10 09:58:01] Loading of resource 'AlienInvasion' failed [2012-03-10 09:58:01] ERROR: Couldn't parse meta file for resource 'Log' [2012-03-10 09:58:01] Loading of resource 'Log' failed [2012-03-10 09:58:01] ERROR: Couldn't find script Spawn.lua for resource Teams [2012-03-10 09:58:01] Loading of resource 'Teams' failed [2012-03-10 09:58:03] Resources: 57 loaded, 0 failed [2012-03-10 09:58:03] Querying game-monitor.com master server... unavailable! [2012-03-10 09:58:04] Querying backup master server... success! [2012-03-10 09:58:04] Starting resources.................. [2012-03-10 09:58:05] Server started and is ready to accept connections! [2012-03-10 09:58:05] Type 'help' for a list of commands. Me sigue apareciendo ese puto error y no se que hacer!!! miren como tengo los meta <meta> <info author="iSoRen" description="Random and replace skin" type="gamemode" /> <script src="Log_server.lua/> <script src="Log_client.lua" type="client" /> <script src="Random.lua" /> <script src="Skins.lua" type="client" /> <file src="Skins/1.txd" /> <file src="Skins/1.dff" /> <file src="Skins/2.txd" /> <file src="Skins/2.dff" /> <file src="Skins/10.txd" /> <file src="Skins/10.dff" /> <file src="Skins/22.txd" /> <file src="Skins/22.dff" /> <file src="Skins/13.txd" /> <file src="Skins/13.dff" /> <file src="Skins/23.txd" /> <file src="Skins/23.dff" /> <file src="weapons/22.txd" /> <file src="weapons/22.dff" /> <file src="weapons/24.txd" /> <file src="weapons/24.dff" /> <file src="weapons/25.txd" /> <file src="weapons/25.dff" /> <file src="weapons/27.txd" /> <file src="weapons/27.dff" /> <file src="weapons/30.txd" /> <file src="weapons/30.dff" /> <file src="weapons/31.txd" /> <file src="weapons/31.dff" /> </meta> Ese es el meta de mi gamemode o como dice el .log AlienInvasion Y este es el meta del loguin gui que hice: <meta> <info author="iSoRen" description="Random and replace skin" type="script" /> <script src="Log_client.lua type="client" /> <script src="Log_server.lua" /> </meta> Diganme que carajos tiene mal?!
  7. eso yo lo se hacer pero no se si sirva o tenga que usar otros commandos
  8. Hola a todos @tittle y si no se puede como hago para quitarle dinero a un player?
  9. in the same place you are standing or around you?
  10. it will spawn only 1 both? or many boths? far as i know your script will spawn 1 both in the place the player is?
  11. ok i take a time to read the wiki again and the script you put there is a hunt slothbot that will hunt you ok, How can i make to spawn lots of slothbots in the map?
  12. Ok, thats a example, i dint understand it at all, it suposed to create a ped in the position i put? Any example how to do it with a zombie?
  13. There should be other way to do it, cause i dont understand to slothbot.
  14. Hi all, I found the way to give to the zombies weapons but i want to give them a fire weapon (Ak-47, M4, etc) and make the shoot it. I give them the weapon but they dont shoot. Somebody know how to?
  15. No entendi una m*erda el recurso de slothbot es muy dificil de usar
  16. Puedes usar el sscript que te dio slid y editarlo para que sirva para dar extra vida poniendo en una tabla los numeros de skin
  17. Tu no entendiste mi respuesta... no te lo hare yo por que como te lo puse yo esta mas que claro. PD: No uses Caps lock
  18. Soren

    dos preguntas!

    Yo soy no tan nuevo en lo de lua pero no soy intermedio por que ni a haso llego y me parese interesante la idea de el recurso de elejir los personajes. Solid te meterias a mi server a ense;arme a hacer uno? porfa te lo pido de favor
  19. puedes copiar el acl del mod y despues ponerle en ves de mods se lo cambias a gans
  20. Tendras que aprender LUA LUA Basicohttps://wiki.multitheftauto.com/index.php?title=ES/Introducci%C3%B3n_a_la_Programaci%C3%B3n LUA Gui's:https://wiki.multitheftauto.com/index.php?title=ES/Introducci%C3%B3n_a_la_Programaci%C3%B3n_de_GUI
  21. @SolidSnake14 eso es muy cierto pero de ahi tmb el puede aprender como tu hiciste conmigo ;D mas sin embargo tmb tiene que aprender. En fin el ingles es simple y para la wiki solo necesitas de lo basico del ingles.
  22. Ese script es facilisimo de hacer pero necesito que me des la estructura del gui si no no puedo hacerlo
×
×
  • Create New...