
Karuzo
Members-
Posts
1,213 -
Joined
-
Last visited
Everything posted by Karuzo
-
Use another compiler?
-
What? Btw, how should he use the .dds picture if he doesn't have it lol
-
I don't mean that i won't work. Ofc it works. Im using it myself. But the image would go out of the rectangle and that looks ugly.
-
On yours? That posted a guy(don't remember his name) on my radar topic. Please don't say copied scripts are yours. Btw that won't work. As the image would go out of the radar.
-
What image? The radar is the image section.
-
Yeah but won't go the map outside of the radar ? I think youll need a rendertarget either , if im right. Sorry if im not.
-
No ofc. not. Srsly? You just host server for a guy who has a nice script? That sounds like scam for me.
-
Fake: https://community.multitheftauto.com/index.php?p= ... ls&id=8832 Original: https://community.multitheftauto.com/index.php?p= ... ls&id=8085 DONE
-
Works now perfectly! Thank you very very much WhoAmI!
-
The Inserting works now! But setting still doesn't work.
-
I'm triggering it from the ClientSide. addEventHandler("onClientGUIClick", loginsend, function() outputChatBox("button") local username = useredit:setText() local password = passedit:setText() if username == "" or password == "" then outputChatBox("Bitte trage deine Daten ein! Wenn du keinen Account hast melde dich auf ... an!", 125,0,0) else triggerServerEvent("LoginRequest",getLocalPlayer(),getLocalPlayer(),username,password) triggerServerEvent("OnQuitPlayer", getLocalPlayer(),username) setCameraTarget(localPlayer) end end)
-
Works now, but if i quit, and log in i don't get the money/skin/health i had when i quitted. And in the accounts.db theres nothing inserted. But it says Inserting Successfull. Could it be on the UPDATE ?
-
The 'else' message in my code. Line 24.
-
Huh, now i get the error message.
-
Login: function login_func ( player, username, password) local query = dbQuery ( connect, "SELECT username, password FROM accounts WHERE username = ?", username ) local checkdatas = dbQuery (connect, "SELECT * FROM accounts WHERE username=?", username ) outputChatBox ( getElementType ( player ) ) if ( query ) and (checkdatas) then local data, rows = dbPoll ( query, -1 ) local setdata = dbPoll ( checkdatas, -1 ) if ( rows >= 1 ) then if ( data [ 1 ].password == password ) then local x, y, z = setdata.x, setdata.y, setdata.z local money = setdata.money local skin = setdata.skin local health = setdata.health local int = setdata.int local dim = setdata.dim setElementData(player, "LoggedIN",true) --outputChatBox ( tostring ( getElementData ( player, "LoggedIN" ) ) ) --outputChatBox(tostring(elementdata)) outputChatBox("Du hast dich erfolgreich eingeloggt!",player,0,125,0) outputChatBox("Willkommen zurück, "..string.gsub ( getPlayerName ( player ), '#%x%x%x%x%x%x', '' ),player,0,125,0) triggerClientEvent(player,"closeLoginPanel",player) setPlayerMoney(player,tostring(setdata.money)) setElementModel(player,tostring(setdata.skin)) setElementHealth(player,tostring(setdata.health)) setElementInterior(player,tostring(setdata.int)) setElementDimension(player,tostring(setdata.dim)) setElementPosition(player, tostring(setdata.x), tostring(setdata.y), tostring(setdata.z)) else outputChatBox("Error 404 : Dein Benutzername oder dein Passwort ist falsch!",player,125,0,0) end end end end addEvent("LoginRequest",true) addEventHandler("LoginRequest",getRootElement(),login_func) Quit: function onQuit (username) outputChatBox ( getElementType ( source ) ) local data = getElementData(source,"LoggedIN") outputChatBox ( tostring ( data ) ) if ( data ) then local money = getPlayerMoney ( source ) local skin = getElementModel ( source ) local health = getElementHealth ( source ) local int,dim = getElementInterior ( source ), getElementDimension ( source ) local x,y,z = getElementPosition (source) local inserting = dbExec(connect, "UPDATE accounts SET x=?, y=?, z=?, skin=?, health=?,int=?,dim=?,money=? WHERE username=?", x, y, z, skin,health,int,dim,money, username ) if inserting then outputDebugString("Inserting successfull") else outputDebugString("Inserting failed.") end end end addEventHandler ("onPlayerQuit", root, onQuit) addEvent("OnQuitPlayer", true) addEventHandler("OnQuitPlayer", root, onQuit) addCommandHandler("test", onQuit) Screenshot: //Edit: I know what the problem for the 'database is locked' was. I had SQLite Browser open, as i quit. So the accounts.db was used by SQlite Browser. But i still get killed.
-
Yeah dbQuerys working fine. dbExec(connect, "UPDATE accounts SET x=?, y=?, z=?, skin=?, health=?,int=?,dim=?,money=? WHERE username=?", x, y, z, skin,health,int,dim,money, username ) The problem is , if i log in , i get killed. Wtf ?
-
No
-
Hmm, awkward , works now Thank you!
-
Hello People, I tried to create an Image with dxDrawImage. Works everything fine. But the problem is : I get an ugly border. How can i remove that border ? Made a screenshot so you can understand me better:
-
local connect addEventHandler("onResourceStart", resourceRoot,function() connect = dbConnect( "sqlite", "file.db", "", "", "share=0" ) if connect then outputDebugString("Connected to the Database!") local tablec = dbQuery ( connect , "CREATE TABLE IF NOT EXISTS tablename (columna,columnb,columnc)" ) if tablec then outputChatBox("Table Created") else outputChatBox("Table couldn't be created!") end else outputDebugString("Couldn't connect to the databse!", 1) end end) This will create a .db file called file.db . And will create a Table if no table exists.
-
no. You don't need an end for an else. Just put an end away.
-
Hey, ive got an awkward error in my console: It says my database is locked ?!? How can i solve this ?