Survival - Play Mining Emmiter parameters

marceloSRmarceloSR REGISTERED Posts: 47 Seed
edited November 2015 in Mods

In the function Survival:PlayMiningEmitter( voxel, pos, prevMat, newMat, schem, player ) does the variable player reference the actual local player doing the action?
When I do the checks:
if not player then
local pawn = player:NKGetPawn()
if not pawn then

None of them return a nil value. However, when I try to get the player name ( pawn:NKGetPlayerName() ) it returns me a nil value. I don`t understand why. Does not every pawn has a name associated with it? Or can a pawn be different than a LocalWorldPlayer ?

Thank you,


  • johnycilohoklajohnycilohokla REGISTERED Posts: 283 Seed
    The NKGetPlayerName function is exposed on WorldPlayer, in this case it would be the player variable.
    You can also get the name of the player from pawn(BasePlayer/LocalPlayer) using pawn.m_playerName
    My Blog
      yt.png  t.png  
  • marceloSRmarceloSR REGISTERED Posts: 47 Seed
    Hmm ok, I managed to get the name from the player itself.
    I always confuse the LocalPlayer with the pawn...

    Thank you Johny!
Sign In or Register to comment.