Solved Checking if player is an administrator?
Discussion in 'Rust Development' started by cokll, Nov 17, 2016.
-
Code:
player.IsAdmin()
-
I tried, the error can not be used
PlayerSession sessionCode:A local variable `player' cannot be used before it is declared
Code:The type or namespace name `PlayerSession' could not be found. Are you missing an assembly reference?
-
Post where you're calling it.
-
I solved it, it should be
[DOUBLEPOST=1479383390][/DOUBLEPOST]Code:BasePlayer session
Thanks -
Wulf Community Admin
Looks like you're mixing Rust logic with Hurtworld logic. BasePlayer is for Rust, PlayerSession is for Hurtworld. If you for some reason named "player" as "session", then you'd need to use "session.IsAdmin()" instead.
