2014-08-04 12:12:15 +00:00
|
|
|
// vim: set ts=4 sw=4 tw=99 noet:
|
|
|
|
//
|
|
|
|
// AMX Mod X, based on AMX Mod by Aleksander Naszko ("OLO").
|
|
|
|
// Copyright (C) The AMX Mod X Development Team.
|
|
|
|
//
|
|
|
|
// This software is licensed under the GNU General Public License, version 3 or higher.
|
|
|
|
// Additional exceptions apply. For full license details, see LICENSE.txt or visit:
|
|
|
|
// https://alliedmods.net/amxmodx-license
|
|
|
|
|
|
|
|
//
|
|
|
|
// Fun Functions
|
|
|
|
//
|
2004-01-31 20:56:22 +00:00
|
|
|
|
2004-03-18 01:32:39 +00:00
|
|
|
#if defined _fun_included
|
2015-02-24 22:56:17 +00:00
|
|
|
#endinput
|
2004-03-18 01:32:39 +00:00
|
|
|
#endif
|
|
|
|
#define _fun_included
|
|
|
|
|
2015-02-24 22:56:17 +00:00
|
|
|
#pragma reqlib fun
|
|
|
|
#if !defined AMXMODX_NOAUTOLOAD
|
|
|
|
#pragma loadlib fun
|
2006-05-10 10:42:49 +00:00
|
|
|
#endif
|
2005-07-15 19:05:31 +00:00
|
|
|
|
2004-03-05 19:30:29 +00:00
|
|
|
/* Returns 1 if receiver hears sender via voice communication. */
|
2004-02-15 02:29:51 +00:00
|
|
|
native get_client_listen(receiver, sender);
|
2004-01-31 20:56:22 +00:00
|
|
|
|
2004-03-05 19:30:29 +00:00
|
|
|
/* Sets who can listen who. Function returns 0
|
|
|
|
* if for some reasons this setting can't be done. */
|
2004-02-15 02:29:51 +00:00
|
|
|
native set_client_listen(receiver, sender, listen);
|
2004-01-31 20:56:22 +00:00
|
|
|
|
|
|
|
/* Sets player godmode. If you want to disable godmode set only first parameter. */
|
2004-02-15 02:29:51 +00:00
|
|
|
native set_user_godmode(index, godmode = 0);
|
2004-01-31 20:56:22 +00:00
|
|
|
|
2004-03-05 19:30:29 +00:00
|
|
|
/* Returns 1 if godmode is set. */
|
2004-01-31 20:56:22 +00:00
|
|
|
native get_user_godmode(index);
|
|
|
|
|
|
|
|
/* Sets player armor. */
|
2004-02-15 02:29:51 +00:00
|
|
|
native set_user_armor(index, armor);
|
2004-01-31 20:56:22 +00:00
|
|
|
|
|
|
|
/* Sets player health. */
|
|
|
|
native set_user_health(index, health);
|
|
|
|
|
|
|
|
/* Move player to origin. */
|
2007-01-26 05:56:10 +00:00
|
|
|
native set_user_origin(index, const origin[3]);
|
2004-01-31 20:56:22 +00:00
|
|
|
|
|
|
|
/* Sets player rendering mode. */
|
2013-08-05 17:00:51 +00:00
|
|
|
native set_user_rendering(index, fx = kRenderFxNone, r = 0, g = 0, b = 0, render = kRenderNormal, amount = 0);
|
2004-01-31 20:56:22 +00:00
|
|
|
|
|
|
|
/* Gives item to player, name of item can start
|
2004-03-10 22:32:10 +00:00
|
|
|
* with weapon_, ammo_ and item_. This event
|
|
|
|
* is announced with proper message to all players. */
|
2004-02-15 02:29:51 +00:00
|
|
|
native give_item(index, const item[]);
|
|
|
|
|
2004-03-10 22:32:10 +00:00
|
|
|
/* Sets hit zones for player.
|
|
|
|
* Parts of body are as bits:
|
|
|
|
* 1 - generic
|
|
|
|
* 2 - head
|
|
|
|
* 4 - chest
|
|
|
|
* 8 - stomach
|
|
|
|
* 16 - left arm
|
|
|
|
* 32 - right arm
|
|
|
|
* 64 - left leg
|
2004-04-27 10:08:46 +00:00
|
|
|
* 128 - right leg */
|
2004-03-10 21:58:47 +00:00
|
|
|
native set_user_hitzones(index = 0, target = 0, body = 255);
|
2004-02-15 02:29:51 +00:00
|
|
|
|
2004-04-27 10:08:46 +00:00
|
|
|
/* Get user hitzones. */
|
2004-03-10 22:32:10 +00:00
|
|
|
native get_user_hitzones(index, target);
|
2004-02-15 02:29:51 +00:00
|
|
|
|
2004-01-31 20:56:22 +00:00
|
|
|
/* Sets users max. speed. */
|
2004-02-15 02:29:51 +00:00
|
|
|
native set_user_maxspeed(index, Float:speed = -1.0);
|
2004-01-31 20:56:22 +00:00
|
|
|
|
|
|
|
/* Returns users max. speed. */
|
|
|
|
native Float:get_user_maxspeed(index);
|
|
|
|
|
|
|
|
/* Sets users gravity. */
|
2004-02-15 02:29:51 +00:00
|
|
|
native set_user_gravity(index, Float:gravity = 1.0);
|
2004-01-31 20:56:22 +00:00
|
|
|
|
|
|
|
/* Returns users gravity. */
|
2005-08-30 07:00:49 +00:00
|
|
|
native Float:get_user_gravity(index);
|
2004-01-31 20:56:22 +00:00
|
|
|
|
2004-02-15 02:29:51 +00:00
|
|
|
/* Spawns entity. */
|
|
|
|
native spawn(index);
|
|
|
|
|
2004-02-16 13:48:00 +00:00
|
|
|
/* 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);
|
2004-02-18 11:10:54 +00:00
|
|
|
|
2006-02-01 13:04:24 +00:00
|
|
|
/* Returns 1 if player has silent footsteps, 0 if footsteps are set to normal */
|
|
|
|
native get_user_footsteps(index);
|
|
|
|
|
2004-02-18 11:10:54 +00:00
|
|
|
/* Gives player silent footsteps.
|
2004-03-05 19:30:29 +00:00
|
|
|
* if set = 0 it will return footsteps to normal */
|
2004-03-18 01:32:39 +00:00
|
|
|
native set_user_footsteps(id, set = 1);
|
2004-06-21 09:16:14 +00:00
|
|
|
|
|
|
|
/* Strips all weapons from user. */
|
2005-04-19 14:49:16 +00:00
|
|
|
native strip_user_weapons(index);
|
|
|
|
|
|
|
|
/* Sets player frags. */
|
|
|
|
native set_user_frags(index, frags);
|