ASSmod Level calls to ULX?

i am simply trying to convert a script to work for ULX instead of ASSmod. How would i do this?
Lua im trying to change:
[lua]
if ValidEntity(pl) then

		local color = team.GetColor( pl:Team() )
		local chatInfo = {
			pl = pl, -- Here on Down to...
			owner = pl:GetLevel() == 0,
			admin = pl:GetLevel() == 1,
			global = pl:GetLevel() == 2,
			moderator = pl:GetLevel() == 3,
			respected = pl:GetLevel() == 4,
			guest = pl:GetLevel() == 5,
			faggot = pl:GetLevel() == 255,
			name = pl:GetName(), -- here. im pretty sure i need to change pl.Getlevel, but i dont know 

—how to define all these.
color = color,
textcolor = custcol or COLOR_CHAT,
msg = msg,
type = type,
time = RealTime()+15
};
[/lua]
thats all you really need to see to help
you may see what i mean when you see “pl.Getlevel”
So, mostly, im asking “What are the lines of code i need to make it compatible with ULX?”
Since pl:GetLevel only works for ASSmod, what do i use for ULX? and how do i define certain usergroups?

I would suggest trying **[Player.IsUserGroup

http://wiki.garrysmod.com/favicon.ico](http://wiki.garrysmod.com/?title=Player.IsUserGroup)** not sure though i haven’t looked at either mods code.

Yeah, replace them all with pl:IsUserGroup( “group” ) and it should work, but you will need to make sure all those groups are defined in garrysmod/data/ULib/groups.txt on the server.

You can also create groups via console commands in-game, but I find editing the file easier.

Here’s how you add them (in groups.txt):



"group name"	
{
	"allow"	
	{
		"command1, eg 'ulx kick'"
		"command2"
	}
	"inherit_from"	"group to inherit from"
}


Just add it to the end of the file.