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

Annotation of /include/dodfun.inc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 17 - (view) (download)

1 : ian 1 /* DoDFun functions
2 :     *
3 :     * (c) 2004-2005, SidLuke
4 :     * This file is provided as is (no warranties).
5 :     */
6 :    
7 :     #if defined _dodfun_included
8 :     #endinput
9 :     #endif
10 :     #define _dodfun_included
11 :    
12 :     #include <dodconst>
13 :    
14 :     #if AMXX_VERSION_NUM >= 175
15 :     #pragma reqlib dodfun
16 :     #if !defined AMXMODX_NOAUTOLOAD
17 :     #pragma loadlib dodfun
18 :     #endif
19 :     #else
20 :     #pragma library dodfun
21 :     #endif
22 :    
23 :     /* Function is called after grenade throw */
24 :     forward grenade_throw(index,greindex,wId);
25 :    
26 : ian 17 /* Function is called after a rocket is shot */
27 :     forward rocket_shoot(index,rocketindex,wId);
28 :    
29 : ian 1 /* Example: for full stamina use dod_player_stamina(1,STAMINA_SET,100,100) */
30 :     /* value is from 0 - 100 */
31 :     native dod_set_stamina(index,set=STAMINA_SET,minvalue=0,maxvalue=100);
32 :    
33 :     /* Sets fuse for grenades. Valid number is from 0.1-20.0 */
34 :     /* types : new or preprimed */
35 :     native dod_set_fuse(index,set=FUSE_SET,Float:newFuse=5.0, Type=FT_NEW);
36 :    
37 :     /* Sets player class */
38 :     native dod_set_user_class(index,classId);
39 :    
40 :     /* Sets player team and random class. Don't work for spectators. */
41 :     native dod_set_user_team(index,teamId,refresh=1);
42 :    
43 :     /* Returns next player class. Usefull is player is using random class */
44 :     native dod_get_next_class(index);
45 :    
46 :     /* Returns 1 if player choose random class */
47 :     native dod_is_randomclass(index);
48 :    
49 :     /* Returns player deaths */
50 :     native dod_get_pl_deaths(index);
51 :    
52 : ian 17 /* Sets player deaths.
53 :     * Note if you opt to refresh the scoreboard, it
54 :     * will make the player appear as "DEAD" in the scoreboard.
55 :     */
56 : ian 1 native dod_set_pl_deaths(index,value,refresh=1);
57 :    
58 :     /* Returns player deaths. */
59 :     native dod_get_user_kills(index);
60 :    
61 :     /* Sets player kills. */
62 :     native dod_set_user_kills(index,value,refresh=1);
63 :    
64 :     /* Sets player score. */
65 :     native dod_set_user_score(index,value,refresh=1);
66 :    
67 :     /* Sets new team name for this player */
68 :     native dod_set_pl_teamname(index,const szName[]);
69 :    
70 :     /* Gets player team name */
71 :     native dod_get_pl_teamname(index,szName[],len);
72 :    
73 :     /* Returns 1 is player weapon is deployed (bar,mg..) */
74 :     native dod_is_deployed(index);
75 :    
76 :     /*Sets the ammo of the specified weapon entity id */
77 :     native dod_set_user_ammo(index,wid,value);
78 :    
79 :     /*Gets the ammo of the specified weapon entity id */
80 :     native dod_get_user_ammo(index,wid);
81 :    
82 :     /* called after first InitObj */
83 :     forward controlpoints_init();
84 :    
85 :     enum CP_VALUE {
86 :     CP_edict = 1, // read only
87 :     CP_area, // read only
88 :     CP_index, // read only
89 :     CP_owner,
90 :     CP_default_owner,
91 :     CP_visible, // reinit after change
92 :     CP_icon_neutral, // reinit after change
93 :     CP_icon_allies, // reinit after change
94 :     CP_icon_axis, // reinit after change
95 :     CP_origin_x, // reinit after change
96 :     CP_origin_y, // reinit after change
97 :    
98 :     CP_can_touch,
99 :     CP_pointvalue,
100 :    
101 :     CP_points_for_cap,
102 :     CP_team_points,
103 :    
104 :     CP_model_body_neutral,
105 :     CP_model_body_allies,
106 :     CP_model_body_axis,
107 :    
108 :     // strings
109 :     CP_name,
110 :     CP_reset_capsound,
111 :     CP_allies_capsound,
112 :     CP_axis_capsound,
113 :     CP_targetname,
114 :    
115 :     CP_model_neutral,
116 :     CP_model_allies,
117 :     CP_model_axis,
118 :     };
119 :    
120 :     /* returns number of objectives */
121 :     native objectives_get_num();
122 :    
123 :     /* use this function to update client(s) hud. You need to do this sometimes. Check CP_VALUE comments.
124 :     if player is 0 , all clients will get this message */
125 :     native objectives_reinit( player=0 );
126 :    
127 :     /* use this function to get info about specified control point */
128 :     native objective_get_data( index, CP_VALUE:key, szValue[]="", len=0 );
129 :    
130 :     /* use this function to change control point's data */
131 :     native objective_set_data( index, CP_VALUE:key , iValue=-1, const szValue[]="" );
132 :    
133 :     enum CA_VALUE {
134 :     CA_edict = 1,
135 :     CA_allies_numcap,
136 :     CA_axis_numcap,
137 :     CA_timetocap,
138 :     CA_can_cap,
139 :    
140 :     // strings
141 :     CA_target,
142 :     CA_sprite,
143 :     };
144 :    
145 :     /* use this function to get info about specified control point's area */
146 :     native area_get_data( index, CA_VALUE:key, szValue[]="", len=0 );
147 :    
148 :     /* use this function to change control point's area data */
149 :     native area_set_data( index, CA_VALUE:key , iValue=-1, const szValue[]="" );

Contact
ViewVC Help
Powered by ViewVC 1.0.4