Jump to content

JR10

Retired Staff
  • Posts

    2,947
  • Joined

  • Last visited

Everything posted by JR10

  1. JR10

    Permissions

    You mean checking if an account exists? if getAccount ( "accountName" ) then
  2. JR10

    help plis

    That's obvious, when you say "Search Engine". In order to get your server in the "Server Browser" (The only way someone can find your server without having the IP) you need to open ports. Here: https://wiki.multitheftauto.com/wiki/Server_Manual If you are talking about sending emails with scripts. There is no existence of resources that will do that. Yet it's not possible, but I have no experience in that. Speedometers can be found on the community: https://community.multitheftauto.com/index.php?p=resources
  3. Is that script in the same resource? If so use: triggerServerEvent If not, you need exports.
  4. JR10

    Gui

    I can tell, that this is copied and not edited. You have a lot of variables, from your script, it should be GUI Elements, but they don't even exist. like: guiWindowSetSizable(windowMain,false) addEventHandler("onClientGUIClick",btnLogin,onClickLogin) addEventHandler("onClientGUIClick",btnToggleRegister,onClickRegisterToggle) addEventHandler("onClientGUIClick",btnPlayAsGuest,onClickGuest) There is no windowMain. And 3 addEventHandler, where is btnLogin etc...
  5. JR10

    Gui

    Post what the debug says.
  6. JR10

    Gui

    I haven't test it. If that what you mean.
  7. @ drivtsavetop : you used executeSQLQuery when you should have used executeSQLSelect. function createNewUDatabankForDrift () executeSQLCreateTable ( "drifttoptimes", "driftonetimedb INTEGER, winneronedriftdb TEXT, drifttwotimedb INTEGER, winnertwodriftdb TEXT, driftthreetimedb INTEGER, winnerthreetimedb TEXT, findtextdb INTEGER" ) end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), createNewUDatabankForDrift ) function driftcleartoplist ( playerSource ) if hasObjectPermissionTo ( playerSource, "function.kickPlayer", false ) then outputChatBox ( "The Drift to 3 have set to 0", 0, 255, 0, source ) executeSQLInsert ( "drifttoptimes", "'0', 'No Name', '0', 'No Name', '0', 'No Name', '1'" ) end end addCommandHandler ( "cleandrift", driftcleartoplist ) function drivtsavetop () outputChatBox ( "Player have finish the race and start now the timer controll save", 0, 255, 0, source ) winnertimeone = executeSQLSelect ( "drifttoptimes", "driftonetimedb", "findtextdb = '1'" ) outputChatBox ( "Best Time from drift race is" ..winnertimeone[1].driftonetimedb, 0, 255, 0, source ) end addEvent( "driftsendtoclient", true ) addEventHandler( "driftsendtoclient", getRootElement(), drivtsavetop )
  8. JR10

    Gui

    Lol? Use the window variable, with guiSetVisible. addEventHandler("onClientResourceStart", resourceRoot, function ( ) createPasswordWindow() createLoginWindow() guiSetVisible(windowChangepw,true) guiSetVisible(windowLogin,true) end)
  9. JR10

    Music in area

    You are outputting debug messages, you should see it. Use /debugscript 3 The lua file name must be: client.lua
  10. Yeah, you must have edited bank.locations.xml.
  11. JR10

    Music in area

    Try: meta: <meta> <info type="script" version="1" author="BlackS"/> <script src = "client.lua" type = "client" /> <file src = "music.mp3" /> </meta> client.lua: function soundStart() sound = playSound3D("music.mp3", 253.234375, -1784.283203125, 4.2362642288208, true) if sound then outputDebugString("3D Created successful", 3) else outputDebugString("Error creating 3D", 1) end end addEventHandler("onClientResourceStart", resourceRoot, soundStart) Use /debugscript 3.
  12. JR10

    Music in area

    Did you add music.mp3 to the meta? And there is already a stopSound function, you can use it to stop the sound, you don't need to make your own. stopSound In MTA 1.1 you can play a live radio. playSound3D ( "http://radio.com/radio" , 0 , 0 , 0 ) Just an example.
  13. JR10

    Gui

    You want to show the GUI, to the joining player, right? client: local localPlayer = getLocalPlayer() local playerName = getPlayerName(localPlayer) function createPasswordWindow() windowChangepw = guiCreateWindow(0.3859,0.349,0.2219,0.1628,"[P-Login] - Change password",true) guiSetSize(windowChangepw, 165, 21) guiSetAlpha(windowChangepw,0.80000001192093) editOldpw = guiCreateEdit(110,29,165,21,"",false,windowChangepw) guiSetAlpha(editOldpw,1) guiEditSetMasked(editOldpw,true) labelOldpw = guiCreateLabel(10,29,90,21,"Old password:",false,windowChangepw) guiSetAlpha(labelOldpw,1) guiLabelSetColor(labelOldpw,255,255,255) guiLabelSetVerticalAlign(labelOldpw,"center") guiLabelSetHorizontalAlign(labelOldpw,"left",false) editNewpw = guiCreateEdit(110,60,165,21,"",false,windowChangepw) guiSetAlpha(editNewpw,1) guiEditSetMasked(editNewpw,true) guiEditSetMaxLength(editNewpw,50) labelNewpw = guiCreateLabel(10,60,90,21,"New password:",false,windowChangepw) guiSetAlpha(labelNewpw,1) guiLabelSetColor(labelNewpw,255,255,255) guiLabelSetVerticalAlign(labelNewpw,"center") guiLabelSetHorizontalAlign(labelNewpw,"left",false) buttonChangepw = guiCreateButton(10,91,265,23,"Change password",false,windowChangepw) guiSetAlpha(buttonChangepw,1) guiSetVisible(windowChangepw, false) addEventHandler("onClientGUIClick", buttonChangepw, clientSubmitChangepw, false) end function createLoginWindow() windowLogin = guiCreateWindow(0.3945,0.3646,0.2109,0.2018,"[P-Login]",true) guiSetSize(windowLogin, 270, 155, false) guiSetAlpha(windowLogin,1) labelUsername = guiCreateLabel(10,52,59,24,"Username:",false,windowLogin) guiSetAlpha(labelUsername,1) guiLabelSetColor(labelUsername,255,255,255) guiLabelSetVerticalAlign(labelUsername,"center") guiLabelSetHorizontalAlign(labelUsername,"left",false) labelPassword = guiCreateLabel(10,86,59,24,"Password:",false,windowLogin) guiLabelSetColor(labelPassword,255,255,255) guiLabelSetVerticalAlign(labelPassword,"center") guiLabelSetHorizontalAlign(labelPassword,"left",false) labelInfo = guiCreateLabel(10,26,250,17,"Please login or register.",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,playerName,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,"Log in",false,windowLogin) guiSetAlpha(buttonLogin,1) buttonRegister = guiCreateButton(143,121,117,21,"Register",false,windowLogin) guiSetAlpha(buttonRegister,1) registerWindow = guiCreateWindow(500,500,500,500,"Registration",false,windowLogin) guiWindowSetSizable(windowMain,false) editRegistrationUsername = guiCreateEdit(98,138,242,25,"",false,registerWindow) editRegistrationPassword = guiCreateEdit(98,195,242,25,"",false,registerWindow) guiEditSetMasked(editRegistrationPassword,true) editRegistrationRepeatPassword = guiCreateEdit(99,252,242,25,"",false,registerWindow) guiEditSetMasked(editRegistrationRepeatPassword,true) Register = guiCreateLabel(24,24,391,97,"Register",false,registerWindow) guiLabelSetColor(lblRegister,0,85,255) guiLabelSetVerticalAlign(lblRegister,"center") guiLabelSetHorizontalAlign(lblRegister,"center",false) guiSetVisible(windowLogin, false) Username = guiCreateLabel(98,113,242,17,"Username:",false,registerWindow) guiLabelSetColor(lblRUsername,0,85,255) guiLabelSetVerticalAlign(lblRUsername,"center") guiLabelSetHorizontalAlign(lblRUsername,"center",false) guiSetFont(lblRUsername,"default-bold-small") Username = guiCreateLabel(98,113,242,17,"Username:",false,registerWindow) guiLabelSetColor(Username,0,85,255) guiLabelSetVerticalAlign(Username,"center") guiLabelSetHorizontalAlign(Username,"center",false) guiSetFont(Username,"default-bold-small") RepeatPassword = guiCreateLabel(98,230,242,17,"Repeat password:",false,registerWindow) guiLabelSetColor(lblRepeatPassword,0,85,255) guiLabelSetVerticalAlign(RepeatPassword,"center") guiLabelSetHorizontalAlign(RepeatPassword,"center",false) guiSetFont(RepeatPassword,"default-bold-small") btnCancel = guiCreateButton(232,292,179,38,"Cancel",false,registerWindow) guiSetFont(btnCancel,"default-bold-small") btnConfirmRegistration = guiCreateButton(29,292,179,38,"Register!",false,registerWindow) guiSetFont(btnConfirmRegistration,"default-bold-small") guiSetVisible(registerWindow, false) guiSetInputEnabled(true) showCursor(true) addEventHandler("onClientGUIClick",btnLogin,onClickLogin) addEventHandler("onClientGUIClick",btnToggleRegister,onClickRegisterToggle) addEventHandler("onClientGUIClick",btnPlayAsGuest,onClickGuest) addEventHandler("onClientGUIClick",btnConfirmRegistration,onClickRegisterConfirm) addEventHandler("onClientGUIClick",btnCancel,onClickCancel) addEventHandler("onClientGUIClick", buttonLogin, clientSubmitLogin, false) addEventHandler("onClientGUIClick", buttonRegister, clientSubmitRegister, false) end addEventHandler("onClientResourceStart", resourceRoot, function ( ) createPasswordWindow() createLoginWindow() --guiSetVisible end) Now, both GUI is created now, but not visible. You need to use "guiSetVisible" to show the GUI guiSetVisible(window, true)
  14. JR10

    Compiled scripts

    Bin, why would he download the nightly, it's 1.0.5 not 1.1. You can try this compiler, it's working: http://www.multiupload.com/L0I5EO8NV0
  15. Because of your post count, I thought you joined recently. Why in the world would I be jealous of you.
  16. You can, make a script to get you there. Client side: addCommandHandler("gotogarage", function ( cmd , garageID ) garageID = tonumber ( garageID ) if garageID == nil or garageID < 0 or garageID > 49 then outputChatBox ( "Invalid Garage ID." , 255 , 0 , 0 ) return end local gX , gY, gZ = getGaragePosition ( garageID ) setElementPosition ( getLocalPlayer ( ) , gX , gY , gZ ) end) Use it like: /gotogarage
  17. JR10

    Permissions

    If you mean, how to retrieve the password, you can do it with setAccountData(account, "password", password). And then use getAccountData.
  18. JR10

    Permissions

    Lol, because there is no code, for SYNTAX message. addCommandHandler("register", function(player, cmd, name, password) if not name or not password then outputChatBox ( "SYNTAX: /register " , player ) return end local account = addAccount(name, password) if account then outputChatBox("Thank you " .. getPlayerName(player) .. ", you're now registed, you can login with /login",player) else outputChatBox("The account already exists" , player ) end end)
  19. JR10

    Permissions

    What happens exactly? If nothing happens then the account already exists.
  20. Go for it! Server opens, the owner dies. Quite a story, isn't it?
  21. JR10

    Gridlist help

    Where ever you want, it will fill the grid list.
  22. You have to open ports. Use this: https://wiki.multitheftauto.com/wiki/Server_Manual
×
×
  • Create New...