BigBrother Posted October 13, 2013 Share Posted October 13, 2013 Hello, I've done a script which kick a player who is not in the database. To do so, I use this script function isPlayerRegistred() joinPlayerName = getPlayerName(source) exports.sql:connectMySQL() local result = mysql_query(db, "SELECT * FROM users WHERE username = '"..joinPlayerName.."'") local row = mysql_fetch_row(result) if (row == nil) then outputChatBox(" ", source, 255, 255, 255, true) outputChatBox("Votre compte n'est pas enregistré. Veuillez vous inscrire sur notre plateforme web.", source, 185, 74, 72, true) kickPlayer (source) else spawnPlayer(source, 0.0, 0.0, 3.0) fadeCamera(source, true) setCameraTarget(source) outputChatBox(" ", source, 255, 255, 255, true) outputChatBox("Bienvenue sur WeRoleplay, #FFFFFF"..joinPlayerName, source, 153, 153, 153, true) outputChatBox("Veillez à bien respecter les règles du serveur.", source, 153, 153, 153, true) outputChatBox(" ", source, 255, 255, 255, true) mysql_free_result(result) end end addEventHandler("onPlayerJoin", root, isPlayerRegistred) And I have an error : Access denied @ kickPlayer Which line of the ACL should I use to enable the kick function in this case ? Thanks, Link to comment
Castillo Posted October 13, 2013 Share Posted October 13, 2013 Add the resource to the "Admin" group in the ACL.xml. 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