You want that only players with access to "function.banPlayer" are able to use the command? or you want so that anybody can use the command, but they can't use it against admins?
If it's the second, then use this:
function dimensionSystem ( thePlayer, commandName, theTarget )
local theTarget = getPlayerFromName ( theTarget )
if ( theTarget ) then
if hasObjectPermissionTo ( theTarget, "function.banPlayer", true ) then
kickPlayer ( thePlayer, "Don't abuse the Admin system!" )
else
showPlayerHudComponent ( theTarget, "ammo", false )
showPlayerHudComponent ( theTarget, "area_name", false )
showPlayerHudComponent ( theTarget, "armour", false )
showPlayerHudComponent ( theTarget, "breath", false )
showPlayerHudComponent ( theTarget, "clock", false )
showPlayerHudComponent ( theTarget, "health", false )
showPlayerHudComponent ( theTarget, "money", false )
showPlayerHudComponent ( theTarget, "vehicle_name", false )
showPlayerHudComponent ( theTarget, "weapon", false )
showPlayerHudComponent ( theTarget, "radar", false )
showChat ( theTarget, false )
end
else
outputChatBox ( "The player was not found!", thePlayer, 255, 0, 0 )
end
end
addCommandHandler ( "pban", dimensionSystem )