This is ideal for deathmatch. Fakedamage resolves the radiusdamage unable to respawn.
PHP Code:
LINE 298: /* radius_damage(origin,100,50) */
LINE 299: x5_dam();
PHP Code:
public x5_dam()
{
new location[3]
new Float:Vec[3]
IVecFVec(location, Vec)
FVecIVec(Vec, location)
location[2] = location[2] + 20
new players[32]
new playercount
get_players(players,playercount,"a")
for (new m=0; m<playercount; m++)
{
new bid
pev(bid,pev_origin,location)
new playerlocation[3]
get_user_origin(players[m], playerlocation)
new quasidistance = get_distance(playerlocation,location)
new resultdance = get_entity_distance(bid, players[m])
if(resultdance < 1000)
fakedamage(players[m],"Radiation",80.0,DMG_RADIATION)
{
if(resultdance > 1000)
fakedamage(players[m],"Fall-out",50.0,DMG_TIMEBASED)
new name[33]
get_user_name(players[m],name,32)
server_print("%s was %i",name , quasidistance)
}
}
}
DeathMatch radiusdamage kills; players cannot respawn!
This stock picks only Capture The Flag maps that are round based.
PHP Code:
new mname[32];
get_mapname(mname,31);
#if defined(DEBUG)
server_print("%s, is loaded with radius damage compensator.", mname);
#endif
if (containi(mname,"op4ctf_") > -1) {
#if defined(DEBUG)
server_print("%s, has OP4CTF prefix. Loading damage", mname)
#endif
health_wreck();
}
PHP Code:
public health_wreck(){
new Float:Origin[3]
RadiusDamage(Float:Origin, random_num(2,5), random_num(150,2000));
}
This eliminates the segmentation faults of plugin. It shows as a FLOAT yet is coded here as integer.
PHP Code:
LINE: 187 set_pev(bid,pev_takedamage,1)
PHP Code:
new Float:takedamage, pev(entity, pev_takedamage, takedamage) values#
#define DAMAGE_NO 0.0
#define DAMAGE_YES 1.0
#define DAMAGE_AIM 2.0
SOURCE: https://www.amxmodx.org/api/hlsdk_const
PHP Code:
set_pev(bid,pev_takedamage,0.0);
It seems calling the boom without resetting the time(r) screws it up.
[0]
amx_parachute.sma::client_PreThink (line 397) explodes hundreds of times per second with
1.0. Now,
0.0 stops that.
Try to take out the ent health it just spawns the explode when people join and all kinds of chaos.
Players can spawn on deathmatch now from death, no nonsense.
My x4 example which also featured is_in_viewcone, no longer exhibited had a safe zone where no damage is done with reports as to where the VIPS (admins were) in relation to blast.
PHP Code:
if (players[m]) is_in_viewcone(bid, Float:home, 1)
Quote:
[USA] .sρiηX҉. was 1675
bteam thewalkindead was 1273
"bteam Egor" committed suicide with "Radiation" (world)
bteam Egor was 756
bteam Hudson89506 was 1114
"bteam OsmanBaba" committed suicide with "Fall-out" (world)
bteam OsmanBaba was 1020
"bteam Neppy" committed suicide with "Fall-out" (world)
bteam Neppy was 1149
bteam Piwcyk was 214
|
__________________