2004-01-31 23:56:22 +03:00
|
|
|
/* Fun functions
|
2004-02-15 05:29:51 +03:00
|
|
|
*
|
|
|
|
* (c) 2004, the AMX Mod X Development Team
|
|
|
|
*
|
|
|
|
* This file is provided as is (no warranties).
|
|
|
|
*/
|
2004-01-31 23:56:22 +03:00
|
|
|
|
2004-02-15 05:29:51 +03:00
|
|
|
/* (untested) Returns 1 if receiver hears sender via voice communication. */
|
|
|
|
native get_client_listen(receiver, sender);
|
2004-01-31 23:56:22 +03:00
|
|
|
|
2004-02-15 05:29:51 +03:00
|
|
|
/* (untested) Sets who can listen who. Function returns 0 if for some reasons this setting can't be done. */
|
|
|
|
native set_client_listen(receiver, sender, listen);
|
2004-01-31 23:56:22 +03:00
|
|
|
|
|
|
|
/* Sets player godmode. If you want to disable godmode set only first parameter. */
|
2004-02-15 05:29:51 +03:00
|
|
|
native set_user_godmode(index, godmode = 0);
|
2004-01-31 23:56:22 +03:00
|
|
|
|
2004-02-15 05:29:51 +03:00
|
|
|
/* (untested) Returns 1 if godmode is set. */
|
2004-01-31 23:56:22 +03:00
|
|
|
native get_user_godmode(index);
|
|
|
|
|
2004-02-15 05:29:51 +03:00
|
|
|
/* Sets player frags. Doesn't autoupdate scoreboard, as Olo's version didn't. Fix? */
|
|
|
|
native set_user_frags(index, frags);
|
2004-01-31 23:56:22 +03:00
|
|
|
|
|
|
|
/* Sets player armor. */
|
2004-02-15 05:29:51 +03:00
|
|
|
native set_user_armor(index, armor);
|
2004-01-31 23:56:22 +03:00
|
|
|
|
|
|
|
/* Sets player health. */
|
|
|
|
native set_user_health(index, health);
|
|
|
|
|
|
|
|
/* Move player to origin. */
|
|
|
|
native set_user_origin(index, origin[3]);
|
|
|
|
|
|
|
|
/* Sets player rendering mode. */
|
2004-02-15 05:29:51 +03:00
|
|
|
native set_user_rendering(index, fx = kRenderFxNone, r = 255, g = 255, b = 255, render = kRenderNormal, amount = 16);
|
2004-01-31 23:56:22 +03:00
|
|
|
|
|
|
|
/* Gives item to player, name of item can start
|
2004-02-15 05:29:51 +03:00
|
|
|
* with weapon_, ammo_ and item_. This event
|
|
|
|
* is announced with proper message to all players. */
|
|
|
|
native give_item(index, const item[]);
|
|
|
|
|
|
|
|
/* (not yet implemented, don't know how to use native)
|
|
|
|
* 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_hitzones(body = 255);
|
|
|
|
|
|
|
|
/* backwards compatibility */
|
|
|
|
stock set_user_hitzones(index=0,target=0,body=255)
|
|
|
|
return set_hitzones(body)
|
|
|
|
|
|
|
|
/* Get current hitzones. */
|
|
|
|
native get_hitzones();
|
|
|
|
|
|
|
|
/* backwards compatibility */
|
|
|
|
stock get_user_hitzones(index,target)
|
|
|
|
return get_hitzones()
|
2004-01-31 23:56:22 +03:00
|
|
|
|
|
|
|
/* Sets users max. speed. */
|
2004-02-15 05:29:51 +03:00
|
|
|
native set_user_maxspeed(index, Float:speed = -1.0);
|
2004-01-31 23:56:22 +03:00
|
|
|
|
|
|
|
/* Returns users max. speed. */
|
|
|
|
native Float:get_user_maxspeed(index);
|
|
|
|
|
|
|
|
/* Sets users gravity. */
|
2004-02-15 05:29:51 +03:00
|
|
|
native set_user_gravity(index, Float:gravity = 1.0);
|
2004-01-31 23:56:22 +03:00
|
|
|
|
|
|
|
/* Returns users gravity. */
|
2004-02-15 05:29:51 +03:00
|
|
|
native get_user_gravity(index);
|
2004-01-31 23:56:22 +03:00
|
|
|
|
|
|
|
/* Gives money to user. */
|
2004-02-15 05:29:51 +03:00
|
|
|
native set_user_money(index, money, flash = 1);
|
2004-01-31 23:56:22 +03:00
|
|
|
|
|
|
|
/* Returns users money. */
|
2004-02-08 14:31:54 +03:00
|
|
|
native get_user_money(index);
|
2004-02-15 05:29:51 +03:00
|
|
|
|
|
|
|
/* Spawns entity. */
|
|
|
|
native spawn(index);
|
|
|
|
|
|
|
|
/* backwards compatibility */
|
|
|
|
stock user_spawn(index)
|
|
|
|
return spawn(index)
|
|
|
|
|
|
|
|
/* CS: Set deaths(should be removed to CS module later) (doesn't update info right away? fix later?) */
|
2004-02-16 16:48:00 +03:00
|
|
|
native set_user_deaths_cs(index, newdeaths);
|
|
|
|
|
|
|
|
/* 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);
|