Jump to content

DutchCaffeine

Members
  • Posts

    208
  • Joined

  • Last visited

Everything posted by DutchCaffeine

  1. i going to test it. BIG edit It's working fine. Up to the new!
  2. The problem exactly: I was busy with a registration system with three tabs: Agreement, register form, extra information. I've made all the labels, edit boxes and memos and all of that, after that i give everything an variable, and type the commando /guioutput nothing happends then i told the system /guiprint nothing shows up. And maybe for the next version create a variable: new_line = '\n'. Why, windows doesn't see \n as an new line but \r\n
  3. The problem exactly: I was busy with a registration system with three tabs: Agreement, register form, extra information. I've made all the labels, edit boxes and memos and all of that, after that i give everything an variable, and type the commando /guioutput nothing happends then i told the system /guiprint nothing shows up. And maybe for the next version create a variable: new_line = '\n'. Why, windows doesn't see \n as an new line but \r\n
  4. it seems to be, if you set a variable that the window wont be saved anymore. And in guieditor_s.lua replace it with: --[[ GUI Editor (server) ]]-- function OutputGUIToFile(text) local file = fileOpen("GUIEditor_output.txt") if not file then file = fileCreate("GUIEditor_output.txt") end if file then local size = fileGetSize(file) fileSetPos(file,size) fileWrite(file,"\r\n",text,"\r\n--- --- --- --- ---\r\n") fileClose(file) outputChatBox("Succesfully saved to GUIEditor_output.txt",source) end end addEvent("OutputGUIToFile",true) addEventHandler("OutputGUIToFile",getRootElement(),OutputGUIToFile)
  5. it seems to be, if you set a variable that the window wont be saved anymore. And in guieditor_s.lua replace it with: --[[ GUI Editor (server) ]]-- function OutputGUIToFile(text) local file = fileOpen("GUIEditor_output.txt") if not file then file = fileCreate("GUIEditor_output.txt") end if file then local size = fileGetSize(file) fileSetPos(file,size) fileWrite(file,"\r\n",text,"\r\n--- --- --- --- ---\r\n") fileClose(file) outputChatBox("Succesfully saved to GUIEditor_output.txt",source) endendaddEvent("OutputGUIToFile",true)addEventHandler("OutputGUIToFile",getRootElement(),OutputGUIToFile)
  6. Nice, very very nice just test it. And it works AWESOME really great job, i always want a gui editor (since i play MTA) Thanks for sharing this with us, it is a very nice script resource. Cya arround, Alexander (from the netherlands)
  7. Nice, very very nice just test it. And it works AWESOME really great job, i always want a gui editor (since i play MTA) Thanks for sharing this with us, it is a very nice script resource. Cya arround, Alexander (from the netherlands)
  8. Nice! I looking forward to test it
  9. Nice! I looking forward to test it
  10. first of all you will need a mysql database, if you have that you need a webserver with php (5+). If you have that and you don't have phpMyAdmin (that's a mysql manager written in php) install that, make a database in phpmyadmin add some tables if you ready with that. Download the mysql mod, can be found somewhere on the wiki, install it. Then you need to make a connection in lua, and use all the mysql functions, if you don't know how to make a INSERT, or update go to http://www.mysql.com there is everything explained, very well.
  11. first of all you will need a mysql database, if you have that you need a webserver with php (5+). If you have that and you don't have phpMyAdmin (that's a mysql manager written in php) install that, make a database in phpmyadmin add some tables if you ready with that. Download the mysql mod, can be found somewhere on the wiki, install it. Then you need to make a connection in lua, and use all the mysql functions, if you don't know how to make a INSERT, or update go to http://www.mysql.com there is everything explained, very well.
  12. I know what you need to do, navigate to the news page and sit back and read. ASE (All Seeing Eye) is down, so no server list.
  13. I know what you need to do, navigate to the news page and sit back and read. ASE (All Seeing Eye) is down, so no server list.
  14. Thanks, Is there any other way to get the account of the user, to check of the user exists? Or do need to add the password. Alexander [edit] It's fixed, but it doesn't register, need to get the debug warnings, but that's a piece of cake
  15. Thanks, Is there any other way to get the account of the user, to check of the user exists? Or do need to add the password. Alexander [edit] It's fixed, but it doesn't register, need to get the debug warnings, but that's a piece of cake
  16. Hello folks, Today I went to test my user registration system, and guess what a real strange error pops up. It tells me, I need to contact the application support team. Here we go: I also give the lua source, so maybe i make a mistake in there: user.lua [sERVER SIDE] --[[ user.lua ============== Server system. Alexander de Jong © 2008 This script will do every interacting with the client gui user system. ]]-- --[[ -- CLIENT.LUA addEvent ( "showWindow", true ) addEventHandler ( "showWindow", getRootElement(), function ( name ) guiCreateWindow ( 0.4, 0.4, 0.2, 0.2, name, true ) end ) -- -- SERVER.LUA addCommandHandler ( "test", function ( player ) triggerClientEvent ( player, "showWindow", getRootElement(), "Hello world" ) end ) -- ]]-- --[[ Register a user ]] function userRegister(username, password) -- Extra check of the user exists local Player = getPlayerFromNick(username) local account = getAccount(Player) if(isGuestAccount(account)) then message = " allready exists, you can't register your self." local r,g,b = getPlayerNametagColor(Player) outputChatBox(username .. "#FFFFFF" .. message, Player, r, g, b, true) return false end if(username ~= "" and username ~= nil and password ~= "" and password ~= nil) then local addAcc = addAccount(username, password) if(addAcc) then logIn(Player, account, password) outputChatBox("#00FF00Thank you " .. username .. " for your registration to lexlife! You are automaticly loged in!", Player) else outputChatBox("#FF0000There went something wrong, you can't register", Player) end end end addEvent("lex_onUserRegister", true) addEventHandler("lex_onUserRegister", getRootElement(), userRegister) user.lua client site --[[ user.lua ============ GUI system for the user system, like the register for, login form, and much more Alexander de Jong © 2008 ]]-- wndReg = nil -- Create the registration array reg = {} function userRegister() -- Create the registration window if wndReg == nil then local x, y = guiGetScreenSize() wndReg = guiCreateWindow(x / 2 - 310, y / 2 - 260, 600, 300, "LexLife - Registration", false) -- We need to have a tab in other to let it really work tabPanel = guiCreateTabPanel(0.01, 0.07, 0.98, 0.90, true, wndReg) reg.tabInfo = guiCreateTab("Info", tabPanel) reg.tabForm = guiCreateTab("Register", tabPanel) reg.tabExtra = guiCreateTab("Extra info", tabPanel) -- Create a memo in the tabInfo reg.memoInfo = guiCreateMemo(0.03, 0.03, 0.70, 0.80, "information", true, reg.tabInfo) -- Create a form in tabForm reg.labelPass = guiCreateLabel(0.03, 0.03, 0.25, 0.04, "Password:", true, reg.tabForm) reg.editPass = guiCreateEdit(0.03, 0.10, 0.16, 0.10, "", true, reg.tabForm) reg.btnSend = guiCreateButton(0.03, 0.15, 0.26, 0.10, "Send data", true, reg.tabForm) addEventHandler("onClientGUIClick", reg.btnSend, register) showCursor(false) guiSetVisible(wndReg, false) else showCursor(false) guiSetVisbile(wndReg, false) end end function register() if(source == reg.btnSend) then local player = getLocalPlayer() local pname = getPlayerName(player) triggerServerEvent("lex_onUserRegister", player, pname, guiGetText(reg.editPass)) end end function onCRStart() outputChatBox("Client resource start") userRegister() unbindKey("1", 'down') bindKey("1", 'down', toggleReg) end function toggleReg() if(guiGetVisible(wndReg) == true) then showCursor(false) guiSetVisible(wndReg, false) else showCursor(true) guiSetVisible(wndReg, true) end end addEventHandler( "onClientResourceStart", getResourceRootElement(getThisResource()), onCRStart) Alexander de jong
  17. Hello folks, Today I went to test my user registration system, and guess what a real strange error pops up. It tells me, I need to contact the application support team. Here we go: I also give the lua source, so maybe i make a mistake in there: user.lua [sERVER SIDE] --[[ user.lua ============== Server system. Alexander de Jong © 2008 This script will do every interacting with the client gui user system.]]-- --[[-- CLIENT.LUAaddEvent ( "showWindow", true )addEventHandler ( "showWindow", getRootElement(), function ( name ) guiCreateWindow ( 0.4, 0.4, 0.2, 0.2, name, true )end )-- -- SERVER.LUAaddCommandHandler ( "test", function ( player ) triggerClientEvent ( player, "showWindow", getRootElement(), "Hello world" )end )--]]-- --[[ Register a user]]function userRegister(username, password) -- Extra check of the user exists local Player = getPlayerFromNick(username) local account = getAccount(Player) if(isGuestAccount(account)) then message = " allready exists, you can't register your self." local r,g,b = getPlayerNametagColor(Player) outputChatBox(username .. "#FFFFFF" .. message, Player, r, g, b, true) return false end if(username ~= "" and username ~= nil and password ~= "" and password ~= nil) then local addAcc = addAccount(username, password) if(addAcc) then logIn(Player, account, password) outputChatBox("#00FF00Thank you " .. username .. " for your registration to lexlife! You are automaticly loged in!", Player) else outputChatBox("#FF0000There went something wrong, you can't register", Player) end endend addEvent("lex_onUserRegister", true)addEventHandler("lex_onUserRegister", getRootElement(), userRegister) user.lua client site --[[ user.lua ============ GUI system for the user system, like the register for, login form, and much more Alexander de Jong © 2008]]-- wndReg = nil -- Create the registration arrayreg = {} function userRegister() -- Create the registration window if wndReg == nil then local x, y = guiGetScreenSize() wndReg = guiCreateWindow(x / 2 - 310, y / 2 - 260, 600, 300, "LexLife - Registration", false) -- We need to have a tab in other to let it really work tabPanel = guiCreateTabPanel(0.01, 0.07, 0.98, 0.90, true, wndReg) reg.tabInfo = guiCreateTab("Info", tabPanel) reg.tabForm = guiCreateTab("Register", tabPanel) reg.tabExtra = guiCreateTab("Extra info", tabPanel) -- Create a memo in the tabInfo reg.memoInfo = guiCreateMemo(0.03, 0.03, 0.70, 0.80, "information", true, reg.tabInfo) -- Create a form in tabForm reg.labelPass = guiCreateLabel(0.03, 0.03, 0.25, 0.04, "Password:", true, reg.tabForm) reg.editPass = guiCreateEdit(0.03, 0.10, 0.16, 0.10, "", true, reg.tabForm) reg.btnSend = guiCreateButton(0.03, 0.15, 0.26, 0.10, "Send data", true, reg.tabForm) addEventHandler("onClientGUIClick", reg.btnSend, register) showCursor(false) guiSetVisible(wndReg, false) else showCursor(false) guiSetVisbile(wndReg, false) endend function register() if(source == reg.btnSend) then local player = getLocalPlayer() local pname = getPlayerName(player) triggerServerEvent("lex_onUserRegister", player, pname, guiGetText(reg.editPass)) endend function onCRStart() outputChatBox("Client resource start") userRegister() unbindKey("1", 'down') bindKey("1", 'down', toggleReg)end function toggleReg() if(guiGetVisible(wndReg) == true) then showCursor(false) guiSetVisible(wndReg, false) else showCursor(true) guiSetVisible(wndReg, true) endend addEventHandler( "onClientResourceStart", getResourceRootElement(getThisResource()), onCRStart) Alexander de jong
  18. Why? If you want a server, you learn lua at your self. It isn't that difficult. And i know nobody will even think about to make this for 1 man, if somebody will do it its for money, or he will release it for free here at the forums.
  19. Why? If you want a server, you learn lua at your self. It isn't that difficult. And i know nobody will even think about to make this for 1 man, if somebody will do it its for money, or he will release it for free here at the forums.
  20. Hello, Maybe an idea to let the users play a custom mp3 file what the server owner has added to the server, like: musicPlay("JohnnyCash - folsom prison.mp3") [/code] And maybe more of it. Alexander
  21. Hello, Maybe an idea to let the users play a custom mp3 file what the server owner has added to the server, like: musicPlay("JohnnyCash - folsom prison.mp3") [/code] And maybe more of it. Alexander
  22. Oke, Thus for example: <language name="en"> <text name="scrWelcom">Text in here</text> <text name="scrWeapon">Weapon text in here</text> </language> Something like that? And how to load in to lua (client script)
  23. Oke, Thus for example: Text in here Weapon text in here Something like that? And how to load in to lua (client script)
×
×
  • Create New...