huyjvguyen Posted August 5, 2015 Share Posted August 5, 2015 i use it ? it's right? function money(thePlayer, commandName) name = getPlayerName local money = exports.mysql:query("SELECT `money` FROM `accounts` WHERE `id` = ' "..name .." ' ") if (money < 100) then outputChatBox("you are bad" , thePlayer ) else outputChatbox("you are handsome boy" , thePlayer) end end addCommandHandler("checkmoney", root, money) Link to comment
LabiVila Posted August 5, 2015 Share Posted August 5, 2015 First, the second like should be like this: name = getPlayerName (thePlayer) second, rather than exports.mysql:query you can use dbQuery (...) then get the result with dbPoll (thequery, -1) Link to comment
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