AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [Problem] WaveOfDeath (https://forums.alliedmods.net/showthread.php?t=170518)

F0RCE 10-25-2011 18:47

[Problem] WaveOfDeath
 
Hello! I got problem with power WaveOfDeath

First I will write how did I manage to add it


1#

PHP Code:

#define FALA_SMIERCI 7845
 
#define OBRAZENIA 5 //Ammount of damage the are given
#define CZAS_OBRAZEN 8 //Time of effect
#define ZASIEG 300 //Range of the Wave 

2#

PHP Code:

new ilosc_fal_gracza[33]
new 
czas_obrazen[33

3#

PHP Code:

if(player_b_fala[id] > 0uzyjfale(id

4#

PHP Code:

public uzyjfale(id)
{
        if(!
ilosc_fal_gracza[id])
        {
                
client_print(idprint_center"You dont have WaveOfDeath anymore!");
                return 
PLUGIN_CONTINUE;
        }
        
        
ilosc_fal_gracza[id]--;
        
         new 
iOrigin[3];
        
get_user_origin(idiOrigin);
        
        
message_beginMSG_BROADCASTSVC_TEMPENTITYiOrigin );
        
write_byteTE_BEAMCYLINDER );
        
write_coordiOrigin[0] );
        
write_coordiOrigin[1] );
        
write_coordiOrigin[2] );
        
write_coordiOrigin[0] );
        
write_coordiOrigin[1] + ZASIEG );
        
write_coordiOrigin[2] + ZASIEG );
        
write_shortsprite_white );
        
write_byte);
        
write_byte);
        
write_byte10 );
        
write_byte120 );
        
write_byte255 );
        
write_byte);
        
write_byte);
        
write_byte255 );
        
write_byte100 );
        
write_byte);
        
message_end();
 
        new 
= -1
        
new Float:fOrigin[3];
        
IVecFVec(iOriginfOrigin)
        while((
engfunc(EngFunc_FindEntityInSphereifOriginZASIEG.0)) != 0)
        {
                if (
pev_valid(i) && is_user_alive(i) && get_user_team(id) != get_user_team(i)){
                        
czas_obrazen[i] = CZAS_OBRAZEN
                        
new iData[2]
                        
iData[0] = id
                        iData
[1] = i
                        set_task
(1.0"FalaSmierci_task"_iData2"a"CZAS_OBRAZEN)
                }
        }
        
        return 
PLUGIN_CONTINUE;
}
 
public 
FalaSmierci_task(iData[]){
        if(!
is_user_alive(iData[1]))
                return;
                
        
Util_Kill(iData[0], iData[1], OBRAZENIA.0)
}
stock Util_Kill(attackervictimFloat:damage)
{
    if(
damage pev(victimpev_health))
    {
        
ExecuteHam(Ham_TakeDamagevictimCSW_HEGRENADEattackerdamageDMG_BLAST)
        } else {
        
ExecuteHamB(Ham_Killedvictimattacker2)
    }



So the problem starts here.

In my plugin there is ONLY problem with this Code - After deleting this everything else work like a charm.

I'm giving the WaveofDeath on roundspawn.

I can normally use it, and there is this aura effect [Aura or Wave dunno how to name it]

So.. The wave normally appear, and If enemy is in range of this skill, He should be damaged with the value that are definied.
[If No HP he should die]

But it isn't happening. The enemy is not dying, The enemy is not inflicted with damage.

Here is the error:

PHP Code:

L 10/26/2011 00:08:57: [HAMSANDWICHEntity has null private data (4)
L 10/26/2011 00:08:57: [AMXXDisplaying debug trace (plugin "diablo_extreme.amxx")
L 10/26/2011 00:08:57: [AMXXRun time error 10native error (native "ExecuteHam")
L 10/26/2011 00:08:57: [AMXX]    [0diablo_extreme.sma::Util_Kill (line 9097)
L 10/26/2011 00:08:57: [AMXX]    [1


THE LINE : 9097 is this LINE:
PHP Code:

        ExecuteHam(Ham_TakeDamagevictimCSW_HEGRENADEattackerdamageDMG_BLAST

Maybe this power is messing up with my DiabloMod or something.
I really don't know.

If there is any way to make it work, please help me :)
I could upload the whole CODE [18k lines] but It won't be usefull [Written in shitty way + everything is in Polish]

F0RCE 10-26-2011 08:39

Re: [Problem] WaveOfDeath
 
If there isnt simple way to fix it.

Then, is there a chance that someone will change it too:

If someone is in range of WaveOfDeath

- Shake Screen + Switching weapon to knife :)?

If there isn't anyone to help me for free I can PAY a little :)

I also got question [I don't want to start new topic again :/]

PHP Code:

L 10/26/2011 16:06:06: [HAMSANDWICHEntity out of range (1106247680)
L 10/26/2011 16:06:06: [AMXXDisplaying debug trace (plugin "diablo_extreme.amxx")
L 10/26/2011 16:06:06: [AMXXRun time error 10native error (native "ExecuteHam")
L 10/26/2011 16:06:06: [AMXX]    [0diablo_extreme.sma::TakeDamage (line 12510

PHP Code:

        new classname[33];
        
entity_get_string(thisEV_SZ_classnameclassname32);
        
        if(!
equal(classname"Kukla")) 
                return 
HAM_IGNORED;
        
        new 
owner entity_get_int(thisEV_INT_iuser1);
        
        if(
get_user_team(owner) == get_user_team(idattacker))
                return 
HAM_SUPERCEDE;
                
        new 
bool:bez_obrazen get_user_weapon(idattacker) == CSW_KNIFE && damagebits DMG_BULLET
        
        
if(!bez_obrazen)
                
ExecuteHam(Ham_TakeDamageowneridattackerdamage0.3thisdamagebits); 

PHP Code:

ExecuteHam(Ham_TakeDamageowneridattackerdamage0.3thisdamagebits); 

- That's the line!

I changed the line from
PHP Code:

cod_inflict_damage(owneridattackerdamage0.3thisdamagebits); 

And that's how this native works :)

</span>
PHP Code:

native cod_inflict_damage(attackervictimFloat:DamageFloat:Intelligence=1.0byte_damaging=0additional flag=0); 



All times are GMT -4. The time now is 14:24.

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