Jump to content
Followers 0
cristiii.

Harry Potter's Magic Wand [0.0.3]

Recommended Posts

            write_byte( 20 );        // life in 0.1's
            write_byte( 2 );        // scale in 0.1's
            write_byte( 50 );        // velocity along vector in 10's
            write_byte( 10 );        // randomness of velocity in 10's
            message_end(  );
            
            make_knockback( Victim, VictimOrigin, 3 * get_pcvar_float( HarryDamageCvar2 ) );
            
            death_message( id, Victim, 1, "Double Magic Wand" );
        }
    }

    else {

        static ClassName[ 32 ];
        pev( Victim, pev_classname, ClassName, charsmax( ClassName ) );

        if( equal( ClassName, "func_breakable" ) )
            if( entity_get_float( Victim, EV_FL_health ) <= 80 )
                force_use( id, Victim );
    }

    emit_sound( id, CHAN_WEAPON, HarryHitSound, VOL_NORM, ATTN_NORM, 0, PITCH_NORM );
}

public make_knockback( Victim, Float:origin[ 3 ], Float:maxspeed ) {

    new Float:fVelocity[ 3 ];
    
    kickback( Victim, origin, maxspeed, fVelocity );
    entity_set_vector( Victim, EV_VEC_velocity, fVelocity );
    
    return( 1 );
}

stock ShakeScreen( id, const Float:iSeconds ) {

    message_begin( MSG_ONE, get_user_msgid( "ScreenShake" ), { 0, 0, 0 }, id );
    write_short( floatround( 4096.0 * iSeconds, floatround_round ) );
    write_short( floatround( 4096.0 * iSeconds, floatround_round ) );
    write_short( 1<<13 );
    message_end(  );
}

stock FadeScreen( id, const Float:iSeconds, const iRed, const iGreen, const iBlue, const iAlpha ) {
      
    message_begin( MSG_ONE, get_user_msgid( "ScreenFade" ), _, id );
    write_short( floatround( 4096.0 * iSeconds, floatround_round ) );
    write_short( floatround( 4096.0 * iSeconds, floatround_round ) );
    write_short( 0x0000 );
    write_byte( iRed );
    write_byte( iGreen );
    write_byte( iBlue );
    write_byte( iAlpha );
    message_end(  );
}        

stock kickback( ent, Float:fOrigin[ 3 ], Float:fSpeed, Float:fVelocity[ 3 ] ) {

    new Float:fEntOrigin[ 3 ];
    entity_get_vector( ent, EV_VEC_origin, fEntOrigin );
    
    new Float:fDistance[ 3 ];
    fDistance[ 0 ] = fEntOrigin[ 0 ] - fOrigin[ 0 ];
    fDistance[ 1 ] = fEntOrigin[ 1 ] - fOrigin[ 1 ];
    fDistance[ 2 ] = fEntOrigin[ 2 ] - fOrigin[ 2 ];

    new Float:fTime =( vector_distance( fEntOrigin, fOrigin ) / fSpeed );
    fVelocity[ 0 ] = fDistance[ 0 ] / fTime;
    fVelocity[ 1 ] = fDistance[ 1 ] / fTime;
    fVelocity[ 2 ] = fDistance[ 2 ] / fTime;
    
    return( fVelocity[ 0 ] && fVelocity[ 1 ] && fVelocity[ 2 ] );
}

// stock from "m79"
stock death_message( Killer, Victim, ScoreBoard, const Weapon[  ] ) {
    
    set_msg_block( get_user_msgid( "DeathMsg" ), BLOCK_SET );

    ExecuteHamB( Ham_Killed, Victim, Killer, 2 );

    set_msg_block( get_user_msgid( "DeathMsg" ), BLOCK_NOT );

    make_deathmsg( Killer, Victim, 0, Weapon );

    zp_set_user_ammo_packs( Killer, zp_get_user_ammo_packs( Killer ) + get_pcvar_num( HarryKillAmmoPacks ) );

    if( ScoreBoard ) {

        message_begin( MSG_BROADCAST, get_user_msgid( "ScoreInfo" ) );
        write_byte( Killer );
        write_short( pev( Killer, pev_frags ) );
        write_short( get_user_deaths( Killer ) );
        write_short( 0 );
        write_short( get_user_team( Killer ) );
        message_end(  );
        
        message_begin( MSG_BROADCAST, get_user_msgid( "ScoreInfo" ) );
        write_byte( Victim );
        write_short( pev( Victim, pev_frags ) );
        write_short( get_user_deaths( Victim ) );
        write_short( 0 );
        write_short( get_user_team( Victim ) );
        message_end(  );
    }
}

stock set_weapon_anim( id, anim ) {

    set_pev( id, pev_weaponanim, anim );

    if( is_user_alive( id ) ) {

        message_begin( MSG_ONE, SVC_WEAPONANIM, _, id );
        write_byte( anim );
        write_byte( pev( id, pev_body ) );
        message_end(  );
    }
}

