AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   HEV suit emulation (https://forums.alliedmods.net/showthread.php?t=16496)

MistaGee 08-13-2005 17:51

HEV suit emulation
 
1 Attachment(s)
This plugin emulates the HEV suit from Half-Life.

When ppl connect to the server., it plays a welcome sound that tells them the HEV is online.
If the cvar amx_hev_refill is set to anything larger than 0, the welcome sound will also tell users that automatic medical systems are online. The users will get the amount of HP set in the cvar when they got hurt, e.g. by falling down somewhere.
If ammunition depleted, the plugin will play a sound for that.
Whenever a player gets hurt, the plugin will check for the following:
If they fell down somewhere and lost lesss than 30 HP, this is a minor fracture.
If they fell down somewhere and lost more than 30 HP, this is a major fracture.
If they drown / burn / breathe nerve gas and so on, they will be told to evacutate this certain area.
If your HP is less than 26, you get a notice about vital signs being critical.


Requirements:
Cstrike module


Have Fun with it!

Greetz MGee

CubicVirtuoso 08-13-2005 19:20

Nice little part two to your other plugin :) they work nicely together.

MistaGee 08-14-2005 08:19

if you mean the ammunition depleted thingy, this HEV suit actually does that too :p

CubicVirtuoso 08-14-2005 13:38

Oh lol thats cool.

F|4THeAd 08-16-2005 22:02

That sounds awesome. Can someone make it work for other mods like The Specialists?

MistaGee 08-17-2005 07:17

np... I don't know anything about the Specialists, but I need a function to check how much ammo the user has left in backpack, since that is the only cstrike specific function in there...

How does TS handle its weapons? I only need to find out if all ammunition is gone or only the current clip was shot empty. If I can figure that out, changing the script is no problem.


Greetz MGee

VercettiK 08-17-2005 14:35

Taken from tsfun.inc

Btw, check out this link:
http://www.amxmodx.org/funcwiki.php?...=ts_&go=search

Code:


native Float:ts_getusertime( index );
native ts_setusertime( index, Float:time );

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)

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)

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)

// Alters a fu attack. Use with fu forward
native ts_set_fuattack(id,Float:time,Float:damage)

// Changes board message
native ts_set_message(id,message)

// Gets the message board message
native ts_get_message(id)

stock ts_is_normal(id)
{
        new msg = ts_get_message(id)
        if( (msg > 11) || (msg > 6 && msg < 10) ) return 1;
        return 0;
}
stock ts_is_waiting(id) return (ts_get_message(id) == TSMSG_WAITING)
stock ts_is_dead(id) return (ts_get_message(id) == TSMSG_DEAD)
stock ts_is_killer(id) return (ts_get_message(id) == TSMSG_KILLER)
stock ts_is_demolition(id) return (ts_get_message(id) == TSMSG_DEMOLITION)
stock ts_is_specialist(id) return (ts_get_message(id) == TSMSG_SPECIALIST)
stock ts_is_unstoppable(id) return (ts_get_message(id) == TSMSG_UNSTOPPABLE)
stock ts_is_theone(id) return (ts_get_message(id) == TSMSG_THEONE)

// Return one on true, 0 on false
native ts_has_superjump(id)
native ts_has_fupowerup(id)
native ts_is_in_slowmo(id)

// Get and set consecutive frags
native ts_get_cons_frags(id)
native ts_set_cons_frags(id,num)

// Set to see cool bullet trails. Only id will see them.
native ts_set_bullettrail(id,yesorno)

// Sets fake versions of slow mo and slow pause. Use ts_set_speed for more options.
native ts_set_fakeslowmo(id,Float:time)
native ts_set_fakeslowpause(id,Float:time)

/* Sets speed artificially. 1.0 is default, Go into fractions and decimals for slower
* and put in higher numbers for higher speeds. Aura is how far things around you are effected
* Time is the time until it wears off. 0.0 for speed will freeze people. Do not use negatives. */

native ts_set_speed(id,Float:speed,Float:auradist,Float:time)

/* Sets physics speed artificially. Things like sparks and sounds will be effected.
* Any negative number will render all physics paused. */
native ts_set_physics_speed(id,Float:speed)

// Returns 0 if no powerup is running. Returns the powerup type otherwise.
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)

I don't think there's a special ammo function for TS, check this one out
http://www.amxmodx.org/funcwiki.php?go=func&id=157

[ EDIT ]
Found out functions here
Code:

native ts_getuserwpn( index,&clip,&ammo,&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 );

From tsx.inc, maybe the ts_getuserwpn() would work.

F|4THeAd 08-17-2005 14:43

I don't know anything about writing AMXx plugins, but I think I found a function in the tsx.inc that looks like what it needs.

ts_getuserwpn( index,&clip,&ammo,&mode,&extra );

MistaGee 08-18-2005 13:25

I don't have TS so I can't try it, moreover I don't have time for amxx scripting atm... still, this looks like just a function to get the weapon data of how much ammo is left in the clip but not in the backpack...

Charr 08-27-2005 19:09

use:
Code:
new clip,ammo,mode,extra new weapon = ts_getuserwpn(id,clip,ammo,mode,extra)

clip is clip in ammo
ammo is total ammo left
mode is current firing mode
extra is any attachments to the gun


All times are GMT -4. The time now is 04:17.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.