Twos Posted March 4, 2021 Share Posted March 4, 2021 I want to create a Base for mi clan, but i don't know how i can make only my clan can use the command to open. Link to comment
Hydra Posted March 4, 2021 Share Posted March 4, 2021 set an element data for that group and use this: function a() if getElementData(localPlayer, "ClanName") then -- do something here else outputChatBox("You are not allowed to use this command", 255, 0, 0) end end addCommandHandler("abc1", a) 1 Link to comment
Twos Posted March 5, 2021 Author Share Posted March 5, 2021 10 hours ago, Hydra said: set an element data for that group and use this: function a() if getElementData(localPlayer, "ClanName") then -- do something here else outputChatBox("You are not allowed to use this command", 255, 0, 0) end end addCommandHandler("abc1", a) How i set an element data for that group? Link to comment
Down MTA Posted March 5, 2021 Share Posted March 5, 2021 (edited) 95 /5000 Resultados de tradução You need to create an acl so that players in it can access the command! Sorry for my English, use a function: https://wiki.multitheftauto.com/wiki/IsObjectInACLGroup function clan(thePlayer) local accName = getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup("user." ..accName, aclGetGroup("CLAN")) then ---- code else return outputChatBox("comando apenas jogadores do clan") end end AddCommandHandler("clan", clan) Edited March 5, 2021 by Down MTA 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