add Profile(PlayerNumber) binding to productivity helpers
This commit is contained in:
@@ -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 ]]
|
--[[ helper functions ]]
|
||||||
function tobool(v)
|
function tobool(v)
|
||||||
if type(v) == "string" then
|
if type(v) == "string" then
|
||||||
|
|||||||
Reference in New Issue
Block a user