Thread: Satellite Rain
View Single Post
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 01-20-2019 , 22:33   Re: Satellite Rain
Reply With Quote #24

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(locationVec)
        
FVecIVec(Veclocation)
        
location[2] = location[2] + 20

        
new players[32]
        new 
playercount

        get_players
(players,playercount,"a")

        for (new 
m=0m<playercountm++)
        {
                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(bidplayers[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:Originrandom_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:
LINE187     set_pev(bid,pev_takedamage,1
PHP Code:
new Float:takedamagepev(entitypev_takedamagetakedamagevalues#

#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(bidFloat:home1
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
__________________

Last edited by DJEarthQuake; 02-10-2019 at 14:06. Reason: Simple X5 example with 2 distance spreads for nuke
DJEarthQuake is offline