#define SAMP_PLAYER_MAX 102

#define SAMP_VERSION_1 0x01
#define SAMP_VERSION_2 0x02
#define SAMP_VERSION_UNKNOWN 0x00

struct samp_player_info
{
   #pragma pack(1)
   struct actor_info    **actor;       /* 0 - actor pointer */
   struct vehicle_info  **vehicle;     /* 4 - vehicle pointer (NULL if in a vehicle) */
   uint8_t        color_id;            /* 8 - color id */
   uint8_t        __unknown_9;         /* 9 - set this to 1, and the player warps away (wtf) */
   uint8_t        __unknown_10;        /* 10 - set this to 0, and the player dissapears + this entire struct is cleared */
   uint8_t        __unknown_11[13];    /* 11 */
   float          actor_pos[3];        /* 24 - position */
   uint8_t        __unknown_36[38];    /* 36 - (direction, health?) */
   float          vehicle_pos[3];      /* 74 - position */
   float          vehicle_dir[3];      /* 86 - direction vector */
   float          vehicle_hitpoints;   /* 98 - health */
   uint8_t        __unknown_104[52];   /* 104 */
   float          actor_hitpoints;     /* 154 */
   float          actor_armor;         /* 158 */
};

struct samp_player_list
{
   #pragma pack(1)
   int      alloc_map[SAMP_PLAYER_MAX];
   void     *__unknown_samp_ptr;
   uint8_t  self_id;
   struct samp_player_info *player_info[SAMP_PLAYER_MAX];
   char     self_name[25];
   char     name[SAMP_PLAYER_MAX][25];
   int      self_score;
   int      score[SAMP_PLAYER_MAX];
   int      self_ping;
   int      ping[SAMP_PLAYER_MAX];
};

struct samp_chat_entry
{
   #pragma pack(1)
   int type;     /* 0 - no text, 1 - text + prefix, 2 - text, 3 - same as 2? */
   char text[129];
   char prefix[25];
   D3DCOLOR text_color;
   D3DCOLOR prefix_color;
};

struct samp_chat_info
{
   #pragma pack(1)
   int enabled;
   struct samp_chat_entry chat_entry[10];
};

struct samp_chat_input_info
{
   #pragma pack(1)
   uint8_t __unknown_0[65];
   int enabled;
   char *text;
};

struct samp_kill_entry
{
   #pragma pack(1)
   char killer[25];
   char victim[25];
   D3DCOLOR killer_color;
   D3DCOLOR victim_color;
   uint8_t type;
};

struct samp_kill_info
{
   #pragma pack(1)
   int enabled;
   struct samp_kill_entry kill_entry[5];
};

int samp_get_version(void);
int samp_name_tags_status(int enabled);
D3DCOLOR samp_color_get(int id);
struct samp_player_list *samp_player_list_get(void);
struct samp_chat_info *samp_chat_info_get(void);
int samp_is_chatting(void);
struct samp_chat_input_info * samp_chat_input_info_get(void);
struct samp_kill_info *samp_kill_info_get(void);
int samp_player_count(void);
int samp_players_list(void);
const char *samp_player_name_get(int id);
struct actor_info *samp_player_actor_info_get(int id);
int samp_player_get_id_by_actor(struct actor_info *info);
int samp_player_position_get(int id, float pos[3]);
