Skip to content

function getPlayerIdByPtr (client-side)

Available since version: 0.2.1

This function will get player id from npc pointer.

Declaration

int getPlayerIdByPtr(userpointer npc)

Parameters

  • userpointer npc: the raw pointer to npc object.

Returns int

the player id, if npc isn't managed by the g2o, it wil return -1.