Hello,
Is it possible to convert BasePlayer to IPlayer?
I need this for using: player.BelongsToGroup("test")
[DOUBLEPOST=1523693370][/DOUBLEPOST]Or using permission.UserHasGroup("userIDString", "group") will be better?
Solved Converting BasePlayer to IPlayer?
Discussion in 'Rust Development' started by xMrVizzy, Apr 14, 2018.
-
IPlayer can not be converted from the type BasePlayer, however, Oxide injects the users corresponding IPlayer in to the BasePlayer class (player.IPlayer)
If you only want to access the IPlayer class to see if the player is in a specific group then permission.UserHasGroup(player.UserIDString, "groupname") does the same thing else use player.IPlayer.BelongsToGroup("groupname"); -
Yes, thanks