add Profile(PlayerNumber) binding to productivity helpers

This commit is contained in:
AJ Kelly
2011-06-03 00:37:04 -05:00
parent 17f9da1b3a
commit 59e45c45ca
@@ -223,6 +223,23 @@ end;
--[[ ----------------------------------------------------------------------- ]]
--[[ profile stuff ]]
-- Profile(pn)
-- This returns a profile, preferably a player one.
-- If there isn't one, we fall back on the machine profile.
function Profile(pn)
if PROFILEMAN:IsPersistentProfile(pn) then
-- player profile
return PROFILEMAN:GetProfile(pn);
else
-- machine profile
return PROFILEMAN:GetMachineProfile();
end;
end;
--[[ end profile stuff]]
--[[ ----------------------------------------------------------------------- ]]
--[[ helper functions ]]
function tobool(v)
if type(v) == "string" then