Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function RegisterPlayer(playerSource, commandName, _password)
- local name = exports["MySQL"]:mysqlEscapeString(getPlayerName(playerSource))
- local password = exports["MySQL"]:mysqlEscapeString(_password)
- local query = "INSERT INTO accounts SET username='" .. name .. "', password=MD5('" .. password .. "')"
- if (exports["MySQL"]:mysqlQuery(query)) then
- outputChatBox("Account created successfuly.", playerSource)
- else
- outputChatBox("An error has occured when trying to create your account.", playerSource)
- end
- end
- addCommandHandler("register", RegisterPlayer)
Add Comment
Please, Sign In to add comment