Lloyd Logan Posted January 16, 2013 Posted January 16, 2013 (edited) So, i cant get this to work? To get the players login data? test = dbConnect( "mysql", "dbname=test;host=127.0.0.1", "root", "") function makeadminnow(thePlayer) local name = getAccountName(thePlayer) dbExec ( test, "UPDATE `accounts` SET `admin` = '12' WHERE `username` = ".. name .."" ) outputChatBox("You are now admin!", thePlayer) end addCommandHandler("makemeadmin", makeadminnow) Edited January 16, 2013 by Guest If you need an Intermediate scripter feel free to PM me as I will accept "almost" any job, STATUS: UNAVAILABLE SCOTLAND, my hometown, and the Home of GTA!
Anderl Posted January 16, 2013 Posted January 16, 2013 Function parameter doesn't make any sense, why are you using getLocalPlayer function as a parameter name? And then you use "thePlayer" in outputChatBox which isn't even declared anywhere? "[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007
Lloyd Logan Posted January 16, 2013 Author Posted January 16, 2013 Function parameter doesn't make any sense, why are you using getLocalPlayer function as a parameter name? And then you use "thePlayer" in outputChatBox which isn't even declared anywhere? Sorry, my fault. I tried to edit it, but it didn't work. I forgot to change it back I'll change the OP If you need an Intermediate scripter feel free to PM me as I will accept "almost" any job, STATUS: UNAVAILABLE SCOTLAND, my hometown, and the Home of GTA!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now