/* Fun functions
 *
 * (c) 2002-2005, OLO
 * This file is provided as is (no warranties).
 */

#if defined _fun_included
  #endinput
#endif
#define _fun_included


/* Sets player godmode. If you want to disable godmode set only first parameter. */
native set_user_godmode(index, godmode=0);

/* Returns 1 if godmode is set. */
native get_user_godmode(index);

/* Sets player noclip. If you want to disable noclip set only first parameter. */
native set_user_noclip(index, noclip=0);

/* Returns 1 if noclip is set. */
native get_user_noclip(index);

/* Sets player frags. */
native set_user_frags(index, frags);

/* Sets player armor. */
native set_user_armor(index, armor);

/* Sets player health. */
native set_user_health(index, health);

/* Moves player to origin. */
native set_user_origin(index, origin[3]);

/* Sets player rendering mode. */
native set_user_rendering(index, fx=kRenderFxNone, r=255, g=255, b=255, render=kRenderNormal, amount=16);

/* Gives item to player, name of item can start
* with weapon_, ammo_ and item_. */
native give_item(index, const item[]);

/* Sets hit zones for player.
* Parts of body are as bits:
* 2   - head
* 4   - chest
* 8   - stomach
* 16  - left arm
* 32  - right arm
* 64  - left leg
* 128 - right leg */
native set_user_hitzones(index=0, target=0, body=255);

/* Returns hit zones for player. 
* Index and target can be set to 0 (all players).
* In that case the native will return -1 if the hitzones are not all the same. */
native get_user_hitzones(index, target);

/* Makes that player spawn. */
native user_spawn(index);

/* Gives player silent footsteps. If you want to return footsteps to normal set only first parameter. */
native set_user_footsteps(index, set=0);

/* Sets player max. speed. */
native set_user_maxspeed(index, Float:speed=-1.0);

/* Returns player max. speed. */
native Float:get_user_maxspeed(index);

/* Sets player gravity. */
native set_user_gravity(index, Float:gravity=1.0);

/* Returns player gravity. */
native Float:get_user_gravity(index);

/* Gives money to player. */
native set_user_money(index, money, flash=1);

/* Returns player money. */
native get_user_money(index);

/* Sets player deaths. CS ONLY. */
native set_user_deaths_cs(index, deaths);

/* Returns player deaths. CS ONLY. */
native get_user_deaths_cs(index);

/* Sets player team. CS ONLY. 
* If model is set (player has to be alive and respawn set to 0), 
* it will only stay until the end of the round or player's death. */
native set_user_team_cs(index, team, model[]="", respawn=0, updatescoreboard=1);

/* Returns player team. CS ONLY. */
native get_user_team_cs(index);
