Jump to content

2013martin1212

Members
  • Posts

    130
  • Joined

  • Last visited

Details

  • Interests
    <a href="http://www.game-state.com/87.229.77.115:29055/"><img src="http://www.game-state.com/87.229.77.115:29055/560x95_FFFFFF_FF9900_000000_000000.png" alt="www.Game-State.com" style="border-style: none;" /></a>

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

2013martin1212's Achievements

Poot-butt

Poot-butt (14/54)

0

Reputation

  1. Rataj i get that gui part but i dont want to a simple spawn system in here only shows and spawn those cars which was buyed from the player
  2. Hello all and happy xmas . Someone can explain me how i can make a car spawner in panel with mysql database like example if the player buy a car in the carshop the car was show in the panel and he can spawn and despawn i dont want to anyone to make me the script all i need is the examples or which programmer words need it of it and i try to create thanks all to help
  3. I want to create a mysql based fun szerver with lots of job system and event and etc if anyone thinks can help me Contact me at : https://www.facebook.com/Core3SystemYoutube/
  4. Hello all i have an opensource mta dayz script and try to edit to if the player was click on the car then open the car inventory and not if the player move closer to the car someone can help me where i can find this and how can be edit or just what i need to looking for and which functions i need to use
  5. local handler = dbConnect( "mysql", "dbname=mtalogin;host=localhost", "root", "", "share=1" ) if handler then outputChatBox("sikeres csatlakozas") end function loginReguest( thePlayer, username, password ) if thePlayer and username and password then if getElementType(thePlayer) == "player" then -- account data -- local account = dbQuery(handler, "SELECT * FROM users WHERE username='" .. username .. "'") if account then local data = dbPoll( account, -1 ) for i, sor in ipairs(data) do if sor["password"] == password then outputChatBox("a") -- character data -- local character = dbQuery(handler, "SELECT * FROM characters WHERE accountname = ?", username "'") setElementData(thePlayer, "acc:adminLevel", sor["adminLevel"]) if character then local adatok = dbPoll(character, -1) for i, sor in ipairs(adatok) do setElementData(thePlayer, "acc:username", username) --spawnPlayer(source, sor["posX"], sor["poY"], sor["poZ"]) spawnPlayer (thePlayer, 0, 0, 5, 0, math.random (0,288), 0, 0) -- spawns player with random skin end end end end end end end end addEvent("logIn", true) addEventHandler("logIn", getRootElement(), loginReguest) 3rd day i try to figure out how i can make a login with mysql perfect but alway got an error please someone push me true this process
  6. i am new in this part i just try to get the player login data from mysql and let them login but i am lost without no tutorial to how :*(
  7. 2013martin1212

    help

    function loginReguest(player,username,password) local account exports.mysql:_Query("SELECT 'users' WHERE username = " .. username) if (account) then local account = accounts[1] -- local password == accounts["password"] then outputChatBox("Succesfully logged In!") spawnPlayer(player,accounts["posX"],accounts["posY"],accounts["posZ"],accounts["pRot"],accounts["pSkin"],accounts["pInt"],accounts["pDim"]) else outputChatBox("Username or Password is wrong!") end end end triggerClientEvent(player,"showHide", getRootElement() ) end addEvent("logIn",false) addEventHandler("logIn",getRootElement(), loginReguest) I try to figure out the mysql but i dont now i am on the right track ??
  8. nice script but i get confused my script is diffrent and i am new scripter but i really want to learn and learn to be a pro programer can you help me ?? dont say it mta wiki because i try it but i dont no which goes which :*( I need a teacher
  9. i try to update and set player data from the database but i get confused function loginReguest(player,username,password) local check = exports.mysql:_QuerySingle("SELECT * FROM users WHERE username = ? " ,username) if check then local checkPass = check.password if (checkPass == password) then logIn(player,getAccount(username),getAccount(password)) triggerClientEvent(player,"showHide", getRootElement()) outputDebugString("User Logged In") end end end addEvent("logIn",true) addEventHandler("logIn",getRootElement(), loginReguest) i dont no how i can be get the data from mysql and spawnPlayer please someone give me some information
  10. 2013martin1212

    Help

    Hello i just have a question how i can be get the data from mysql like posX posY etc unction loginReguest(player,username,password) local check = exports.mysql:_QuerySingle("SELECT * FROM users WHERE username = ? " ,username) if check then local checkPass = check.password if (checkPass == password) then logIn(player,getAccount(username),getAccount(password)) triggerClientEvent(player,"showHide", getRootElement()) outputDebugString("User Logged In") end end end addEvent("logIn",true) addEventHandler("logIn",getRootElement(), loginReguest) but my character data is in the different table i want to get the player namemoney and the position but i cant figure out how i cant find any mysql tutorials for this. pls help
  11. triggered serverside event logIn but event not added to server side
  12. i change all my login data but the debug says i dont add ther serverside event to server side cant trigger there is my img : my server side : local mysql = exports.mysql addEvent("logIn", true) function logThePlayer(thePlayer,username,password) if thePlayer and username and password then if getElementType(thePlayer) == "player" then local account = mysql:db_Query("SELECT FROM users WHERE username'" .. username .."'") for i, sor in ipairs(account) do is sor["password"] == password then mysql:db_Exec("UPDATE users SET serial='" .. getPlayerSerial(thePlayer) .. "' WHERE username='" .. username .. "'") mysql:db_Exec("UPDATE users SET ip='" .. getPlayerIP(thePlayer) .. "' WHERE username='" .. username .. "'") local character = mysql:db_Query("SELECT * FROM characters WHERE accountname ='" .. username .. "'") if character then outputDebugString("Sikeressen talaltam charactert") for i, sor in ipairs(character) do setElementData(thePlayer, "acc:username", username) setPlayerMoney(thePlayer, sor["money"]) spawnPlayer(thePlayer,sor["posX"], sor["posY"],sor["posZ"], sor["pRot"], sor["pSkin"], sor["pInt"], sor["pDim"])) setPlayerName(thePlayer, sor["charactername"]) setCameraTarget(thePlayer, thePlayer) triggerClientEvent(thePlayer, "showHide", getRootElement()) outputChatBox("elvileg jo :D") end end else -- triggerClientEvent(thePlayer, "charactervalaszto", getRootElement()) triggerClientEvent(thePlayer, "showHide", getRootElement()) end end end end end end addEventHandler("logIn", getRootElement(), logThePlayer) my client side: fadeCamera(true) setCameraMatrix( 1468.8785400391, -919.25317382813, 100.153465271, 1468.388671875, -918.42474365234, 99.881813049316) GUIEditor = { tab = {}, tabpanel = {}, edit = {}, button = {}, window = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(411, 200, 438, 337, "Login Panel by Martin", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.tabpanel[1] = guiCreateTabPanel(14, 62, 404, 258, false, GUIEditor.window[1]) GUIEditor.tab[1] = guiCreateTab("Login", GUIEditor.tabpanel[1]) GUIEditor.edit[1] = guiCreateEdit(122, 49, 194, 40, "", false, GUIEditor.tab[1]) GUIEditor.edit[2] = guiCreateEdit(122, 123, 194, 40, "", false, GUIEditor.tab[1]) GUIEditor.button[1] = guiCreateButton(122, 170, 194, 40, "Login", false,GUIEditor.tab[1]) GUIEditor.tab[2] = guiCreateTab("Register", GUIEditor.tabpanel[1]) GUIEditor.edit[3] = guiCreateEdit(122, 49, 194, 40, "x", false, GUIEditor.tab[2]) GUIEditor.edit[4] = guiCreateEdit(122, 123, 194, 40, "y", false, GUIEditor.tab[2]) GUIEditor.button[2] = guiCreateButton(122, 170, 194, 40, "Register", false, GUIEditor.tab[2] ) end ) addEvent("showHide",true) function showHide() if guiGetVisible(GUIEditor.window[1]) == true then guiSetVisible(GUIEditor.window[1],false) showCursor(false) elseif guiGetVisible(GUIEditor.window[1]) == false then guiSetVisible(GUIEditor.window[1],true) showCursor(true) end end addEventHandler("showHide", getLocalPlayer(),showHide) showHide() function buttonClick() if source == GUIEditor.button[2] then local username = guiGetText(GUIEditor.edit[3]) local password = guiGetText(GUIEditor.edit[4]) triggerServerEvent("registerRequest",getLocalPlayer(),getLocalPlayer(),username,password) elseif source == GUIEditor.button[1] then local username = guiGetText(GUIEditor.edit[1]) local password = guiGetText(GUIEditor.edit[2]) triggerServerEvent("logIn",getLocalPlayer(),getLocalPlayer(),username,password) end end addEventHandler("onClientGUIClick",root,buttonClick)
  13. i no not the best scripter i am but if works then works
×
×
  • Create New...