I have an admin game where players may abuse using commands. My game uses Adonis admin script by @Davey_Bones. What I’m trying to achieve is that players with admin level lower than Admins can’t use “others”.
In Adonis, there are four admin level (bottom to top):
Moderator
Admin
Owner
Creator
For example, some abusive players can run the command “:kill others”. So, to anticipate that, I want to make “others” only work for Admins+, not to Moderators.
I’m sorry. I do not really know how to do this. I dont think u are able to alter the core script in Adonis because it is a module that is aquired using the require() function.
When a command is spoken, you can check if the player that spoke has a valid role to call that command, for example:
function killcommands(player)
if AdminRoles[player] and (AdminRoles[player] == "Creator" or AdminRoles[player] == "Admin") then -- Check if the player that chatted the command is in the whitelist and if they have a valid role
-- execute kill
end
end
The rest of the commands that are universal for all admins can be disregarded, you won’t have to whitelist them to specific roles.