I'm running an edited DarkRP script and added a function so that admins could talk in color.
Then I wanted to make it so only select people could do it by adding an owner and assmod admin group seperate.
This is the users.txt:
"Users"
{
//
// This is your users file, you can use this file to add people as admins on your server.
//
// If you're a Lua coder you can add your own sections and use them
// in your script by doing pl:IsUserGroup( "admin" ) etc
//
"superadmin"
{
"name" "steam"
}
"admin"
{
"name" "steam"
}
"owner"
{
"name" "steam"
}
"assadmin"
{
"name" "steam"
}
}
This is the function for one of the colors:
function PlayerAdminWhiteo(ply, args)
if ply:IsUserGroup( "owner" ) then
for k,v in pairs(player.GetAll()) do
local col = Color(255,255,255,255)
TalkToPerson(v, col, "[OWNER] "..ply:Nick(), Color(255,255,255,255), args, ply)
end
else
Notify(ply, 1, 4, "You are not an Owner")
end
return ""
end
AddChatCommand("/owhite", PlayerAdminWhiteo)
Even though my steam id is added to the users.txt in the owner section, I cant use this chat commnad. It just gives me the notify.
Did I do something wrong?
Sorry, you need to Log In to post a reply to this thread.