Skip to content

function getPlayerType (client-side)

Available since version: 0.1.1

Note

Return value can also be -1 if player isn't connected or when npc isn't created.

This function will get the player/npc type.

The possible return values are:
OBJ_PLAYER, OBJ_LOCALPLAYER, OBJ_NPC, OBJ_LOCALNPC.

Declaration

int getPlayerType(int id)

Parameters

  • int id: the player id.

Returns int

the player type.