diff --git a/plugins/include/tsconst.inc b/plugins/include/tsconst.inc index 9764a0e6..5e0927a0 100755 --- a/plugins/include/tsconst.inc +++ b/plugins/include/tsconst.inc @@ -1,6 +1,6 @@ -/* TSXMod functions +/* TSFUN constants * - * (c) 2004, SidLuke + * (c) 2005, Suzuka * 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 TSPWUP_NONE 0 #define TSPWUP_RANDOM 0 #define TSPWUP_SLOWMO 1 #define TSPWUP_INFAMMO 2 @@ -34,7 +35,23 @@ #define TSA_SILENCER 1 #define TSA_LASERSIGHT 2 #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 { TSW_GLOCK18 = 1, diff --git a/plugins/include/tsfun.inc b/plugins/include/tsfun.inc index 0a7c141a..4c1ef6b1 100755 --- a/plugins/include/tsfun.inc +++ b/plugins/include/tsfun.inc @@ -1,46 +1,90 @@ -/* TSFUN functions +/* TSFUN * - * (c) 2004, Twilight Suzuka + * (c) 2005, Twilight Suzuka * This file is provided as is (no warranties). */ -#if defined _tsfun_included +#if defined _tsxfun_included #endinput #endif -#define _tsfun_included +#define _tsxfun_included #include +/************* Shared Natives Start ********************************/ + +/* Forward types */ +enum { + XMF_DAMAGE = 0, + XMF_DEATH, +} + #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, * damage and time length may be altered with natives. * 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, * Returns value of powerup. Use TSPWUP_*'s * to find exactly which one it is. */ 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 ts_setusertime( index, Float:time ); +native ts_getusercash( index ); +native ts_setusercash( index, money ); + native ts_getuserslots( index ); native ts_setuserslots( index, slots ); -stock ts_has_stored_superjump(id) return (ts_getuseritems(id) & TSITEM_SUPERJUMP) -stock ts_has_stored_kungfoo(id) return (ts_getuseritems(id) & TSITEM_KUNGFU) -stock ts_has_stored_slowmo(id) return (ts_getuserpwup(id) == TSPWUP_SLOWMO) +native ts_getuserstate( index ) +native ts_getuserwpn( index,&ammo,&clip,&mode,&extra ); +native ts_getuserspace( index ); -stock ts_has_stored_infammo(id) return (ts_getuserpwup(id) == TSPWUP_INFAMMO) -stock ts_has_stored_slowpause(id) return (ts_getuserpwup(id) == TSPWUP_SLOWPAUSE) -stock ts_has_stored_dfirerate(id) return (ts_getuserpwup(id) == TSPWUP_DFIRERATE) +native ts_getuserkillflags(killer); +native ts_getkillingstreak( index ); +native ts_getuserlastfrag( index ); -stock ts_has_stored_grenade(id) return (ts_getuserpwup(id) == TSPWUP_GRENADE) -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_giveweapon( index,weapon,clips,extra ); + +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 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. // Use if a powerup is already running, or if a powerup is not running. // Safe to use in powerup forward. -native ts_force_run_powerup(id,PWUP_TYPE) +native ts_force_run_powerup(id,PWUP_TYPE) \ No newline at end of file diff --git a/plugins/include/tsx.inc b/plugins/include/tsx.inc index 415dcb28..385058bb 100755 --- a/plugins/include/tsx.inc +++ b/plugins/include/tsx.inc @@ -9,7 +9,6 @@ #endif #define _tsx_included -#include #include #pragma library tsx @@ -59,28 +58,4 @@ native xmod_get_stats_size(); /* Returns 1 if true */ native xmod_is_custom_wpn(wpnindex); -/************* 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 ); \ No newline at end of file +/************* Shared Natives End ********************************/ \ No newline at end of file