Anarchia Posted May 1, 2018 Posted May 1, 2018 WARNING: sh_admins\admincommands:lua:3: Bad argument @'isObjectInACLGroup' [expected string at argument 1, got boolean] WARNING: sh_admins\admincommands:lua:3: Bad argument @''setElementPosition' [Expected element at argument 1,got nil] function gotovh (thePlayer) local account = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup(aclGetGroup("Admin,Moderator,Owner")) then end setElementPosition( player, 0, 0, 3 ) -- teleport player to the centre of SA end addCommandHandler("vh", gotovh)
FlyingSpoon Posted May 1, 2018 Posted May 1, 2018 Wrong section to post this, use scripting next time. Change setElementPosition( player, 0, 0, 3 ) -- teleport player to the centre of SA TO setElementPosition(thePlayer, 0, 0, 3 ) -- teleport player to the centre of SA GitHub: https://github.com/flyingspoon YouTube: https://www.youtube.com/channel/UClsnd4SEid3gob33DSk1-GQ
Anarchia Posted May 3, 2018 Author Posted May 3, 2018 (edited) ty and how can i do that only the admin can use this command? Edited May 3, 2018 by Anarchia
nikitafloy Posted May 3, 2018 Posted May 3, 2018 https://wiki.multitheftauto.com/wiki/HasObjectPermissionTo orhttps://wiki.multitheftauto.com/wiki/IsObjectInACLGroup Нужен скриптер?Benuff Server - Russian Site MTA:SA - Updating, Client, Game, Problem Solving, Help for Russian Players and etc.
LilDawage Posted May 4, 2018 Posted May 4, 2018 you do it with Team Admin function gotovh (thePlayer) local account = getAccountName ( getPlayerAccount ( thePlayer ) ) if getTeamName(getPlayerTeam(thePlayer)) == "Admin" then end setElementPosition( player, 0, 0, 3 ) -- teleport player to the centre of SA end addCommandHandler("vh", gotovh) RPG/CnR servers Developer , You want help ? contact me on discord >>>lilDawage#8508<<< i'm at your Service 10/24 hours 7/7 days , >>>Welcome<<< Asking Discord Channel JOIN US ON here , you are welcome 10/24 active
gubi Posted May 4, 2018 Posted May 4, 2018 (edited) if isObjectInACLGroup(aclGetGroup("Admin,Moderator,Owner")) then change it to: if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Owner")) or isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Admin")) or isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Moderator")) then Edited May 4, 2018 by gubi
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