/*
 * Copyright (c) 2002, 2003, 2004 - Aleksander Naszko, Julien Laurent
 *
 *    This file is part of AMX Mod.
 *
 *    AMX Mod is free software; you can redistribute it and/or modify it
 *    under the terms of the GNU General Public License as published by the
 *    Free Software Foundation; either version 2 of the License, or (at
 *    your option) any later version.
 *
 *    AMX Mod is distributed in the hope that it will be useful, but
 *    WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *    General Public License for more details.
 *
 *    You should have received a copy of the GNU General Public License
 *    along with AMX Mod; if not, write to the Free Software Foundation,
 *    Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 *    In addition, as a special exception, the author gives permission to
 *    link the code of this program with the Half-Life Game Engine ("HL
 *    Engine") and Modified Game Libraries ("MODs") developed by Valve,
 *    L.L.C ("Valve").  You must obey the GNU General Public License in all
 *    respects for all of the code used other than the HL Engine and MODs
 *    from Valve.  If you modify this file, you may extend this exception
 *    to your version of the file, but you are not obligated to do so.  If
 *    you do not wish to do so, delete this exception statement from your
 *    version.
 *
 *    Version: $Id: fun.inc,v 1.1 2004/08/11 03:09:29 djeyl Exp $
 */

#if defined _fun_included
	#endinput
#endif
#define _fun_included

/* Sets who can listen who. Function returns 0
* if for some reasons this setting can't be done. */
native set_user_listening(receiver,sender,listen);

/* Returns 1 if receiver hears sender via voice communication. */
native get_user_listening(receiver,sender);

/* 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);

/* Move 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_. This event
* is announced with proper message to all players. */
native give_item(index,const item[]);

/* Sets hit zones for player. This event is announced
* with proper message to all players.
* 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. */
native get_user_hitzones(index,target);

/* Makes that player spawns. This event is announced
* with proper message to all players. */
native user_spawn(index);

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

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

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

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

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

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