Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Esto lo configuras en el acl.xml, le pones "false" en donde diga eso (ni idea como se llamara)
  2. Yup, i do.
  3. local X = 0.375 local Y = 0.375 local Width = 0.25 local Height = 0.25 wdwLogin = guiCreateWindow(X, Y, Width, Height, "Please Log In", true) -- define new X and Y positions for the first label X = 0.0825 Y = 0.2 -- define new Width and Height values for the first label Width = 0.25 Height = 0.25 -- create the first label, note the final argument passed is 'wdwLogin' meaning the window -- we created above is the parent of this label (so all the position and size values are now relative to the position of that window) guiCreateLabel(X, Y, Width, Height, "Username", true, wdwLogin) -- alter the Y value, so the second label is slightly below the first Y = 0.5 guiCreateLabel(X, Y, Width, Height, "Password", true, wdwLogin) X = 0.415 Y = 0.2 Width = 0.5 Height = 0.15 edtUser = guiCreateEdit(X, Y, Width, Height, "", true, wdwLogin) Y = 0.5 edtPass = guiCreateEdit(X, Y, Width, Height, "", true, wdwLogin) -- set the maximum character length for the username and password fields to 50 guiEditSetMaxLength(edtUser, 50) guiEditSetMaxLength(edtPass, 50) X = 0.415 Y = 0.7 Width = 0.25 Height = 0.2 btnLogin = guiCreateButton(X, Y, Width, Height, "Log In", true, wdwLogin) -- make the window invisible guiSetVisible(wdwLogin, false) addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function () -- create the log in window and its components -- output a brief welcome message to the player outputChatBox("Welcome to My MTA:SA Server, please log in.") -- 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 ) function clientSubmitLogin(button,state) if button == "left" and state == "up" then -- get the text entered in the 'username' field local username = guiGetText(edtUser) -- get the text entered in the 'password' field local password = guiGetText(edtPass) -- 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 addEventHandler("onClientGUIClick", btnLogin, clientSubmitLogin, false)
  4. Show your FULL code.
  5. wtf? what is that "eof" there??
  6. That's not required, i've helped him on MSN, i guess case close.
  7. where you got that "source" from?
  8. Post your code, we can't help you if you don't show us how does your script work.
  9. Use this to draw a text, https://wiki.multitheftauto.com/wiki/DxDrawText btw: is not a program to install o_o
  10. That must be the problem, download this and put it there. http://www.mediafire.com/?b94mbcllyz9i27z
  11. Check in your GTA:SA in "text" folder if you have all the languages, i didn't had all and wasn't able to start.
  12. I use Windows 7 also without problems, i had a similiar problem that the loading screen of mta starts and then game won't open, i fixed it with adding again the language files (i think they are that).
  13. Castillo

    .

    I haven't sense of humor?! are you kidding me?
  14. Please read this topic: viewtopic.php?f=91&t=26541 as there says, it's hard to find someone to script for free.
  15. uhm, este recurso tiene varios problemas, primero tienes que agregarlo al acl.xml asi tiene permiso para usar la funcion getPlayerIP, luego cuando pasa esto, tienes que reconectarte y deberia funcionar bien.
  16. to draw his name use https://wiki.multitheftauto.com/wiki/DxDrawText combined with getPlayerName.
  17. Castillo

    .

    Where did i "fail"? that script if i'm right, it won't let players go in if they doesn't has the correct skin.
  18. John, this was working when i gave it to you o_o P.S: Get on msn when you can.
  19. Well, you must edit the script to make them show all time.
  20. Castillo

    .

    But, how already is the code should do what you want o_o
  21. You want to repair the vehicle? if so, addCommandHandler( "mend", function( thePlayer, commandName, who ) if exports.players:isLoggedIn( thePlayer ) then local inPD, factionID, factionName, factionTag = exports.factions:isPlayerInFactionType( thePlayer, 3 ) if inPD and factionTag then fixVehicle(getPedOccupiedVehicle(getPlayerFromName(who))) else outputChatBox( "(( You are not in a Government faction. ))", thePlayer, 255, 0, 0 ) end end end )
  22. Castillo

    .

    What do you mean? lock the vehicle after try to enter? P.S: This should be moved to scripting section i think.
  23. Castillo

    Adding cmd.

    to add a command just use addCommandHandler
  24. The teams are created when a player joins, if the team has no players then it won't be shown.
  25. Next time use "EDIT" button, thanks.
×
×
  • Create New...