mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2025-01-12 06:48:04 +03:00
Merged in new ts includes
This commit is contained in:
parent
b271b01b13
commit
4dad81af30
@ -1,6 +1,6 @@
|
|||||||
/* TSXMod functions
|
/* TSFUN constants
|
||||||
*
|
*
|
||||||
* (c) 2004, SidLuke
|
* (c) 2005, Suzuka
|
||||||
* This file is provided as is (no warranties).
|
* This file is provided as is (no warranties).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
#define TSMAX_WEAPONS 44 // 37 + throwing knife + brekable + 5 custom weapon slots
|
#define TSMAX_WEAPONS 44 // 37 + throwing knife + brekable + 5 custom weapon slots
|
||||||
|
|
||||||
|
#define TSPWUP_NONE 0
|
||||||
#define TSPWUP_RANDOM 0
|
#define TSPWUP_RANDOM 0
|
||||||
#define TSPWUP_SLOWMO 1
|
#define TSPWUP_SLOWMO 1
|
||||||
#define TSPWUP_INFAMMO 2
|
#define TSPWUP_INFAMMO 2
|
||||||
@ -34,7 +35,23 @@
|
|||||||
#define TSA_SILENCER 1
|
#define TSA_SILENCER 1
|
||||||
#define TSA_LASERSIGHT 2
|
#define TSA_LASERSIGHT 2
|
||||||
#define TSA_FLASHLIGHT 4
|
#define TSA_FLASHLIGHT 4
|
||||||
#define TSA_SCOPE 8
|
#define TSA_SCOPE 8
|
||||||
|
|
||||||
|
#define TSMSG_NORMAL 6
|
||||||
|
#define TSMSG_WAITING 11
|
||||||
|
#define TSMSG_DEAD 1
|
||||||
|
#define TSMSG_KILLER 2
|
||||||
|
#define TSMSG_DEMOLITION 3
|
||||||
|
#define TSMSG_SPECIALIST 4
|
||||||
|
#define TSMSG_UNSTOPPABLE 5
|
||||||
|
#define TSMSG_THEONE 10
|
||||||
|
|
||||||
|
#define STUNT_NONE 0
|
||||||
|
#define STUNT_DUCK 1
|
||||||
|
#define STUNT_ROLL 2
|
||||||
|
#define STUNT_DIVE 3
|
||||||
|
#define STUNT_GETUP 4
|
||||||
|
#define STUNT_FLIP 5
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
TSW_GLOCK18 = 1,
|
TSW_GLOCK18 = 1,
|
||||||
|
@ -1,46 +1,90 @@
|
|||||||
/* TSFUN functions
|
/* TSFUN
|
||||||
*
|
*
|
||||||
* (c) 2004, Twilight Suzuka
|
* (c) 2005, Twilight Suzuka
|
||||||
* This file is provided as is (no warranties).
|
* This file is provided as is (no warranties).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined _tsfun_included
|
#if defined _tsxfun_included
|
||||||
#endinput
|
#endinput
|
||||||
#endif
|
#endif
|
||||||
#define _tsfun_included
|
#define _tsxfun_included
|
||||||
|
|
||||||
#include <tsconst>
|
#include <tsconst>
|
||||||
|
|
||||||
|
/************* Shared Natives Start ********************************/
|
||||||
|
|
||||||
|
/* Forward types */
|
||||||
|
enum {
|
||||||
|
XMF_DAMAGE = 0,
|
||||||
|
XMF_DEATH,
|
||||||
|
}
|
||||||
|
|
||||||
#pragma library tsfun
|
#pragma library tsfun
|
||||||
|
|
||||||
|
/* Function is called after player to player attacks ,
|
||||||
|
* if players were damaged by teammate TA is set to 1 */
|
||||||
|
forward client_damage(attacker,victim,damage,wpnindex,hitplace,TA);
|
||||||
|
|
||||||
|
/* Function is called after player death ,
|
||||||
|
* if player was killed by teammate TK is set to 1 */
|
||||||
|
forward client_death(killer,victim,wpnindex,hitplace,TK);
|
||||||
|
|
||||||
|
/************* Shared Natives End ********************************/
|
||||||
|
|
||||||
/* Function is called just before a kung foo attack is done,
|
/* Function is called just before a kung foo attack is done,
|
||||||
* damage and time length may be altered with natives.
|
* damage and time length may be altered with natives.
|
||||||
* Return PLUGIN_HANDLED to stop attack. */
|
* Return PLUGIN_HANDLED to stop attack. */
|
||||||
forward KungFoo_Attack(id,Float:time,Float:damage);
|
forward Melee_Attack(id,Float:time,Float:damage);
|
||||||
|
|
||||||
|
// Returns when someone stunts, after they do it.
|
||||||
|
forward client_stunt(id,stunttype);
|
||||||
|
|
||||||
/* Function is called when powerups are ran,
|
/* Function is called when powerups are ran,
|
||||||
* Returns value of powerup. Use TSPWUP_*'s
|
* Returns value of powerup. Use TSPWUP_*'s
|
||||||
* to find exactly which one it is. */
|
* to find exactly which one it is. */
|
||||||
forward client_powerup(id,powerup);
|
forward client_powerup(id,powerup);
|
||||||
|
|
||||||
|
/* weapon logname to weapon name convertion */
|
||||||
|
native ts_wpnlogtoname(logname[],name[],len);
|
||||||
|
|
||||||
|
/* weapon logname to weapon index convertion */
|
||||||
|
native ts_wpnlogtoid(logname[]);
|
||||||
|
|
||||||
native Float:ts_getusertime( index );
|
native Float:ts_getusertime( index );
|
||||||
native ts_setusertime( index, Float:time );
|
native ts_setusertime( index, Float:time );
|
||||||
|
|
||||||
|
native ts_getusercash( index );
|
||||||
|
native ts_setusercash( index, money );
|
||||||
|
|
||||||
native ts_getuserslots( index );
|
native ts_getuserslots( index );
|
||||||
native ts_setuserslots( index, slots );
|
native ts_setuserslots( index, slots );
|
||||||
|
|
||||||
stock ts_has_stored_superjump(id) return (ts_getuseritems(id) & TSITEM_SUPERJUMP)
|
native ts_getuserstate( index )
|
||||||
stock ts_has_stored_kungfoo(id) return (ts_getuseritems(id) & TSITEM_KUNGFU)
|
native ts_getuserwpn( index,&ammo,&clip,&mode,&extra );
|
||||||
stock ts_has_stored_slowmo(id) return (ts_getuserpwup(id) == TSPWUP_SLOWMO)
|
native ts_getuserspace( index );
|
||||||
|
|
||||||
stock ts_has_stored_infammo(id) return (ts_getuserpwup(id) == TSPWUP_INFAMMO)
|
native ts_getuserkillflags(killer);
|
||||||
stock ts_has_stored_slowpause(id) return (ts_getuserpwup(id) == TSPWUP_SLOWPAUSE)
|
native ts_getkillingstreak( index );
|
||||||
stock ts_has_stored_dfirerate(id) return (ts_getuserpwup(id) == TSPWUP_DFIRERATE)
|
native ts_getuserlastfrag( index );
|
||||||
|
|
||||||
stock ts_has_stored_grenade(id) return (ts_getuserpwup(id) == TSPWUP_GRENADE)
|
native ts_giveweapon( index,weapon,clips,extra );
|
||||||
stock ts_has_stored_health(id) return (ts_getuserpwup(id) == TSPWUP_HEALTH)
|
|
||||||
stock ts_has_stored_armor(id) return (ts_getuserpwup(id) == TSPWUP_ARMOR)
|
native ts_getuserpwup( index );
|
||||||
|
|
||||||
|
stock ts_has_slowmo(id) return (ts_getuserpwup(id) &TSPWUP_SLOWMO);
|
||||||
|
stock ts_has_infammo(id) return (ts_getuserpwup(id) &TSPWUP_INFAMMO);
|
||||||
|
stock ts_has_slowpause(id) return (ts_getuserpwup(id) &TSPWUP_SLOWPAUSE);
|
||||||
|
stock ts_has_dfirerate(id) return (ts_getuserpwup(id) &TSPWUP_DFIRERATE);
|
||||||
|
stock ts_has_grenade(id) return (ts_getuserpwup(id) &TSPWUP_GRENADE);
|
||||||
|
stock ts_has_health(id) return (ts_getuserpwup(id) &TSPWUP_HEALTH);
|
||||||
|
stock ts_has_armor(id) return (ts_getuserpwup(id) &TSPWUP_ARMOR);
|
||||||
|
|
||||||
|
/* Function will create pwup entity and return its index (pwupent) */
|
||||||
|
native ts_createpwup( pwup );
|
||||||
|
|
||||||
|
native ts_givepwup( index,pwupent );
|
||||||
|
|
||||||
|
native ts_setpddata( knifeoffset );
|
||||||
|
|
||||||
// Alters a fu attack. Use with fu forward
|
// Alters a fu attack. Use with fu forward
|
||||||
native ts_set_fuattack(id,Float:time,Float:damage)
|
native ts_set_fuattack(id,Float:time,Float:damage)
|
||||||
@ -97,4 +141,4 @@ native ts_is_running_powerup(id)
|
|||||||
// Highly experimental command which overrides powerup types.
|
// Highly experimental command which overrides powerup types.
|
||||||
// Use if a powerup is already running, or if a powerup is not running.
|
// Use if a powerup is already running, or if a powerup is not running.
|
||||||
// Safe to use in powerup forward.
|
// Safe to use in powerup forward.
|
||||||
native ts_force_run_powerup(id,PWUP_TYPE)
|
native ts_force_run_powerup(id,PWUP_TYPE)
|
@ -9,7 +9,6 @@
|
|||||||
#endif
|
#endif
|
||||||
#define _tsx_included
|
#define _tsx_included
|
||||||
|
|
||||||
#include <tsconst>
|
|
||||||
#include <tsstats>
|
#include <tsstats>
|
||||||
|
|
||||||
#pragma library tsx
|
#pragma library tsx
|
||||||
@ -59,28 +58,4 @@ native xmod_get_stats_size();
|
|||||||
/* Returns 1 if true */
|
/* Returns 1 if true */
|
||||||
native xmod_is_custom_wpn(wpnindex);
|
native xmod_is_custom_wpn(wpnindex);
|
||||||
|
|
||||||
/************* Shared Natives End ********************************/
|
/************* Shared Natives End ********************************/
|
||||||
|
|
||||||
/* weapon logname to weapon name convertion */
|
|
||||||
native ts_wpnlogtoname(logname[],name[],len);
|
|
||||||
|
|
||||||
/* weapon logname to weapon index convertion */
|
|
||||||
native ts_wpnlogtoid(logname[]);
|
|
||||||
|
|
||||||
native ts_getuserwpn( index,&ammo,&clip,&mode,&extra );
|
|
||||||
native ts_getusercash( index );
|
|
||||||
native ts_getuserspace( index );
|
|
||||||
native ts_getuserpwup( index,&Value );
|
|
||||||
native ts_getuseritems( index );
|
|
||||||
native ts_getuserkillflags(killer);
|
|
||||||
native ts_getkillingstreak( index );
|
|
||||||
native ts_getuserlastfrag( index );
|
|
||||||
|
|
||||||
native ts_giveweapon( index,weapon,clips,extra );
|
|
||||||
|
|
||||||
/* Function will create pwup entity and return its index (pwupent) */
|
|
||||||
native ts_createpwup( pwup );
|
|
||||||
|
|
||||||
native ts_givepwup( index,pwupent );
|
|
||||||
|
|
||||||
native ts_setpddata( knifeoffset );
|
|
Loading…
x
Reference in New Issue
Block a user