PtokaX wiki

Hub (server) for Direct Connect

User Tools

Site Tools


Sidebar


luaapi:px_profman

Profile manager table functions

Function Description
ProfMan.AddProfile(sProfileName)Add profile to profilemanager, return iProfileNumber if success or nil when profile already exist.
ProfMan.RemoveProfile(sProfileName/iProfileNumber)Remove profile from profilemanager, return true if success or nil when profile not exist or is in use.
ProfMan.MoveDown(iProfileNumber)Move profile down. Return nil when failed, true if success.
ProfMan.MoveUp(iProfileNumber)Move profile up. Return nil when failed, true if success.
ProfMan.GetProfile(sProfileName/iProfileNumber)Return profile as profile table or nil if not exist.
ProfMan.GetProfiles()Return table with profiles as profile tables.
ProfMan.GetProfilePermission(iProfileNumber, iPermissionId)Return true if permission is true, or nil.
ProfMan.GetProfilePermissions(iProfileNumber)Return profile permissions table.
ProfMan.SetProfileName(iProfileNumber, sProfileName)Change profile name, return true if success or nil if profile not exist.
ProfMan.SetProfilePermission(iProfileNumber, iPermissionId, bBoolean)Change profile permission, return true if success or nil if profile not exist.
ProfMan.Save()Save profiles.
luaapi/px_profman.txt · Last modified: 16/06/2015 16:03 by ppk