Login/register wird nicht geladen

Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

  • Login/register wird nicht geladen

    Hey com, ich wollte heute mal das galaxy-rl scritp von @Episodes: testen, jedoch bekamm ich unzählige fehler meldungen, die meisten waren unnötig, da diese nichts mit meinem Problem zu tun haben, nähmlich erscheint das register fenster nicht, ob das login auch betroffen ist weis ich nicht, da ich mich halt nicht registrieren kann, Ich hoffe mir kann einer helfen, ich werde einmal denn kompletten log, die teile aus dem log die wichtig sein könnten und die jeweilen script zeilen hierrein posten.



    Kompletter Log:
    Spoiler anzeigen
    [8;1H [9;1H [10;1H [11;1H [12;1H [13;1H [14;1H [15;1H [16;1H [17;1H [18;1H [19;1H [20;1H [21;1H [22;1H [23;1H [24;1H [[email protected][30m[42m [H[23B [[email protected] [H[m[39;49m[37m[40mMTA:BLUE Server for MTA:SA
    [23B [[email protected]
    [Hl 'mysql_query' (a nil value)
    [1B[17:30:07] ERROR: Galaxy-RL/register_login/loggedin_mysql.lua:23: attempt to cal[3;1Hl global 'mysql_vio_query' (a nil value)
    [1B[17:30:07] ERROR: Galaxy-RL/register_login/loggedin_mysql.lua:23: attempt to cal[5;1Hl global 'mysql_vio_query' (a nil value)
    [1B[17:30:07] ERROR: Galaxy-RL/fraktionen/gangareas.lua:55: attempt to call global
    [1B'mysql_query' (a nil value)
    [1B[17:30:07] ERROR: Galaxy-RL/fraktionen/fdepots.lua:23: attempt to call global 'M[9;1HySQL_GetString' (a nil value)
    [1B[17:30:07] ERROR: Galaxy-RL/fraktionen/aztecas/aztecas_settings.lua:5: attempt t[11;1Ho call global 'MySQL_GetString' (a nil value)
    [1B[17:30:07] ERROR: Galaxy-RL/fraktionen/mafia/mafiasettings.lua:5: attempt to cal[13;1Hl global 'MySQL_GetString' (a nil value)
    [1B[17:30:07] ERROR: Galaxy-RL/fraktionen/triaden/triaden_settings.lua:5: attempt t[15;1Ho call global 'MySQL_GetString' (a nil value)
    [1B[17:30:07] ERROR: Galaxy-RL/internet/email_server.lua:3: attempt to call global
    [1B'mysql_query' (a nil value)
    [1B[17:30:08] Server minclientversion is now 1.3.5-9.06362
    [1B[17:30:08] Querying MTA master server... success! (Auto detected IP:----------[20;1H)[1B[17:30:08] Server started and is ready to accept connections!
    [1B[17:30:08] To stop the server, type 'shutdown' or press Ctrl-C
    [1B[17:30:08] Type 'help' for a list of commands.
    [1B[30m[42m [[email protected]
    [m[39;49m[37m[40m [[email protected]
    [H[2M[23B [[email protected][30m[42m
    M[m[39;49m[37m[40m [22;1H[17:30:08] ERROR: Galaxy-RL/biz/biz.lua:38: attempt to call global 'MySQL_GetStr[23;1Hing' (a nil value)
    [1B[30m[42m [[email protected]
    [m[39;49m[37m[40m [[email protected]
    [H[2M[23B [[email protected][30m[42m
    M[m[39;49m[37m[40m [22;1H[17:30:11] ERROR: Galaxy-RL/carsys/carsys_mysql.lua:9: attempt to call global 'm[23;1Hysql_query' (a nil value)
    [1B[30m[42m [[email protected]
    [m[39;49m[37m[40m [[email protected]
    [H[2M[23B [[email protected][30m[42m
    M[m[39;49m[37m[40m [22;1H[17:30:11] ERROR: Galaxy-RL/carsys/carsys_mysql.lua:9: attempt to call global 'm[23;1Hysql_query' (a nil value)
    [1B[30m[42m [[email protected]
    [m[39;49m[37m[40m [[email protected]
    [H[2M[23B [[email protected][30m[42m
    M[m[39;49m[37m[40m [22;1H[17:30:12] ERROR: Galaxy-RL/housesys/houses_mysql.lua:8: attempt to call global
    [1B'mysql_query' (a nil value)
    [1B[30m[42m [[email protected]
    [m[39;49m[37m[40m [[email protected]
    [H[2M[23B [[email protected][30m[42m
    M[m[39;49m[37m[40m [22;1H[17:30:12] ERROR: Galaxy-RL/minigames/tetris/tetris_server.lua:23: attempt to ca[23;1Hll global 'mysql_query' (a nil value)
    [1B[30m[42m [[email protected]
    [m[39;49m[37m[40m [[email protected]
    [[email protected][30m[42m
    M[m[39;49m[37m[40m[17:30:36] INFO: Fraktionsfahrzeuge gepanzert
    [1B[30m[42m [[email protected]
    [m[39;49m[37m[40m [[email protected]
    [H[2M[23B [[email protected][30m[42m
    M[m[39;49m[37m[40m [22;1H[17:31:06] ERROR: Galaxy-RL/fraktionen/fdepots.lua:23: attempt to call global 'M[23;1HySQL_GetString' (a nil value)
    [1B[30m[42m [[email protected]
    [m[39;49m[37m[40m [[email protected]
    [H[2M[23B [[email protected][30m[42m
    M[m[39;49m[37m[40m [22;1H[17:31:48] CONNECT: warnkeTV failed to connect (Wrong password) (IP: --------[23;1H15 Serial: ---------------------------------- Version: 1.3.5-9.06250.6)
    [1B[30m[42m [[email protected]
    [m[39;49m[37m[40m [[email protected]
    [H[4M[23B [[email protected][30m[42m
    M[m[39;49m[37m[40m [22;1H [21;1H [20;1H[17:32:32] CONNECT: warnkeTV failed to connect (Client version is below minimum)[21;2H(IP: ---------- Serial: -------------------------------- Version: 1.3.5-9.[22;1H06250.6)
    [1B[17:32:32] QUIT: warnkeTV left the game [Quit]
    [1B[30m[42m [[email protected]
    [m[39;49m[37m[40m [[email protected]
    [H[2M[23B [[email protected][30m[42m
    M[m[39;49m[37m[40m [22;1H[17:33:15] CONNECT: warnkeTV failed to connect (Wrong password) (IP:---------------[23;1H15 Serial: --------------------------------------------- Version: 1.3.5-9.06362.0)
    [1B[30m[42m [[email protected]
    [m[39;49m[37m[40m [[email protected]
    [H[4M[23B [[email protected][30m[42m
    M[m[39;49m[37m[40m [22;1H [21;1H [20;1H[17:33:19] ERROR: Galaxy-RL/register_login/register_login_server.lua:17: attempt[21;2Hto call global 'MySQL_Save' (a nil value)
    [1B[17:33:19] CONNECT: warnkeTV connected (IP: 78.49.105.215 Serial: 20FA8C6E60EAD[23;1HCBBB56EAFB07060C971 Version: 1.3.5-9.06362.0)
    [1B[30m[42m [[email protected]
    [m[39;49m[37m[40m [[email protected]
    [[email protected][30m[42m
    M[m[39;49m[37m[40m[17:33:22] JOIN: warnkeTV joined the game (IP: 78.49.105.215)
    [1B[30m[42m [[email protected]
    [m[39;49m[37m[40m [[email protected]
    [[email protected][30m[42m
    M[m[39;49m[37m[40m[17:34:47] DIAGNOSTIC: warnkeTV #1000 Invalid file (Galaxy-RL) c_black.png
    [1B[30m[42m [[email protected]
    [m[39;49m[37m[40m [[email protected]
    [H[2M[23B [[email protected][30m[42m
    M[m[39;49m[37m[40m [22;1H[17:34:47] ERROR: Galaxy-RL/register_login/register_login_server.lua:122: attemp[23;1Ht to call global 'isRegistered' (a nil value)
    [1B[30m[42m [[email protected]
    [m[39;49m[37m[40m [[email protected]
    [H[5M[23B [[email protected][30m[42m
    M[m[39;49m[37m[40m [22;1H [21;1H [20;1H [19;1H[17:47:41] QUIT: warnkeTV left the game [Quit]
    [1B[17:47:41] ERROR: Galaxy-RL/jobs/Bus/bus_vehicles.lua:239: attempt to compare nu[21;1Hmber with boolean
    [1B[17:47:41] ERROR: Galaxy-RL/register_login/loggedin_mysql.lua:18: attempt to cal[23;1Hl global 'mysql_vio_query' (a nil value)



    Wichtige Logs:
    Spoiler anzeigen
    [1B[17:30:07] ERROR: Galaxy-RL/register_login/loggedin_mysql.lua:23: attempt to cal[3;1Hl global 'mysql_vio_query' (a nil value)
    [1B[17:30:07] ERROR: Galaxy-RL/register_login/loggedin_mysql.lua:23: attempt to cal[5;1Hl global 'mysql_vio_query' (a nil value)
    M[m[39;49m[37m[40m [22;1H [21;1H [20;1H[17:33:19] ERROR: Galaxy-RL/register_login/register_login_server.lua:17: attempt[21;2Hto call global 'MySQL_Save' (a nil value)
    M[m[39;49m[37m[40m [22;1H[17:34:47] ERROR: Galaxy-RL/register_login/register_login_server.lua:122: attemp[23;1Ht to call global 'isRegistered' (a nil value)
    [1B[17:47:41] ERROR: Galaxy-RL/register_login/loggedin_mysql.lua:18: attempt to cal[23;1Hl global 'mysql_vio_query' (a nil value)



    Logedin_mysql.lua

    LUA-Quellcode

    1. function insertPlayerIntoLoggedIn ( name, ip, serial )
    2. local result = mysql_query(handler, "INSERT INTO loggedin (Name,Serial,IP) VALUES ('"..name.."','"..serial.."','"..ip.."')") if( not result) then outputDebugString("Error executing the query: (" .. mysql_errno(handler) .. ") " .. mysql_error(handler)) else mysql_free_result(result) endend
    3. function setPlayerLoggedIn ( name )
    4. mysql_vio_query ( "UPDATE loggedin SET Loggedin = '1' WHERE Name LIKE '"..name.."'" )end
    5. function removePlayerFromLoggedIn ( name )
    6. mysql_vio_query ( "DELETE FROM loggedin WHERE Name LIKE '"..name.."'" )end
    7. function deleteAllFromLoggedIn ()
    8. mysql_vio_query ( "TRUNCATE TABLE loggedin" )enddeleteAllFromLoggedIn ()




    register_login_server.lua

    Quellcode

    1. _G["Clantag"] = "no"
    2. clanMembers = {}ticketPermitted = {}
    3. local vals = {} vals[1] = "Water" vals[2] = "Bloom" vals[3] = "Carpaint" vals[4] = "Roadshine"
    4. function banCheck ( nick, ip, uname, serial )
    5. bool = false connectCanceled = false local i, j = string.find ( nick, "mtasa" ) if nick ~= MySQL_Save ( nick ) then cancelEvent ( true, "Dein Nickname enthaelt unnoetige Zeichen" ) connectCanceled = true elseif nick == "Player" then cancelEvent ( true, "Bitte waehle einen Nickname ( Unter "Settings" )" ) connectCanceled = true elseif i and j then cancelEvent ( true, "Fuck you!" ) connectCanceled = true else local bantime = tonumber ( MySQL_GetString ( "ban", "STime", "Name LIKE '"..nick.."'" ) ) if bantime then bool = not ( bantime == 0 ) end if bool and bantime then if ( bantime - getTBanSecTime ( 0 ) ) < 0 then MySQL_DelRow ( "ban", "Name LIKE '"..nick.."'") elseif bantime > 0 then local reason = MySQL_GetString ( "ban", "Grund", "Name LIKE '"..nick.."'" ) local admin = MySQL_GetString ( "ban", "Admin", "Name LIKE '"..nick.."'" ) local diff = math.floor ( ( ( bantime - getTBanSecTime ( 0 ) ) / 60 ) * 100 ) / 100 cancelEvent ( true, "Du bist noch "..diff.." Stunden von "..admin.." gesperrt, Grund: "..reason ) connectCanceled = true end else -- IP-Ban deaktiviert -- local ipBanned = false--MySQL_GetString ( "ban", "Grund", "IP LIKE '" ..ip.."'" ) -- IP-Ban deaktiviert -- local ip1 = tostring ( gettok ( ip, 1, string.byte('.') ) ) local ip2 = tostring ( gettok ( ip, 2, string.byte('.') ) ) local ipRangeBanned = MySQL_GetString ( "ban", "Grund", "IP LIKE '"..ip1.."."..ip2..".*.*'" ) local nickBanned = MySQL_GetString("ban", "Name", "Name LIKE '" ..nick.."'" ) if ipBanned then local reason = MySQL_GetString ( "ban", "Grund", "IP LIKE '" ..ip.."'" ) local admin = MySQL_GetString ( "ban", "Admin", "IP LIKE '" ..ip.."'" ) cancelEvent ( true, "Du bist von "..admin.." gebannt worden! Grund: "..reason..", bei Fragen wende dich bitte an das Forum!" ) connectCanceled = true elseif ipRangeBanned then cancelEvent ( true, "#409: Bad socket!" ) elseif nickBanned then local reason = MySQL_GetString ( "ban", "Grund", "Name LIKE '" ..nick.."'" ) local admin = MySQL_GetString ( "ban", "Admin", "Name LIKE '" ..nick.."'" ) cancelEvent ( true, "Du bist von "..admin.." gebannt worden! Grund: "..reason..", bei Fragen wende dich bitte an das Forum!" ) connectCanceled = true elseif getPlayerWarnCount ( nick ) >= 3 then cancelEvent ( true, "Du hast 3 Warns! Ablaufdatum des nächsten Warns: "..getLowestWarnExtensionTime ( nick ) ) connectCanceled = true else local serialBanned = MySQL_GetString ( "ban", "Grund", "Serial LIKE '%"..serial.."%'" ) if serialBanned then local reason = MySQL_GetString ( "ban", "Grund", "Serial LIKE '"..serial.."'" ) local admin = MySQL_GetString ( "ban", "Admin", "Serial LIKE '"..serial.."'" ) cancelEvent ( true, "Du bist von "..admin.." gebannt worden! Grund: "..reason..", bei Fragen wende dich bitte an das Forum!" ) connectCanceled = true end end end end if not connectCanceled then insertPlayerIntoLoggedIn ( nick, ip, serial ) endendaddEventHandler ( "onPlayerConnect", getRootElement(), banCheck )
    6. function saltPassword ( pname, string )
    7. local salt = MySQL_GetString("players", "Salt", "Name LIKE '" ..MySQL_Save(pname).."'") return string..saltend
    8. function generateNewSalt () local runs = 1 while true and runs <= 10 do runs = runs + 1 salt = "" for i = 1, 20 do salt = salt .. string.char ( math.random(1,128) ) end if salt == MySQL_Save ( salt ) then break end end return saltend
    9. function regcheck_func ( player )
    10. setPedStat ( player, 22, 50 ) vioSetElementData ( player, "loggedin", 0 ) vioSetElementData ( player, "pwfailed", 0 ) pname = getPlayerName ( player ) toggleAllControls ( player, false ) if player == client then if isSerialValid ( getPlayerSerial(player) ) or isRegistered ( pname ) then if hasInvalidChar ( player ) and not isRegistered ( pname ) then kickPlayer ( player, "Dein Name enthaelt ungueltige Zeichen!" ) else if pname ~= "player" then if isRegistered ( pname ) then triggerClientEvent ( player, "ShowLoginWindow", getRootElement() ) else local clantag = gettok ( pname, 1, string.byte(']') ) if testmode == true then triggerClientEvent ( player, "ShowRegisterGui", getRootElement() ) else if string.lower ( clantag ) == "[vio" and not isThisTheBetaServer () then outputChatBox ("Du bist kein Mitglied des Clans!", player, 255, 0, 0 ) elseif #pname < 3 or #pname > 20 then kickPlayer ( player, "Bitte mindestens 3 und maximal 20 Zeichen als Nickname!" ) elseif hasInvalidChar ( player ) then kickPlayer ( player, "Bitte nimm einen Nickname ohne ueberfluessige Zeichen!" ) else triggerClientEvent ( player, "ShowRegisterGui", getRootElement() ) end end end else kickPlayer ( player, "Bitte aendere deinen Nickname!" ) end end else kickPlayer ( player, "Dein MTA verwendet einen ungueltigen Serial. Bitte neu installieren!" ) end endendaddEvent ( "regcheck", true )addEventHandler ("regcheck", getRootElement(), regcheck_func )
    11. function getIDByName ( pname )
    12. return tonumber ( MySQL_GetString ( "players", "id", "Name LIKE '"..pname.."'" ) )end
    13. function register_func ( player, passwort, bday, bmon, byear, geschlecht )
    14. if player == client then local pname = MySQL_Save ( getPlayerName ( player ) ) if passwort == MySQL_Save ( passwort ) then passwort = MySQL_Save ( passwort ) bday = MySQL_Save ( bday ) bmon = MySQL_Save ( bmon ) byear = MySQL_Save ( byear ) geschlecht = MySQL_Save ( geschlecht ) if vioGetElementData ( player, "loggedin" ) == 0 and not isRegistered ( pname ) and player == client then setPlayerLoggedIn ( pname ) mysql_vio_query ( "DELETE FROM achievments WHERE Name = '"..pname.."'" ) mysql_vio_query ( "DELETE FROM bonustable WHERE Name = '"..pname.."'" ) mysql_vio_query ( "DELETE FROM inventar WHERE Name = '"..pname.."'" ) mysql_vio_query ( "DELETE FROM packages WHERE Name = '"..pname.."'" ) mysql_vio_query ( "DELETE FROM players WHERE Name = '"..pname.."'" ) mysql_vio_query ( "DELETE FROM skills WHERE Name = '"..pname.."'" ) mysql_vio_query ( "DELETE FROM userdata WHERE Name = '"..pname.."'" ) toggleAllControls ( player, true ) vioSetElementData ( player, "loggedin", 1 )
    15. triggerClientEvent ( source, "DisableRegisterGui", getRootElement() )
    16. local ip = getPlayerIP ( player ) if geschlecht == nil then geschlecht = 1 end local regtime = getRealTime() local year = regtime.year + 1900 local month = regtime.month local day = regtime.monthday local hour = regtime.hour local minute = regtime.minute local registerdatum = tostring(day.."."..month.."."..year..", "..hour..":"..minute) local lastlogin = registerdatum local salt = generateNewSalt () vioSetElementData ( player, "salt", salt ) local passwort = md5 ( passwort .. salt ) local lastLoginInt = getSecTime ( 0 ) local id = MySQL_GetString ( "idcounter", "id", "id = id" ) mysql_vio_query ( "UPDATE idcounter SET id = id + 1" ) local result = mysql_query(handler, "INSERT INTO players ( id, Name, Serial, IP, Last_login, Geburtsdatum_Tag, Geburtsdatum_Monat, Geburtsdatum_Jahr, Passwort, Geschlecht, RegisterDatum, Salt, LastLogin) VALUES ( '"..id.."', '"..pname.."', '"..getPlayerSerial(player).."', '"..getPlayerIP ( player ).."', '"..lastlogin.."', "..tonumber ( bday)..", "..tonumber ( bmon)..", "..tonumber ( byear)..", '"..passwort.."', '"..geschlecht.."', '"..registerdatum.."', '"..salt.."', '"..lastLoginInt.."' )") if( not result) then outputDebugString("Error executing the query: (" .. mysql_errno(handler) .. ") " .. mysql_error(handler)) else mysql_free_result(result) triggerClientEvent ( player, "infobox_start", getRootElement(), "Du hast dich\nerfolgreich registriert!\n\nDeine Daten werden\nnun gespeichert!", 7500, 0, 255, 0 ) end local result = mysql_query(handler, "INSERT INTO achievments (Name) VALUES ('"..pname.."')") if( not result) then outputDebugString("Error executing the query: (" .. mysql_errno(handler) .. ") " .. mysql_error(handler)) else mysql_free_result(result) end local result = mysql_query(handler, "INSERT INTO inventar (Name) VALUES ('"..pname.."')") if( not result) then outputDebugString("Error executing the query: (" .. mysql_errno(handler) .. ") " .. mysql_error(handler)) else mysql_free_result(result) end local result = mysql_query(handler, "INSERT INTO packages (Name, Paket1, Paket2, Paket3, Paket4, Paket5, Paket6, Paket7, Paket8, Paket9, Paket10, Paket11, Paket12, Paket13, Paket14, Paket15, Paket16, Paket17, Paket18, Paket19, Paket20, Paket21, Paket22, Paket23, Paket24, Paket25) VALUES ('"..pname.."','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0' )") if( not result) then outputDebugString("Error executing the query: (" .. mysql_errno(handler) .. ") " .. mysql_error(handler)) else mysql_free_result(result) end local result = mysql_query(handler, "INSERT INTO bonustable (Name, Lungenvolumen, Muskeln, Kondition, Boxen, KungFu, Streetfighting, CurStyle, PistolenSkill, DeagleSkill, ShotgunSkill, AssaultSkill) VALUES ('"..pname.."', 'none', 'none', 'none', 'none', 'none', 'none', '4', 'none', 'none', 'none', 'none' )") if( not result) then outputDebugString("Error executing the query: (" .. mysql_errno(handler) .. ") " .. mysql_error(handler)) else mysql_free_result(result) end mysql_vio_query ( "INSERT INTO skills ( id, Name ) VALUES ( '"..getIDByName ( pname ).."', '"..pname.."' )" ) local Geld = 1000 vioSetElementData ( player, "money", Geld ) givePlayerMoney ( player, Geld ) vioSetElementData ( player, "busroute", 0 ) local Punkte = 0 vioSetElementData ( player, "points", Punkte ) local Paeckchen = "90000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" vioSetElementData ( player, "packages", Paeckchen ) local Spawnpos_X = -2765.2856445313 vioSetElementData ( player, "spawnpos_x", Spawnpos_X ) local Spawnpos_Y = 375.80902099609 vioSetElementData ( player, "spawnpos_y", Spawnpos_Y ) local Spawnpos_Z = 6.3438243865967 vioSetElementData ( player, "spawnpos_z", Spawnpos_Z ) local Spawnrot_X = 52.94 vioSetElementData ( player, "spawnrot_x", Spawnrot_X ) local SpawnInterior = 0 vioSetElementData ( player, "spawnint", SpawnInterior ) local SpawnDimension = 0 vioSetElementData ( player, "spawndim", SpawnDimension ) local Fraktion = 0 vioSetElementData ( player, "fraktion", Fraktion ) local FraktionsRang = 0 vioSetElementData ( player, "rang", FraktionsRang ) local Adminlevel = 0 vioSetElementData ( player, "adminlvl", Adminlevel ) local Spielzeit = 0 vioSetElementData ( player, "playingtime", Spielzeit ) local CurrentCars = 0 vioSetElementData ( player, "curcars", CurrentCars ) local Maximumcars = 3 vioSetElementData ( player, "maxcars", Maximumcars ) local Carslot1 = 0 vioSetElementData ( player, "carslot1", Carslot1 ) local Carslot2 = 0 vioSetElementData ( player, "carslot2", Carslot2 ) local Carslot3 = 0 vioSetElementData ( player, "carslot3", Carslot3 ) local Carslot4 = 0 vioSetElementData ( player, "carslot4", Carslot4 ) local Carslot5 = 0 vioSetElementData ( player, "carslot5", Carslot5 ) local Carslot6 = 0 vioSetElementData ( player, "carslot6", Carslot6 ) local Carslot7 = 0 vioSetElementData ( player, "carslot7", Carslot7 ) local Carslot8 = 0 vioSetElementData ( player, "carslot8", Carslot8 ) local Carslot9 = 0 vioSetElementData ( player, "carslot9", Carslot9 ) local Carslot10 = 0 vioSetElementData ( player, "carslot10", Carslot10 ) local Tode = 0 vioSetElementData ( player, "deaths", Tode ) local Kills = 0 vioSetElementData ( player, "kills", Kills ) local Knastzeit = 0 vioSetElementData ( player, "jailtime", Knastzeit ) local Alkazeit = 0 vioSetElementData ( player, "prisontime", Alkazeit ) local Hoellenzeit = 0 vioSetElementData ( player, "helltime", Hoellenzeit ) local Himmelszeit = 0 vioSetElementData ( player, "heaventime", Himmelszeit ) local Hausschluessel = 0 vioSetElementData ( player, "housekey", 0 ) local Bizschluessel = 0 vioSetElementData ( player, "bizkey", Bizschluessel ) local Bankgeld = 9000 vioSetElementData ( player, "bankmoney", Bankgeld ) local Drogen = 0 vioSetElementData ( player, "drugs", Drogen ) if geschlecht == 1 then local rnd = math.random ( 1, 1 ) Skinid = femalehomeless[rnd] vioSetElementData ( player, "skinid", Skinid ) else local rnd = math.random ( 1, 5 ) Skinid = malehomeless[rnd] vioSetElementData ( player, "skinid", Skinid ) end local Autofuehrerschein = 0 vioSetElementData ( player, "carlicense", Autofuehrerschein ) local Motorradtfuehrerschein = 0 vioSetElementData ( player, "bikelicense", Motorradtfuehrerschein ) local LKWfuehrerschein = 0 vioSetElementData ( player, "lkwlicense", LKWfuehrerschein ) local Helikopterfuehrerschein = 0 vioSetElementData ( player, "helilicense", Helikopterfuehrerschein ) local FlugscheinKlasseA = 0 vioSetElementData ( player, "planelicensea", FlugscheinKlasseA ) local FlugscheinKlasseB = 0 vioSetElementData ( player, "planelicenseb", FlugscheinKlasseB ) local Motorbootschein = 0 vioSetElementData ( player, "motorbootlicense", Motorbootschein ) local Segelschein = 0 vioSetElementData ( player, "segellicense", Segelschein) local Angelschein = 0 vioSetElementData ( player, "fishinglicense", Angelschein) local Wanteds = 0 vioSetElementData ( player, "wanteds", Wanteds ) local StvoPunkte = 0 vioSetElementData ( player, "stvo_punkte", StvoPunkte ) local Waffenschein = 0 vioSetElementData ( player, "gunlicense", Waffenschein ) local Perso = 0 vioSetElementData ( player, "perso", Perso ) local IncomePayday = 0 vioSetElementData ( player, "incomepayday", IncomePayday ) local Boni = 1000 vioSetElementData ( player, "boni", Boni ) local PdayIncome = 0 vioSetElementData ( player, "pdayincome", PdayIncome ) local PdayKosten = 0 vioSetElementData ( player, "pdaykosten", PdayKosten ) run = 1 while true do if run >= 20 then break else run = run + 1 end local tnr = math.random ( 100, 9999999 ) local result = MySQL_GetString( "userdata", "Telefonnr", "Telefonnr LIKE '"..tnr.."'" ) if not result then if tonumber ( tnr ) ~= 911 and tonumber ( tnr ) ~= 333 and tonumber ( tnr ) ~= 400 and tonumber (tnr ) ~= 666666 then Telefonnr = tnr break end end end if Telefonnr == nil then Telefonnr = math.random ( 100, 9999999 ) end vioSetElementData ( player, "telenr", Telefonnr ) local Warns = 0 vioSetElementData ( player, "warns", Warns ) local GunboxA = "0|0" vioSetElementData ( player, "gunboxa", GunboxA ) local GunboxB = "0|0" vioSetElementData ( player, "gunboxb", GunboxB ) local GunboxC = "0|0" vioSetElementData ( player, "gunboxc", GunboxC ) local Job = "none" vioSetElementData ( player, "job", Job ) local Jobtime = 0 vioSetElementData ( player, "jobtime", Jobtime ) local Club = "none" vioSetElementData ( player, "club", Club ) local FavChannel = 0 vioSetElementData ( player, "favchannel", FavChannel ) local BonusPunkte = 0 vioSetElementData ( player, "bonuspoints", BonusPunkte ) local Truckerskill = 1 vioSetElementData ( player, "truckerlvl", Truckerskill ) local Airportskill = 1 vioSetElementData ( player, "airportlvl", Airportskill ) local farmerLVL = 0 vioSetElementData ( player, "farmerLVL", farmerLVL ) local Contract = 0 vioSetElementData ( player, "contract", Contract ) local socialState = "Neu auf Galaxy-RL" vioSetElementData ( player, "socialState", socialState ) local streetCleanPoints = 0 vioSetElementData ( player, "streetCleanPoints", streetCleanPoints ) vioSetElementData ( player, "handyType", 1 ) vioSetElementData ( player, "handyCosts", 0 ) _G[pname.."paydaytime"] = setTimer ( playingtime, 60000, 1, player ) vioSetElementData ( player, "loggedin", 1 ) vioSetElementData ( player, "muted", 0 ) vioSetElementData ( player, "ElementClicked", false ) vioSetElementData ( player, "curplayingtime", 0 ) vioSetElementData ( player, "housex", 0 ) vioSetElementData ( player, "housey", 0 ) vioSetElementData ( player, "housez", 0 ) vioSetElementData ( player, "house", "none" ) vioSetElementData ( player, "handystate", "on" ) vioSetElementData ( player, "object", 0 ) vioSetElementData ( player, "ammoTyp", 0 ) vioSetElementData ( player, "curAmmoTyp", 0 )
    17. bindKey ( source, "r", "down", reload ) triggerClientEvent ( player, "sec_health_give", getRootElement(), 999 ) spawnPlayer ( player, vioGetElementData ( player, "spawnpos_z" ), vioGetElementData ( player, "spawnpos_y" ), vioGetElementData ( player, "spawnpos_z" ), vioGetElementData ( player, "spawnrot_x" ), vioGetElementData ( player, "spawnint" ), vioGetElementData ( player, "spawndim" ) ) triggerClientEvent ( player, "sec_health_give", getRootElement(), 999 ) isPremium ( player ) --fadeCamera ( player, true ) --setCameraTarget( player, player ) setPlayerWantedLevel ( player, Wanteds ) packageLoad ( player ) achievload ( player ) inventoryload ( player ) elementDataSettings ( player ) bonusLoad ( player ) skillDataLoad ( player )
    18. local result = mysql_query(handler, "INSERT INTO userdata ( Name,Skinid,Telefonnr) VALUES('"..pname.."', '"..vioGetElementData ( player, "skinid" ).."', '"..Telefonnr.."')") if( not result) then outputDebugString("Error executing the query: (" .. mysql_errno(handler) .. ") " .. mysql_error(handler)) else mysql_free_result(result) outputDebugString ("Daten fuer Spieler "..pname.." wurden angelegt!") end outputChatBox ( "Druecke F1, um das Hilfemenue zu oeffnen!", player, 200, 200, 0 ) vioSetElementData ( player, "gameboy", 0 ) loadAddictionsForPlayer ( player ) -- Tutorial -- vioSetElementData ( player, "isInTut", true ) --triggerClientEvent ( player, "setPlayerInTutorial", player ) startintro_func ( player ) triggerEvent ( "onVioPlayerLogin", player ) end else outputChatBox ( "Dein Passwort enthaelt ungueltige Sonderzeichen!", player, 125, 0, 0 ) end endendaddEvent ( "register", true )addEventHandler ( "register", getRootElement(), register_func)
    19. function gameBeginGuiShow_func ( player )
    20. if player == client then vioSetElementData ( player, "isInTut", false ) triggerClientEvent ( player, "showBeginGui", getRootElement() ) showCursor ( player, true ) vioSetElementData ( player, "ElementClicked", true ) toggleAllControls ( player, true ) setElementPosition ( player, -1959.741, 137.917, 27.694 ) setElementInterior ( player, 0 ) bindKey ( source, "ralt", "down", showcurser, source ) bindKey ( source, "m", "down", showcurser, source ) bindKey ( source, "f1", "down", showhmenue, source ) endendaddEvent ( "gameBeginGuiShow", true )addEventHandler ( "gameBeginGuiShow", getRootElement(), gameBeginGuiShow_func)
    21. function login_func ( player, passwort ) if player == client then if vioGetElementData ( player, "loggedin" ) == 0 then local pname = MySQL_Save ( getPlayerName ( player ) ) local passwort = MySQL_Save ( passwort ) local passwort = saltPassword ( pname, passwort ) local result = MySQL_GetString("players", "Passwort", "Name LIKE '" ..pname.."'") if ( not result ) then outputDebugString("Error executing the query: (" .. mysql_errno(handler) .. ") " .. mysql_error(handler)) else if result == md5(passwort) then local clantag = gettok ( pname, 1, string.byte(']') )
    22. if string.lower ( clantag ) == "[".._G["Clantag"] then --or MySQL_ExistAmount ( "ticket_permitted", "name LIKE '"..pname.."'" ) > 0 then if string.lower ( clantag ) == "[".._G["Clantag"] then clanMembers[player] = pname end ticketPermitted[player] = pname outputChatBox ( "Du kannst ankommende Anfragen mit /tickets bearbeiten.", player, 125, 0, 0 ) end if MySQL_DatasetExist ( "ticket_answeres", "name LIKE '"..pname.."'" ) then outputChatBox ( "Du hast eine Antwort auf deine Anfrage erhalten! Tippe /readticket, um sie zu lesen.", player, 0, 200, 0 ) end setPlayerLoggedIn ( pname ) -- Alte Passwörter ohne Salt auf Salt umschreiben -- local salt = MySQL_GetString("players", "Salt", "Name LIKE '" ..MySQL_Save(pname).."'") if salt == "" then salt = generateNewSalt() passwort = md5 ( passwort .. salt ) MySQL_SetString("players", "Salt", salt, "Name LIKE '" ..pname.."'") MySQL_SetString("players", "Passwort", passwort, "Name LIKE '" ..pname.."'") end -- Salt -- vioSetElementData ( player, "salt", salt ) toggleAllControls ( player, true )
    23. vioSetElementData ( player, "loggedin", 1 ) vioSetElementData ( player, "loggedin", 1 ) local logtime = getRealTime() local year = logtime.year + 1900 local month = logtime.month + 1 local day = logtime.monthday local hour = logtime.hour local minute = logtime.minute local lastLoginInt = getSecTime ( 0 ) local lastlogin = tostring(day.."."..month.."."..year..", "..hour..":"..minute) local result = mysql_query ( handler, "SELECT * from userdata WHERE Name LIKE '"..pname.."'" ) if result then if ( mysql_num_rows ( result ) > 0 ) then dsatz = mysql_fetch_assoc ( result ) mysql_free_result ( result ) end end local money = tonumber ( dsatz["Geld"] ) vioSetElementData ( player, "money", money ) if money >= 0 then givePlayerMoney ( player, money ) else takePlayerMoney ( player, money ) end vioSetElementData ( player, "busroute", 0 ) local fraktion = tonumber ( dsatz["Fraktion"] ) vioSetElementData ( player, "fraktion", fraktion ) if fraktion > 0 then fraktionMembers[fraktion][player] = fraktion end local rang = tonumber ( dsatz["FraktionsRang"] ) if rang == 1 then bindKey ( player, "1", "down", tazer_func, player ) end vioSetElementData ( player, "rang", tonumber ( rang ) ) local admnlvl = tonumber ( dsatz["Adminlevel"] ) vioSetElementData ( player, "adminlvl", admnlvl ) if admnlvl >= 1 then adminsIngame[player] = admnlvl end vioSetElementData ( player, "spawnpos_x", dsatz["Spawnpos_X"] ) vioSetElementData ( player, "spawnpos_y", dsatz["Spawnpos_Y"] ) vioSetElementData ( player, "spawnpos_z", tonumber ( dsatz["Spawnpos_Z"] ) ) vioSetElementData ( player, "spawnrot_x", tonumber ( dsatz["Spawnrot_X"] ) ) vioSetElementData ( player, "spawnint", tonumber ( dsatz["SpawnInterior"] ) ) vioSetElementData ( player, "spawndim", tonumber ( dsatz["SpawnDimension"] ) ) vioSetElementData ( player, "playingtime", tonumber ( dsatz["Spielzeit"] ) ) vioSetElementData ( player, "curcars", tonumber ( dsatz["CurrentCars"] ) ) curcars = 0 local offerOnCar = false for i = 1, 10 do carvalue = MySQL_GetString("vehicles", "Special", "Slot LIKE '" ..i.."' AND Besitzer LIKE '"..pname.."'") if carvalue == 2 then vioSetElementData ( player, "yachtImBesitz", true ) end if not carvalue then if MySQL_DatasetExist("buyit", "Hoechstbietender LIKE '"..pname.."' AND Typ LIKE 'Veh'") then carvalue = 3 offerOnCar = true else carvalue = 0 end else if carvalue == 2 then carvalue = 2 else carvalue = 1 end curcars = curcars + 1 end vioSetElementData ( player, "carslot"..i, carvalue ) end vioSetElementData ( player, "curcars", curcars ) vioSetElementData ( player, "deaths", tonumber ( dsatz["Tode"] ) ) vioSetElementData ( player, "kills", tonumber ( dsatz["Kills"] ) ) vioSetElementData ( player, "jailtime", tonumber ( dsatz["Knastzeit"] ) ) vioSetElementData ( player, "heaventime", tonumber ( dsatz["Himmelszeit"] ) ) local Hausschluessel = MySQL_GetString("houses", "ID", "Besitzer LIKE '" ..pname.."'") local key = tonumber ( dsatz["Hausschluessel"] ) if Hausschluessel then vioSetElementData ( player, "housekey", tonumber ( Hausschluessel ) ) elseif key <= 0 then vioSetElementData ( player, "housekey", key ) else vioSetElementData ( player, "housekey", 0 ) end vioSetElementData ( player, "bizkey", tonumber ( dsatz["Bizschluessel"] ) ) vioSetElementData ( player, "bankmoney", tonumber ( dsatz["Bankgeld"] ) ) vioSetElementData ( player, "drugs", tonumber ( dsatz["Drogen"] ) ) vioSetElementData ( player, "skinid", tonumber ( dsatz["Skinid"] ) ) vioSetElementData ( player, "carlicense", tonumber ( dsatz["Autofuehrerschein"] ) ) vioSetElementData ( player, "bikelicense", tonumber ( dsatz["Motorradtfuehrerschein"] ) ) vioSetElementData ( player, "lkwlicense", tonumber ( dsatz["LKWfuehrerschein"] ) ) vioSetElementData ( player, "helilicense", tonumber ( dsatz["Helikopterfuehrerschein"] ) ) vioSetElementData ( player, "planelicensea", tonumber ( dsatz["FlugscheinKlasseA"] ) ) vioSetElementData ( player, "planelicenseb", tonumber ( dsatz["FlugscheinKlasseB"] ) ) vioSetElementData ( player, "motorbootlicense", tonumber ( dsatz["Motorbootschein"] ) ) vioSetElementData ( player, "segellicense", tonumber ( dsatz["Segelschein"] ) ) vioSetElementData ( player, "fishinglicense", tonumber ( dsatz["Angelschein"] ) ) vioSetElementData ( player, "wanteds", tonumber ( dsatz["Wanteds"] ) ) vioSetElementData ( player, "stvo_punkte", tonumber ( dsatz["StvoPunkte"] ) ) vioSetElementData ( player, "gunlicense", tonumber ( dsatz["Waffenschein"] ) ) vioSetElementData ( player, "perso", tonumber ( dsatz["Perso"] ) ) vioSetElementData ( player, "boni", tonumber ( dsatz["Boni"] ) ) vioSetElementData ( player, "incomepayday", tonumber ( dsatz["IncomePayday"] ) ) vioSetElementData ( player, "pdayincome", tonumber ( dsatz["PdayIncome"] ) ) vioSetElementData ( player, "pdaykosten", tonumber ( dsatz["PdayKosten"] ) ) vioSetElementData ( player, "telenr", tonumber ( dsatz["Telefonnr"] ) ) vioSetElementData ( player, "warns", getPlayerWarnCount ( pname ) ) vioSetElementData ( player, "gunboxa", dsatz["Gunbox1"] ) vioSetElementData ( player, "gunboxb", dsatz["Gunbox2"] ) vioSetElementData ( player, "gunboxc", dsatz["Gunbox3"] ) vioSetElementData ( player, "job", dsatz["Job"] ) vioSetElementData ( player, "jobtime", dsatz["Jobtime"] ) vioSetElementData ( player, "club", dsatz["Club"] ) vioSetElementData ( player, "favchannel", tonumber ( dsatz["FavRadio"] ) ) vioSetElementData ( player, "bonuspoints", tonumber ( dsatz["Bonuspunkte"] ) ) local skill = tonumber ( dsatz["Truckerskill"] ) if not skill then skill = 0 end vioSetElementData ( player, "truckerlvl", skill ) vioSetElementData ( player, "airportlvl", tonumber ( dsatz["AirportLevel"] ) ) vioSetElementData ( player, "farmerLVL", tonumber ( dsatz["farmerLVL"] ) ) vioSetElementData ( player, "contract", tonumber ( dsatz["Contract"] ) ) vioSetElementData ( player, "socialState", dsatz["SocialState"] ) if tonumber ( dsatz["SocialState"] ) then if tonumber ( dsatz["SocialState"] ) == 0 then vioSetElementData ( player, "socialState", "Neu auf Galaxy-RL" ) end end vioSetElementData ( player, "streetCleanPoints", tonumber ( dsatz["StreetCleanPoints"] ) ) local handyString = dsatz["Handy"] local v1, v2 v1 = tonumber ( gettok ( handyString, 1, string.byte ( '|' ) ) ) v2 = tonumber ( gettok ( handyString, 2, string.byte ( '|' ) ) ) vioSetElementData ( player, "handyType", v1 ) vioSetElementData ( player, "handyCosts", v2 ) loadAddictionsForPlayer ( player ) isPremium ( player ) vioSetElementData ( player, "housex", 0 ) vioSetElementData ( player, "housey", 0 ) vioSetElementData ( player, "housez", 0 ) vioSetElementData ( player, "house", "none" ) vioSetElementData ( player, "curplayingtime", 0 ) vioSetElementData ( player, "handystate", "on" ) vioSetElementData ( player, "ammoTyp", 0 ) vioSetElementData ( player, "ammoAmount", 0 ) packageLoad ( player ) achievload ( player ) inventoryload ( player ) elementDataSettings ( player ) bonusLoad ( player ) setPremiumData ( player ) skillDataLoad ( player ) showFittingBlipForPlayer ( player ) _G[pname.."paydaytime"] = setTimer ( playingtime, 60000, 1, player ) RemoteSpawnPlayer ( player ) vioSetElementData ( player, "muted", 0 ) triggerClientEvent ( player, "DisableLoginWindow", getRootElement() ) triggerClientEvent ( player, "infobox_start", getRootElement(), "Du hast dich\nerfolgreich eingeloggt!\nDruecke F1 um das\nHilfemenue zu\noeffnen!", 5000, 0, 255, 0 ) outputDebugString ("Spieler "..pname.." wurde eingeloggt, IP: "..getPlayerIP(player)) vioSetElementData ( player, "loggedin", 1 ) vioSetElementData ( player, "ElementClicked", false )
    24. if vioGetElementData ( player, "stvo_punkte" ) >= 15 then -- SearchSTVO vioSetElementData ( player, "carlicense", 0 ) vioSetElementData ( player, "stvo_punkte", 0 ) MySQL_SetString("userdata", "Autofuehrerschein", vioGetElementData ( player, "carlicense" ), "Name LIKE '"..pname.."'") outputChatBox ( "Wegen deines schlechten Fahrverhaltens wurde dir dein Fuehrerschein abgenommen!", player, 125, 0, 0 ) end vioSetElementData ( player, "object", tonumber ( MySQL_GetString ( "inventar", "Objekt", "Name LIKE '" ..pname.."'" ) ) ) checkmsgs ( player ) blacklistLogin ( pname ) -- *** EasterEgg *** --[[if month == 4 and day == 4 then local oldlogin = MySQL_GetString("players", "Last_login", "Name LIKE '" ..pname.."'") local oldlogin1 = tonumber ( gettok ( oldlogin, 1, string.byte('.') ) ) local oldlogin2 = tonumber ( gettok ( oldlogin, 2, string.byte('.') ) ) if ( oldlogin1 ~= 4 or oldlogin2 ~= 4 ) or ( minute < 25 and hour < 16 ) then putFoodInSlot ( player, 5 ) end elseif month == 4 and day == 5 then local oldlogin = MySQL_GetString("players", "Last_login", "Name LIKE '" ..pname.."'") local oldlogin1 = tonumber ( gettok ( oldlogin, 1, string.byte('.') ) ) local oldlogin2 = tonumber ( gettok ( oldlogin, 2, string.byte('.') ) ) if oldlogin1 ~= 4 or oldlogin2 ~= 5 then putFoodInSlot ( player, 5 ) end end]] -- *** EasterEgg *** MySQL_SetString("players", "Last_login", lastlogin, "Name LIKE '"..pname.."'") MySQL_SetString("players", "LastLogin", lastLoginInt, "Name LIKE '"..pname.."'") local position = MySQL_GetString("logout", "Position", "Name LIKE '" ..pname.."'") if position then weapons = MySQL_GetString ( "logout", "Waffen", "Name LIKE '" ..pname.."'" ) MySQL_DelRow ( "logout", "Name LIKE '"..pname.."'" ) for i = 1, 12 do local wstring = gettok ( weapons, i, string.byte( '|' ) ) if wstring then if wstring then if #wstring >= 3 then local weapon = tonumber ( gettok ( wstring, 1, string.byte( ',' ) ) ) local ammo = tonumber ( gettok ( wstring, 2, string.byte( ',' ) ) ) giveWeapon ( player, weapon, ammo, true ) triggerClientEvent ( player, "sec_gun_give", getRootElement(), weapon, ammo ) end end end end if position ~= "false" then local x = tonumber ( gettok ( position, 1, string.byte( '|' ) ) ) local y = tonumber ( gettok ( position, 2, string.byte( '|' ) ) ) local z = tonumber ( gettok ( position, 3, string.byte( '|' ) ) ) local int = tonumber ( gettok ( position, 4, string.byte( '|' ) ) ) local dim = tonumber ( gettok ( position, 5, string.byte( '|' ) ) ) setTimer ( setElementInterior, 1000, 1, player, int ) setTimer ( setElementDimension, 1000, 1, player, dim ) setTimer ( setElementPosition, 1000, 1, player, x, y, z ) end end getMailsForClient_func ( pname ) setMaximumCarsForPlayer ( player ) triggerEvent ( "onVioPlayerLogin", player ) if tonumber ( dsatz["pred"] ) == 0 then prompt ( player, promptMainText, 30 ) mysql_vio_query ( "UPDATE userdata SET pred = '1' WHERE Name = '"..pname.."'" ) end else triggerClientEvent ( player, "infobox_start", getRootElement(), "Ungueltiges Passwort -\nueberpruefe\ndeine Eingabe\noder melde dich\nim Forum.", 5000, 255, 0, 0 ) triggerClientEvent ( player, "guiShowLoginAgain", getRootElement() ) vioSetElementData ( player, "pwfailed", tonumber ( vioGetElementData ( player, "pwfailed" )) + 1 ) if vioGetElementData ( player, "pwfailed" ) >= 3 then outputDebugString ("Spieler "..tostring ( getPlayerName(player) ).." wurde aufgrund eines falschen Passworts gekickt!IP: "..tostring ( getPlayerIP(player) ) ) kickPlayer ( player, "Du hast 3x das falsche Passwort eingegeben - Bitte melde dich bei einem Admin!", 0 ) end end end bindKey ( player, "ralt", "down", showcurser, player ) bindKey ( player, "m", "down", showcurser, player ) bindKey ( player, "f1", "down", showhmenue, player ) bindKey ( player, "r", "down", reload ) end endendaddEvent ( "einloggen", true )addEventHandler ( "einloggen", getRootElement(), login_func )
    25. function datasave ( quitReason, reason )
    26. if clanMembers[source] then clanMembers[source] = nil end if ticketPermitted[source] then ticketPermitted[source] = nil end local pname = getPlayerName ( source ) removePlayerFromLoggedIn ( pname ) if vioGetElementData ( source, "loggedin" ) == 1 then triggerEvent ( "onLoggedInPlayerQuit", source ) pname = MySQL_Save ( getPlayerName ( source ) ) fraktionMembers[vioGetElementData(source,"fraktion")][source] = nil adminsIngame[source] = nil if getElementData ( source, "isInHighNoon" ) or vioGetElementData ( source, "shootingRanchGun" ) then elseif quitReason and reason ~= "Ausgeloggt." then if vioGetElementData ( source, "wanteds" ) >= 1 --[[and ( quitReason == "Quit" or quitReason == "Unknown" )]] and vioGetElementData ( source, "jailtime" ) == 0 then local x, y, z = getElementPosition ( source ) local copShape = createColSphere ( x, y, z, 20 ) local elementsInCopSphere = getElementsWithinColShape ( copShape, "player" ) destroyElement ( copShape ) for key, cPlayer in ipairs ( elementsInCopSphere ) do if ( isOnDuty ( cPlayer ) or isArmy ( cPlayer ) ) and cPlayer ~= source then local wanteds = vioGetElementData ( source, "wanteds" ) vioSetElementData ( source, "wanteds", 0 ) vioSetElementData ( source, "jailtime", wanteds * 12 + vioGetElementData ( source, "jailtime" ) ) wantedCost = 100*wanteds*(wanteds*.5) vioSetElementData ( source, "money", vioGetElementData ( source, "money" ) - wantedCost ) if vioGetElementData ( source, "money" ) < 0 then vioSetElementData ( source, "money", 0 ) end outputChatBox ( "Der Gesuchte "..getPlayerName ( source ).." ist offline gegangen - er wird beim naechsten Einloggen im Knast sein.", cPlayer, 0, 125, 0 ) offlinemsg ( "Du bist fuer "..(wanteds*15).." mins im Gefaengnis (Offlineflucht?)", "Server", getPlayerName(source) ) break end end end if quitReason == "Kicked" or quitReason == "Bad Connection" or quitReason == "Timed out" then local curWeaponsForSave = "|" for i = 1, 12 do if i ~= 10 and i ~= 12 then local weapon = getPedWeapon ( source, i ) local ammo = getPedTotalAmmo ( source, i ) if weapon and ammo then if weapon > 0 and ammo > 0 then if #curWeaponsForSave <= 40 then curWeaponsForSave = curWeaponsForSave..weapon..","..ammo.."|" end end end end end if #curWeaponsForSave > 1 then mysql_vio_query( "INSERT INTO logout (Position, Waffen, Name) VALUES ('false', '"..curWeaponsForSave.."', '"..pname.."')") end end end if vioGetElementData ( source, "callswith" ) then if vioGetElementData ( source, "callswith" ) ~= "none" then local caller = getPlayerFromName ( vioGetElementData ( source, "callswith" ) ) if caller then vioSetElementData ( caller, "callswith", "none" ) vioSetElementData ( caller, "call", false ) vioSetElementData ( caller, "calls", "none" ) vioSetElementData ( caller, "callswith", "none" ) vioSetElementData ( caller, "calledby", "none" ) outputChatBox ( "*Knack* - Die Leitung ist tod!", caller, 125, 0, 0 ) end vioSetElementData ( source, "callswith", "none" ) vioSetElementData ( source, "call", false ) vioSetElementData ( source, "calls", "none" ) vioSetElementData ( source, "callswith", "none" ) vioSetElementData ( source, "calledby", "none" ) end end datasave_remote ( source ) if vioGetElementData ( source, "isInArea51Mission" ) then removeArea51Bots ( pname ) end local veh = getPedOccupiedVehicle ( source ) if veh then if isElement ( veh ) then if getElementModel(veh) == 502 then destroyElement ( veh ) end end end killTimer ( _G[pname.."paydaytime"] ) clearInv ( source ) clearUserdata ( source ) clearBonus ( source ) clearAchiev ( source ) clearPackage ( source ) clearDataSettings ( source ) endendaddEventHandler ("onPlayerQuit", getRootElement(), datasave )
    27. function elementDataSettings ( player )
    28. local pname = MySQL_Save ( getPlayerName ( player ) ) betaServerMessage ( player ) vioSetElementData ( player, "In_DMArena", 0 ) vioSetElementData ( player, "objectToPlace", false ) vioSetElementData ( player, "cheatingtrys", -1 ) vioSetElementData ( player, "growing", false ) vioSetElementData ( player, "isInRace", false ) vioSetElementData ( player, "callswithpolice", false ) vioSetElementData ( player, "isLive", false ) vioSetElementData ( player, "isInArea51Mission", false ) vioSetElementData ( player, "armingBomb", false ) vioSetElementData ( player, "tied", true ) vioSetElementData ( player, "hasBomb", false ) vioSetElementData ( player, "wanzen", false ) vioSetElementData ( player, "hunger", 50 ) vioSetElementData ( player, "isInHighNoon", false ) ------------------ local Weapon_Settings = MySQL_GetString("inventar", "Spezial", "Name LIKE '" ..pname.."'") local shads = {} if not Weapon_Settings then for i = 1, 6 do shads[i] = 0 end else for i = 1, 6 do shads[i] = tonumber ( gettok ( Weapon_Settings, i, string.byte( '|' ) ) ) end end for i, on in pairs ( shads ) do vioSetElementData ( player, "ammoTyp"..i, tonumber(on) ) end ---------------- local Shader_Settings = MySQL_GetString("userdata", "Shader", "Name LIKE '" ..pname.."'") local shads = {} if not Shader_Settings then for i = 1, 4 do shads[i] = 0 end else for i = 1, 4 do shads[i] = tonumber ( gettok ( Shader_Settings, i, string.byte( '|' ) ) ) end end for i, on in pairs ( shads ) do if on == 1 then triggerClientEvent ( player, "triggerVioShader"..i, player ) vioSetElementData ( player, "shader"..vals[i], 1 ) else vioSetElementData ( player, "shader"..vals[i], 0 ) end end ---------------- ArmyPermissions = MySQL_GetString("userdata", "ArmyPermissions", "Name LIKE '" ..pname.."'") if not ArmyPermissions then for i = 1, 9 do vioSetElementData ( player, "armyperm"..i, 0 ) end else for i = 1, 9 do vioSetElementData ( player, "armyperm"..i, tonumber ( gettok ( ArmyPermissions, i, string.byte( '|' ) ) ) ) end endend
    29. function saveArmyPermissions ( player )
    30. local pname = getPlayerName ( player ) local empty = "" for i = 1, 9 do empty = empty.."|"..vioGetElementData ( player, "armyperm"..i ) end empty = empty.."|" MySQL_SetString("userdata", "ArmyPermissions", empty, "Name LIKE '"..pname.."'")end
    31. function saveShaderInfo ( player ) local s_string = "|"..tonumber(getElementData( player, "shader"..vals[1] )).."|"..tonumber(getElementData( player, "shader"..vals[2] )).."|"..tonumber(getElementData( player, "shader"..vals[3] )).."|"..tonumber(getElementData( player, "shader"..vals[4] )).."|" local pname = getPlayerName ( player ) MySQL_SetString("userdata", "Shader", s_string, "Name LIKE '"..pname.."'")
    32. end
    33. function saveSpecialInfo ( player )
    34. local wert1, wert2, wert3, wert4, wert5, wert6 if not vioGetElementData( player, "ammoTyp1" ) or vioGetElementData( player, "ammoTyp1" ) == nil then wert1 = 0 else wert1 = tonumber(vioGetElementData( player, "ammoTyp1" )) end if not vioGetElementData( player, "ammoTyp2" ) or vioGetElementData( player, "ammoTyp2" ) == nil then wert2 = 0 else wert2 = tonumber(vioGetElementData( player, "ammoTyp2" )) end if not vioGetElementData( player, "ammoTyp3" ) or vioGetElementData( player, "ammoTyp3" ) == nil then wert3 = 0 else wert3 = tonumber(vioGetElementData( player, "ammoTyp3" )) end
    35. if not vioGetElementData( player, "ammoTyp4" ) or vioGetElementData( player, "ammoTyp4" ) == nil then wert4 = 0 else wert4 = tonumber(vioGetElementData( player, "ammoTyp4" )) end
    36. if not vioGetElementData( player, "ammoTyp5" ) or vioGetElementData( player, "ammoTyp5" ) == nil then wert5 = 0 else wert5 = tonumber(vioGetElementData( player, "ammoTyp5" )) end
    37. if not vioGetElementData( player, "ammoTyp6" ) or vioGetElementData( player, "ammoTyp6" ) == nil then wert6 = 0 else wert6 = tonumber(vioGetElementData( player, "ammoTyp6" )) end
    38. local s_string = "|"..wert1.."|"..wert2.."|"..wert3.."|"..wert4.."|"..wert5.."|"..wert6.."|" -- "|0|0|0|0|0|0|" local pname = getPlayerName ( player )
    39. MySQL_SetString("inventar", "Spezial", s_string, "Name LIKE '"..pname.."'")end
    40. function SaveCarData ( player )
    41. local pname = MySQL_Save ( getPlayerName ( player ) ) MySQL_SetString("userdata", "Geld", MySQL_Save ( MySQL_Save ( vioGetElementData ( player, "money" )) ), "Name LIKE '"..pname.."'") MySQL_SetString("userdata", "CurrentCars", MySQL_Save ( MySQL_Save ( vioGetElementData ( player, "curcars" )) ), "Name LIKE '"..pname.."'") MySQL_SetString("userdata", "Maximumcars", MySQL_Save ( MySQL_Save ( vioGetElementData ( player, "maxcars" )) ), "Name LIKE '"..pname.."'")end
    42. function datasave_remote ( player ) local source = player if tonumber ( MySQL_Save ( vioGetElementData ( source, "loggedin" ))) == 1 then local pname = getPlayerName ( source ) local fields = "SET" fields = fields.." Geld = '"..math.abs ( math.floor ( vioGetElementData ( source, "money" ) ) ).."'" fields = fields..", Fraktion = '"..math.abs ( math.floor ( vioGetElementData ( source, "fraktion") ) ).."'" fields = fields..", FraktionsRang = '"..math.floor ( vioGetElementData ( source, "rang" ) ).."'" fields = fields..", Spielzeit = '"..math.floor ( vioGetElementData ( source, "playingtime" ) ).."'" fields = fields..", CurrentCars = '"..math.floor ( vioGetElementData ( source, "curcars" ) ).."'" fields = fields..", Maximumcars = '"..math.floor ( vioGetElementData ( source, "maxcars" ) ).."'" fields = fields..", Tode = '"..math.floor ( vioGetElementData ( source, "deaths" ) ).."'" fields = fields..", Kills = '"..math.floor ( vioGetElementData ( source, "kills" ) ).."'" fields = fields..", Knastzeit = '"..math.floor ( vioGetElementData ( source, "jailtime" ) ).."'" fields = fields..", Himmelszeit = '"..math.floor ( vioGetElementData ( source, "heaventime" ) ).."'" fields = fields..", Hausschluessel = '"..math.floor ( vioGetElementData ( source, "housekey" ) ).."'" fields = fields..", Bankgeld = '"..math.floor ( vioGetElementData ( source, "bankmoney" ) ).."'" fields = fields..", Drogen = '"..math.floor ( vioGetElementData ( source, "drugs" ) ).."'" fields = fields..", Skinid = '"..math.floor ( vioGetElementData ( source, "skinid" ) ).."'" fields = fields..", Wanteds = '"..math.floor ( vioGetElementData ( source, "wanteds" ) ).."'" fields = fields..", StvoPunkte = '"..math.floor ( vioGetElementData ( source, "stvo_punkte" ) ).."'" fields = fields..", Boni = '"..math.floor ( vioGetElementData ( source, "boni" ) ).."'" fields = fields..", IncomePayday = '"..math.floor ( vioGetElementData ( source, "incomepayday" ) ).."'" fields = fields..", PdayIncome = '"..math.floor ( vioGetElementData ( source, "pdayincome" ) ).."'" fields = fields..", PdayKosten = '"..math.floor ( vioGetElementData ( source, "pdaykosten" ) ).."'" fields = fields..", Warns = '"..math.floor ( vioGetElementData ( source, "warns" ) ).."'" fields = fields..", Gunbox1 = '"..vioGetElementData ( source, "gunboxa" ).."'" fields = fields..", Gunbox2 = '"..vioGetElementData ( source, "gunboxb" ).."'" fields = fields..", Gunbox3 = '"..vioGetElementData ( source, "gunboxc" ).."'" fields = fields..", Job = '"..vioGetElementData ( source, "job" ).."'" fields = fields..", Jobtime = '"..math.floor ( vioGetElementData ( source, "jobtime" ) ).."'" fields = fields..", Club = '"..vioGetElementData ( source, "club" ).."'" fields = fields..", FavRadio = '"..math.floor ( vioGetElementData ( source, "favchannel" ) ).."'" fields = fields..", Bonuspunkte = '"..math.floor ( vioGetElementData ( source, "bonuspoints" ) ).."'" local skill = tonumber ( vioGetElementData ( source, "truckerlvl" ) ) if not skill then skill = 0 end fields = fields..", Truckerskill = '"..skill.."'" fields = fields..", farmerLVL = '"..vioGetElementData ( source, "farmerLVL" ).."'" fields = fields..", AirportLevel = '"..math.floor ( vioGetElementData ( source, "airportlvl" ) ).."'" fields = fields..", Contract = '"..math.floor ( vioGetElementData ( source, "contract" ) ).."'" fields = fields..", SocialState = '"..MySQL_Save ( getElementData ( source, "socialState") ).."'" fields = fields..", StreetCleanPoints = '"..math.floor ( getElementData ( source, "streetCleanPoints" ) ).."'" local v1 = "|"..vioGetElementData ( source, "handyType" ).."|" local v2 = vioGetElementData ( source, "handyCosts" ).."|" local v3 = v1..v2 fields = fields..", Handy = '"..v3.."'" mysql_vio_query ( "UPDATE userdata "..fields.." WHERE Name LIKE '"..pname.."'" ) saveAddictionsForPlayer ( source ) packageSave(source) achievsave(source) inventorysave(source) bonusSave(source) skillDataSave ( player ) saveArmyPermissions ( player ) saveShaderInfo ( player ) saveSpecialInfo ( player ) outputDebugString ("Daten fuer Spieler "..pname.." wurden gesichert!") endend
    43. function achievsave ( player )
    44. local pname = MySQL_Save ( getPlayerName ( player ) ) saveHorseShoesFound ( player, pname ) MySQL_SetString("achievments", "Waffenschieber", MySQL_Save ( vioGetElementData ( player, "gunloads") ), "Name LIKE '"..pname.."'") MySQL_SetString("achievments", "Fahrzeugwahn", MySQL_Save ( vioGetElementData ( player, "carwahn_achiev") ), "Name LIKE '"..pname.."'") savePlayingTimeForSleeplessAchiev ( player, pname )end
    45. function achievload ( player )
    46. local pname = MySQL_Save ( getPlayerName ( player ) ) local dsatz local result = mysql_query ( handler, "SELECT * from achievments WHERE Name LIKE '"..pname.."'" ) if result then if ( mysql_num_rows ( result ) > 0 ) then dsatz = mysql_fetch_assoc ( result ) mysql_free_result ( result ) end end vioSetElementData ( player, "schlaflosinsa", dsatz["SchlaflosInSA"] ) vioSetElementData ( player, "gunloads", dsatz["Waffenschieber"] ) vioSetElementData ( player, "angler_achiev", dsatz["Angler"] ) vioSetElementData ( player, "licenses_achiev", dsatz["Lizensen"] ) vioSetElementData ( player, "carwahn_achiev", dsatz["Fahrzeugwahn"] ) vioSetElementData ( player, "collectr_achiev", dsatz["DerSammler"] ) vioSetElementData ( player, "rl_achiev", dsatz["ReallifeWTF"] ) vioSetElementData ( player, "own_foots", dsatz["EigeneFuesse"] ) vioSetElementData ( player, "kingofthehill_achiev", dsatz["KingOfTheHill"] ) vioSetElementData ( player, "thetruthisoutthere_achiev", dsatz["TheTruthIsOutThere"] ) vioSetElementData ( player, "silentassasin_achiev", dsatz["SilentAssasin"] ) vioSetElementData ( player, "highwaytohell_achiev", dsatz["HighwayToHell"] ) vioSetElementData ( player, "revolverheld_achiev", tonumber ( dsatz["Revolverheld"] ) ) vioSetElementData ( player, "chickendinner_achiev", tonumber ( dsatz["ChickenDinner"] ) ) vioSetElementData ( player, "nichtsgehtmehr_achiev", tonumber ( dsatz["NichtGehtMehr"] ) ) vioSetElementData ( player, "highscore_achiev", tonumber ( dsatz["highscore"] ) == 1 ) local dstring = dsatz["LookoutsA"] triggerClientEvent ( player, "hideLookoutMarkers", getRootElement(), dstring ) local count = 0 for i = 1, 10 do if tonumber ( gettok ( dstring, i, string.byte ( '|' ) ) ) == 1 then count = count + 1 end end vioSetElementData ( player, "viewpoints", count ) dsatz = nil --[[ vioSetElementData ( player, "schlaflosinsa", MySQL_GetString("achievments", "SchlaflosInSA", "Name LIKE '" ..pname.."'") ) vioSetElementData ( player, "gunloads", MySQL_GetString("achievments", "Waffenschieber", "Name LIKE '" ..pname.."'") ) vioSetElementData ( player, "angler_achiev", MySQL_GetString("achievments", "Angler", "Name LIKE '" ..pname.."'") ) vioSetElementData ( player, "licenses_achiev", MySQL_GetString("achievments", "Lizensen", "Name LIKE '" ..pname.."'") ) vioSetElementData ( player, "carwahn_achiev", MySQL_GetString("achievments", "Fahrzeugwahn", "Name LIKE '" ..pname.."'") ) vioSetElementData ( player, "collectr_achiev", MySQL_GetString("achievments", "DerSammler", "Name LIKE '" ..pname.."'") ) vioSetElementData ( player, "rl_achiev", MySQL_GetString("achievments", "ReallifeWTF", "Name LIKE '" ..pname.."'") ) vioSetElementData ( player, "own_foots", MySQL_GetString("achievments", "EigeneFuesse", "Name LIKE '" ..pname.."'") ) vioSetElementData ( player, "kingofthehill_achiev", MySQL_GetString("achievments", "KingOfTheHill", "Name LIKE '" ..pname.."'") ) vioSetElementData ( player, "thetruthisoutthere_achiev", MySQL_GetString("achievments", "TheTruthIsOutThere", "Name LIKE '" ..pname.."'") ) vioSetElementData ( player, "silentassasin_achiev", MySQL_GetString("achievments", "SilentAssasin", "Name LIKE '" ..pname.."'") ) vioSetElementData ( player, "highwaytohell_achiev", MySQL_GetString("achievments", "HighwayToHell", "Name LIKE '" ..pname.."'") ) vioSetElementData ( player, "revolverheld_achiev", tonumber ( MySQL_GetString("achievments", "Revolverheld", "Name LIKE '" ..pname.."'") ) ) vioSetElementData ( player, "chickendinner_achiev", tonumber ( MySQL_GetString("achievments", "ChickenDinner", "Name LIKE '" ..pname.."'") ) ) vioSetElementData ( player, "nichtsgehtmehr_achiev", tonumber ( MySQL_GetString("achievments", "NichtGehtMehr", "Name LIKE '" ..pname.."'") ) ) ]] loadHorseShoesFound ( player, pname ) loadPlayingTimeForSleeplessAchiev ( player, pname )end
    47. function inventorysave ( player )
    48. local pname = getPlayerName ( player ) --[[MySQL_SetString("inventar", "Blumensamen", MySQL_Save ( vioGetElementData ( player, "flowerseeds") ) , "Name LIKE '"..pname.."'") MySQL_SetString("inventar", "Essensslot1", MySQL_Save ( vioGetElementData ( player, "food1") ) , "Name LIKE '"..pname.."'") MySQL_SetString("inventar", "Essensslot2", MySQL_Save ( vioGetElementData ( player, "food2") ) , "Name LIKE '"..pname.."'") MySQL_SetString("inventar", "Essensslot3", MySQL_Save ( vioGetElementData ( player, "food3") ) , "Name LIKE '"..pname.."'") MySQL_SetString("inventar", "Zigaretten", MySQL_Save ( vioGetElementData ( player, "zigaretten") ), "Name LIKE '"..pname.."'") MySQL_SetString("inventar", "Materials", MySQL_Save ( vioGetElementData ( player, "mats") ) , "Name LIKE '"..pname.."'") MySQL_SetString("inventar", "Benzinkanister", MySQL_Save ( vioGetElementData ( player, "benzinkannister") ) , "Name LIKE '"..pname.."'") MySQL_SetString("inventar", "FruitNotebook", MySQL_Save ( vioGetElementData ( player, "fruitNotebook" )) , "Name LIKE '"..pname.."'") MySQL_SetString("inventar", "Objekt", vioGetElementData ( player, "object" ), "Name LIKE '" ..pname.."'" ) MySQL_SetString("inventar", "Chips", vioGetElementData ( player, "casinoChips" ), "Name LIKE '" ..pname.."'" )]] --[[MySQL_SetString("inventar", "Peilsender", MySQL_Save ( vioGetElementData ( player, "peilsender")"Name LIKE '"..pname.."'") MySQL_SetString("inventar", "Wuerfel", MySQL_Save ( vioGetElementData ( player, "dice") ) , "Name LIKE '"..pname.."'") MySQL_SetString("inventar", "Palmensamen", MySQL_Save ( vioGetElementData ( player, "palmseeds") ) , "Name LIKE '"..pname.."'") MySQL_SetString("inventar", "Telefonbuch", MySQL_Save ( vioGetElementData ( player, "phonebook") ) , "Name LIKE '"..pname.."'") MySQL_SetString("inventar", "Lottoschein", MySQL_Save ( vioGetElementData ( player, "lottozahlen") ) , "Name LIKE '"..pname.."'") MySQL_SetString("inventar", "Waffenslot1", MySQL_Save ( vioGetElementData ( player, "guninv1") ) , "Name LIKE '"..pname.."'") MySQL_SetString("inventar", "Waffenslot2", MySQL_Save ( vioGetElementData ( player, "guninv2") ) , "Name LIKE '"..pname.."'") MySQL_SetString("inventar", "Waffenslot3", MySQL_Save ( vioGetElementData ( player, "guninv3") ) , "Name LIKE '"..pname.."'") MySQL_SetString("inventar", "Waffenslot4", MySQL_Save ( vioGetElementData ( player, "guninv4") ) , "Name LIKE '"..pname.."'") MySQL_SetString("inventar", "Waffenslot5", MySQL_Save ( vioGetElementData ( player, "guninv5") ) , "Name LIKE '"..pname.."'")]]
    49. local fields = "SET" fields = fields.." Blumensamen = '"..vioGetElementData ( player, "flowerseeds" ).."'" fields = fields..", Essensslot1 = '"..vioGetElementData ( player, "food1" ).."'" fields = fields..", Essensslot2 = '"..vioGetElementData ( player, "food2" ).."'" fields = fields..", Essensslot3 = '"..vioGetElementData ( player, "food3" ).."'" fields = fields..", Zigaretten = '"..vioGetElementData ( player, "zigaretten" ).."'" fields = fields..", Materials = '"..vioGetElementData ( player, "mats" ).."'" fields = fields..", Benzinkanister = '"..vioGetElementData ( player, "benzinkannister" ).."'" fields = fields..", FruitNotebook = '"..vioGetElementData ( player, "fruitNotebook" ).."'" fields = fields..", Objekt = '"..vioGetElementData ( player, "object" ).."'" fields = fields..", Chips = '"..vioGetElementData ( player, "casinoChips" ).."'" fields = fields..", eggs = '"..vioGetElementData ( player, "easterEggs" ).."'" --fields = fields..", Geschenke = '"..vioGetElementData ( player, "presents" ).."'" mysql_vio_query ( "UPDATE inventar "..fields.." WHERE Name LIKE '"..pname.."'" )end
    50. function casinoMoneySave ( player )
    51. if vioGetElementData ( player, "loggedin" ) == 1 then local name = getPlayerName ( player ) local chips = math.abs ( math.floor ( vioGetElementData ( player, "casinoChips" ) ) ) local money = math.floor ( vioGetElementData ( player, "money" ) ) local bankMoney = math.floor ( vioGetElementData ( player, "bankmoney" ) ) mysql_vio_query ( "UPDATE inventar SET Chips = '"..chips.."' WHERE Name LIKE '"..name.."'" ) mysql_vio_query ( "UPDATE userdata SET Geld = '"..money.."' WHERE Name LIKE '"..name.."'" ) mysql_vio_query ( "UPDATE userdata SET Bankgeld = '"..bankMoney.."' WHERE Name LIKE '"..name.."'" ) endend
    52. function inventoryload ( player )
    53. local pname = getPlayerName ( player ) vioSetElementData ( player, "playerid", tonumber ( MySQL_GetString("players", "id", "Name LIKE '" ..pname.."'")) ) local dsatz local result = mysql_query ( handler, "SELECT * from inventar WHERE Name LIKE '"..pname.."'" ) if result then if ( mysql_num_rows ( result ) > 0 ) then dsatz = mysql_fetch_assoc ( result ) mysql_free_result ( result ) end end vioSetElementData ( player, "dice", tonumber ( dsatz["Wuerfel"] ) ) vioSetElementData ( player, "flowerseeds", tonumber ( dsatz["Blumensamen"] ) ) vioSetElementData ( player, "food1", tonumber ( dsatz["Essensslot1"] ) ) vioSetElementData ( player, "food2", tonumber ( dsatz["Essensslot2"] ) ) vioSetElementData ( player, "food3", tonumber ( dsatz["Essensslot3"] ) ) vioSetElementData ( player, "zigaretten", tonumber ( dsatz["Zigaretten"] ) ) vioSetElementData ( player, "mats", tonumber ( dsatz["Materials"] ) ) vioSetElementData ( player, "benzinkannister", tonumber ( dsatz["Benzinkanister"] ) ) vioSetElementData ( player, "fruitNotebook", tonumber ( dsatz["FruitNotebook"] ) ) vioSetElementData ( player, "casinoChips", tonumber ( dsatz["Chips"] ) ) vioSetElementData ( player, "gameboy", tonumber ( dsatz["Gameboy"] ) ) vioSetElementData ( player, "easterEggs", tonumber ( dsatz["eggs"] ) ) -- X-MAS -- -- vioSetElementData ( player, "presents", tonumber ( dsatz["Geschenke"] ) ) -- X-MAS -- dsatz = nil --[[ vioSetElementData ( player, "dice", tonumber ( MySQL_GetString("inventar", "Wuerfel", "Name LIKE '" ..pname.."'")) ) vioSetElementData ( player, "flowerseeds", tonumber ( MySQL_GetString("inventar", "Blumensamen", "Name LIKE '" ..pname.."'")) ) vioSetElementData ( player, "food1", tonumber ( MySQL_GetString("inventar", "Essensslot1", "Name LIKE '" ..pname.."'")) ) vioSetElementData ( player, "food2", tonumber ( MySQL_GetString("inventar", "Essensslot2", "Name LIKE '" ..pname.."'")) ) vioSetElementData ( player, "food3", tonumber ( MySQL_GetString("inventar", "Essensslot3", "Name LIKE '" ..pname.."'")) ) vioSetElementData ( player, "zigaretten", tonumber ( MySQL_GetString("inventar", "Zigaretten", "Name LIKE '" ..pname.."'") ) ) vioSetElementData ( player, "mats", tonumber ( MySQL_GetString("inventar", "Materials", "Name LIKE '" ..pname.."'") ) ) vioSetElementData ( player, "benzinkannister", tonumber ( MySQL_GetString("inventar", "Benzinkanister", "Name LIKE '" ..pname.."'") ) ) vioSetElementData ( player, "fruitNotebook", tonumber ( MySQL_GetString("inventar", "FruitNotebook", "Name LIKE '" ..pname.."'") ) ) vioSetElementData ( player, "casinoChips", tonumber ( MySQL_GetString( "inventar", "Chips", "Name LIKE '" ..pname.."'") ) ) vioSetElementData ( player, "gameboy", tonumber ( MySQL_GetString ( "inventar", "Gameboy", "Name LIKE '"..pname.."'" ) ) ) ]]end
    54. -- Info: Angabe von Last_Login in Tagen seit Jahresanfang, Angabe von Geschlecht in 1 u. 0 - 1 = Weiblich, 0 = männlich-- Anreise in 1 u. 0, 0 = Schiff, 1 = Flugzeug-- Scheine: 0 = nicht vorhanden, 1 = vorhanden
    55. function logoutPlayer_func ( x, y, z, int, dim )
    56. if vioGetElementData ( client, "shootingRanchGun" ) then else local pname = MySQL_Save ( getPlayerName ( client ) ) local int = tonumber ( MySQL_Save ( int ) ) local dim = tonumber ( MySQL_Save ( dim ) ) local curWeaponsForSave = "|" for i = 1, 11 do if i ~= 10 then local weapon = getPedWeapon ( client, i ) local ammo = getPedTotalAmmo ( client, i ) if weapon and ammo then if weapon > 0 and ammo > 0 then if #curWeaponsForSave <= 40 then curWeaponsForSave = curWeaponsForSave..weapon..","..ammo.."|" end end end end end curWeaponsForSave = MySQL_Save ( curWeaponsForSave ) pos = "|"..(math.floor(x*100)/100).."|"..(math.floor(y*100)/100).."|"..(math.floor(z*100)/100).."|"..int.."|"..dim.."|" if #curWeaponsForSave < 5 then curWeaponsForSave = "" end local result = mysql_vio_query( "INSERT INTO logout (Position, Waffen, Name) VALUES ('"..pos.."', '"..curWeaponsForSave.."', '"..pname.."')") kickPlayer ( client, "Ausgeloggt." ) endendaddEvent ( "logoutPlayer", true )addEventHandler ( "logoutPlayer", getRootElement(), logoutPlayer_func )
    Alles anzeigen





    Ich habe die jeweiligen dateien berreits durchgeschaut aber keinen fehler gefunden(ich habe die datei mit der originalen vio datei vergliechen, da ich momentan noch lua lerne und einige begriffe fremd waren). Ich hoffe ich findet evt. etwas...


    MFG
  • nope, alle mysql daten sind unter mysql_start.lua eingetragen und richtig...
  • ups ^^ hatte ich ganz vergessen, ich hatte meinen server neu installiert und die module vergessen ^^, danke

    MFG


    #Edit: jetzt bekomme ich jedoch folgende fehlermeldungen:

    Spoiler anzeigen
    [21;1H [20;1H [19;1H[22:47:23] INFO: Error executing the query: (1064) You have an error in your SQL[20;2Hsyntax; check the manual that corresponds to your MySQL server version for the
    [1Bright syntax to use near ':^\,?L', '60094007' )' at line 1
    [1B[22:47:23] ERROR: Galaxy-RL/register_login/register_login_server.lua:240: attemp[23;1Ht to concatenate a nil value[22:47:45] ERROR: Galaxy-RL/register_login/register_login_server.lua:819: attemp[23;1Ht to index field '?' (a nil value)

    Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von warnkeTV ()

  • denn fehler habe ich berreits behoben, aber einen bekomme ich nicht weg:

    Spoiler anzeigen
    ERROR: Galaxy-RL/register_login/register_login_server.lua:208: attemp[23;1Ht to concatenate local 'id' (a boolean value)



    Zeile wo der fehler ist(laut log)


    Spoiler anzeigen
    local result = mysql_query(handler, "INSERT INTO players ( id, Name, Serial, IP, Last_login, Geburtsdatum_Tag, Geburtsdatum_Monat, Geburtsdatum_Jahr, Passwort, Geschlecht, RegisterDatum, Salt, LastLogin) VALUES ( '"..id.."', '"..pname.."', '"..getPlayerSerial(player).."', '"..getPlayerIP ( player ).."', '"..lastlogin.."', "..tonumber ( bday)..", "..tonumber ( bmon)..", "..tonumber ( byear)..", '"..passwort.."', '"..geschlecht.."', '"..registerdatum.."', '"..salt.."', '"..lastLoginInt.."' )")




    -MFG