stock get_damage_body( body, Float:fDamage ) {

    switch( body ) {

        case HIT_HEAD: fDamage *= 4.0;

        case HIT_STOMACH: fDamage *= 1.1;

        case HIT_CHEST: fDamage *= 1.5;

        case HIT_LEFTARM: fDamage *= 0.77;

        case HIT_RIGHTARM: fDamage *= 0.77;

        case HIT_LEFTLEG: fDamage *= 0.75;

        case HIT_RIGHTLEG: fDamage *= 0.75;

        default: fDamage *= 1.0;
    }
    
    return floatround( fDamage );
}

// stock from "fakemeta_util"
stock fm_get_user_godmode( index ) {

    new Float:val;
    pev( index, pev_takedamage, val );

    return ( val == DAMAGE_NO );
}

/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/[/sursa]
Nume: Harry Potter's Magic Wand
Autor: Hades Ownage & YONTU
Versiune: 0.0.3
Link oficial: Aici.

Instalare:
1. Fisierul Harry_Magic_Wand.sma il puneti in addons/amxmodx/scripting !
2. Fisierul Harry_Magic_Wand.amxx il puneti in addons/amxmodx/plugins !
3. Fisierele .spr le puneti in cstrike/sprites !
4. Fisierele .wav le puneti in cstrike/sound !
5. Fisierul .mdl le puneti in cstrike/models !
6. Intrati in fisierul addons/amxmodx/configs/plugins.ini si adaugati la urma:

Harry_Magic_Wand.amxx


7. Alti pasi necesari...
Cvar-uri (se adauga in fisierul amxmodx\configs\amxx.cfg): 

  • harry_damage "80.0" - Cate daune( dmg ) sa provoace bagheta cu click stanga( recomand sa lasati cu zecimala ".0" altfel cade serverul
    harry_damage2 "135.0" - Cate daune( dmg ) sa provoace bagheta cu click dreapta( recomand sa lasati cu zecimala ".0" altfel cade serverul
    harry_ammo "500" - Cata munitie sa primeasca la bagheta
    harry_money_reward "600" - Cati bani sa primeasti bonus cand faci un frag cu bagheta
    harry_distance "90000" - Pana la ce distanta poti trage cu bagheta
    harry_cost "10000" - Cati $/puncte/credite sa coste bagheta!

Comenzi administrative (se tasteaza in consola si trebuie sa fiti administrator):

  • amx_get_harry < nume > < munitie > - oferi unui jucator bagheta fara a o mai cumpara el din chat! De asemenea ii setezi si cata munitie sa primeasca!

Comenzi publice (se tasteaza in joc prin apasarea tastei Y):

  • /magic - cumperi bagheta direct din chat

Module necesare (se sterge ; din fata modulului de mai jos; acestea le gasiti in fisierul amxmodx\configs\modules.ini):
- CStrike;
- Fakemeta;
- Hamsandwich;
- Engine;

[sursa=Imagini]1-1390583605.

2-1390583637.

3-1390583663.

4-1390583683.

5-1390583707.

6-1390583728.

7-1390583755.

dedust-1390584324.

dedust-1390584358.[/sursa]

[sursa=Credite]NiHiLaNTh - pentru un stock: sa se salveze fragurile facute cu bagheta
Hades Ownage - Plugin extras din Harry vs. Volde( 0.0.1 ) + imbunatatiri facute de mine
cyby: compatibilitatea pluginului cu sistemele de credite, puncte, bani
sDs|Aragon* : cateva particele din cod[/sursa]

Informatii: Pentru Update-uri / Imbunatatiri sau erori intalnite pe parcursul jocului din cauza baghetei, postati in acest topic! Pluginul este finalizat din septembrie 2013 asa ca multa lume il cauta asa ca la cererea mai multor utilizatori l-am postat postat!

v0.0.3: M-am gandit sa fac o alta versiune compatibila cu sistemul de credite la lui Askhanar, Aragon, un sistem de puncte oricare, si default, bani.
Cautati in sursa liniile

#define ASKHANAR_CREDITS
//#define ARAGON_CREDITS
//#define POINTS
//#define MONEY


si stergeti "//" din fata sistemului pe care il folositi.
Ex: Folosesc sistemul de credite al lui Askhanar. Atunci adaug "//" in fata la //#define MONEY si sterg "//" din fata la #define ASKHANAR_CREDITS !
Have Fun!!! ?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Followers 0
HAPPYHALLOWEEN PUBZONE
  • FFA.FRAGS.RO [CS2]

    Server FFA.PUBZONE.RO [CS2] DM | FFA WarmupServer

|

Theme Made by Zayon & Cyber Designs

×
×
  • Create New...