[Half-Life AMXX] / include / fun.inc Repository:
ViewVC logotype

Annotation of /include/fun.inc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (view) (download)

1 : ian 1 /* Fun functions
2 :     *
3 :     * by the AMX Mod X Development Team
4 :     *
5 :     * This file is provided as is (no warranties).
6 :     */
7 :    
8 :     #if defined _fun_included
9 :     #endinput
10 :     #endif
11 :     #define _fun_included
12 :    
13 :     #if AMXX_VERSION_NUM >= 175
14 :     #pragma reqlib fun
15 :     #if !defined AMXMODX_NOAUTOLOAD
16 :     #pragma loadlib fun
17 :     #endif
18 :     #else
19 :     #pragma library fun
20 :     #endif
21 :    
22 :     /* Returns 1 if receiver hears sender via voice communication. */
23 :     native get_client_listen(receiver, sender);
24 :    
25 :     /* Sets who can listen who. Function returns 0
26 :     * if for some reasons this setting can't be done. */
27 :     native set_client_listen(receiver, sender, listen);
28 :    
29 :     /* Sets player godmode. If you want to disable godmode set only first parameter. */
30 :     native set_user_godmode(index, godmode = 0);
31 :    
32 :     /* Returns 1 if godmode is set. */
33 :     native get_user_godmode(index);
34 :    
35 :     /* Sets player armor. */
36 :     native set_user_armor(index, armor);
37 :    
38 :     /* Sets player health. */
39 :     native set_user_health(index, health);
40 :    
41 :     /* Move player to origin. */
42 :     native set_user_origin(index, const origin[3]);
43 :    
44 :     /* Sets player rendering mode. */
45 :     native set_user_rendering(index, fx = kRenderFxNone, r = 255, g = 255, b = 255, render = kRenderNormal, amount = 16);
46 :    
47 :     /* Gives item to player, name of item can start
48 :     * with weapon_, ammo_ and item_. This event
49 :     * is announced with proper message to all players. */
50 :     native give_item(index, const item[]);
51 :    
52 :     /* Sets hit zones for player.
53 :     * Parts of body are as bits:
54 :     * 1 - generic
55 :     * 2 - head
56 :     * 4 - chest
57 :     * 8 - stomach
58 :     * 16 - left arm
59 :     * 32 - right arm
60 :     * 64 - left leg
61 :     * 128 - right leg */
62 :     native set_user_hitzones(index = 0, target = 0, body = 255);
63 :    
64 :     /* Get user hitzones. */
65 :     native get_user_hitzones(index, target);
66 :    
67 :     /* Sets users max. speed. */
68 :     native set_user_maxspeed(index, Float:speed = -1.0);
69 :    
70 :     /* Returns users max. speed. */
71 :     native Float:get_user_maxspeed(index);
72 :    
73 :     /* Sets users gravity. */
74 :     native set_user_gravity(index, Float:gravity = 1.0);
75 :    
76 :     /* Returns users gravity. */
77 :     native Float:get_user_gravity(index);
78 :    
79 :     /* Spawns entity. */
80 :     native spawn(index);
81 :    
82 :     /* Sets player noclip. If you want to disable noclip set only first parameter. */
83 :     native set_user_noclip(index, noclip = 0);
84 :    
85 :     /* Returns 1 if noclip is set. */
86 :     native get_user_noclip(index);
87 :    
88 :     /* Returns 1 if player has silent footsteps, 0 if footsteps are set to normal */
89 :     native get_user_footsteps(index);
90 :    
91 :     /* Gives player silent footsteps.
92 :     * if set = 0 it will return footsteps to normal */
93 :     native set_user_footsteps(id, set = 1);
94 :    
95 :     /* Strips all weapons from user. */
96 :     native strip_user_weapons(index);
97 :    
98 :     /* Sets player frags. */
99 :     native set_user_frags(index, frags);

Contact
ViewVC Help
Powered by ViewVC 1.0.4