From 4730389c3bc0e750eab2ecdc3fd9a781f70e12a3 Mon Sep 17 00:00:00 2001 From: BobTheBob <32057864+BobTheBob9@users.noreply.github.com> Date: Mon, 21 Nov 2022 00:00:02 +0000 Subject: Add entity functions for reading userinfo cvars to CPlayer class (#521) * add entity functions for reading userinfo cvars to CPlayer class * fix formatting * update to use new functions from launcher pr --- .../mod/scripts/vscripts/class/cplayer.nut | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'Northstar.CustomServers/mod/scripts') diff --git a/Northstar.CustomServers/mod/scripts/vscripts/class/cplayer.nut b/Northstar.CustomServers/mod/scripts/vscripts/class/cplayer.nut index b9f8f7eb..19c6b6df 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/class/cplayer.nut +++ b/Northstar.CustomServers/mod/scripts/vscripts/class/cplayer.nut @@ -328,6 +328,26 @@ function CodeCallback_RegisterClass_CPlayer() } } } + + function CPlayer::GetUserInfoString( key, defaultValue = "" ) + { + return GetUserInfoKVString_Internal( this, key, defaultValue ) + } + + function CPlayer::GetUserInfoInt( key, defaultValue = 0 ) + { + return GetUserInfoKVInt_Internal( this, key, defaultValue ) + } + + function CPlayer::GetUserInfoFloat( key, defaultValue = 0 ) + { + return GetUserInfoKVFloat_Internal( this, key, defaultValue ) + } + + function CPlayer::GetUserInfoBool( key, defaultValue = false ) + { + return GetUserInfoKVBool_Internal( this, key, defaultValue ) + } } void function PlayerDropsScriptedItems( entity player ) -- cgit v1.2.3