Raised This Month: $13 Target: $400
 3% 

DeFRAG [1.0 OUT] // News to come soon!


Post New Thread Reply   
 
Thread Tools Display Modes
letgoofmyeggs
Senior Member
Join Date: Aug 2006
Old 03-21-2009 , 16:37   Re: DeFRAG [New Version OUT!] VIDEO+PICS
Reply With Quote #41

dam i shulda saved all those maps i had them all saved but i reinstalled my cs
letgoofmyeggs is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 03-21-2009 , 18:09   Re: DeFRAG [New Version OUT!] VIDEO+PICS
Reply With Quote #42

Yea, nice. if there are more maps, maybe ill add a plugin so that will be leveled. so if anyone is on end, the map willbe changed to lvl 2. & ...
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
plasmo
Member
Join Date: Aug 2006
Location: Melbourne, Australia
Old 03-22-2009 , 02:21   Re: DeFRAG [New Version OUT!] VIDEO+PICS
Reply With Quote #43

yeah i was thinking the same thing
whats the limitations for hammer on big maps?

because the map would have to be pretty big for a defrag map
small maps = too fast to pass and boring lol
plasmo is offline
Send a message via MSN to plasmo
bomnacama
Senior Member
Join Date: Dec 2008
Location: Portugal
Old 03-24-2009 , 07:43   Re: DeFRAG [New Version OUT!] VIDEO+PICS
Reply With Quote #44

in the current version, the scout power is less than the one used in the video
__________________



Please FEED MY HAMSTERS by giving me +karma
bomnacama is offline
khios
Junior Member
Join Date: Mar 2009
Location: Belgium
Old 03-25-2009 , 10:58   Re: DeFRAG [New Version OUT!] VIDEO+PICS
Reply With Quote #45

So I hasn't got many times during the last days! But I'm back!
I'm rewritting the whol plugin from scratch and I've found how to implement server cvars for now =D

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <fakemeta_util>
#include <hamsandwich>
#include <cstrike>

#define PLUGIN    "DeFRAG"
#define AUTHOR    "superNOVA_"
#define VERSION    "1.0"

#define MAX_PLAYERS 20

new bool:g_bAlive[MAX_PLAYERS+1]
new 
lastammo[MAX_PLAYERS+1
new 
lastweap[MAX_PLAYERS+1]
new 
defrag_scoutpush
new defrag_scoutradius
new g_defrag_nodamages

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
// SERVER CVARS
    
set_cvar_num ("sv_gravity"600// Set the server gravity 600 for DeFRAG is really good
    
set_cvar_num ("sv_maxspeed"1500// Set player maxspeed
    
set_cvar_num ("mp_startmoney"0// Set player start money [Don't make buy zone in DeFRAG just place armory_entity]
    
set_cvar_num ("mp_timelimit"0// Time before map changes
    
set_cvar_num ("sv_airaccelerate"100)
    
set_cvar_num ("mp_freezetime"0)
    
set_cvar_num ("mp_autoteambalance"0)
    
set_cvar_num ("mp_limitteams"0)
    
register_clcmd "+sprint""defrag_start_sprint")
    
register_clcmd "-sprint""defrag_stop_sprint")
    
RegisterHam(Ham_TakeDamage"player""defrag_nodamages")
        
    
// DeFRAG Sprint CVARS
    #define KNIFE_SPRINT_SPEED 1500.0          // Define the speed when using +sprint cmd
    #define KNIFE_DEFAULT_SPEED 500.0        // Define normal move speed with the knife (Default Cs1.6 = 250)
    
    // DeFRAF Scout CVARS
    
defrag_scoutpush register_cvar("scout_conc","1000.0"); // Force of the push
    
defrag_scoutradius register_cvar("scout_radius","1000.0"); // Area covered by the push
    #define CONC_WEAP CSW_SCOUT        // Define wich weapon to use for having a conc push
    
    // DeFRAG No Damages
    
g_defrag_nodamages register_cvar ("mp_falldamage""0.0"// Set the amount of damages taken from falling (1 = normal damages)
    

    
}

public 
Check_Alive(id

        
g_bAlive[id] = bool:is_user_alive(id



        
// DeFRAG Knife
        
new const g_szKnifeModel[] = "models/v_knife.mdl";  // To set the knife model! Easy if you want to use custom models (will make some soon just for DeFRAG)
const KNIFE_DRAW_ANIMATION 3

    public 
defrag_start_sprint ( const PlayerId )
    {
        if ( 
get_user_weapon PlayerId ) == CSW_KNIFE )
        {
            
UTIL_SetPlayerSpeed PlayerIdKNIFE_SPRINT_SPEED );
            
set_pev PlayerIdpev_viewmodel2"" );
        }
        
        return 
PLUGIN_HANDLED;
    }
    
    public 
defrag_stop_sprint ( const PlayerId )
    {
        if( 
get_user_weaponPlayerId ) == CSW_KNIFE )
        {
            
UTIL_SetPlayerSpeed PlayerIdKNIFE_DEFAULT_SPEED );

            
set_pevPlayerIdpev_viewmodel2g_szKnifeModel );
            
set_pevPlayerIdpev_weaponanimKNIFE_DRAW_ANIMATION );
            
            
message_beginMSG_ONE_UNRELIABLESVC_WEAPONANIM_PlayerId );
            
write_byteKNIFE_DRAW_ANIMATION );
            
write_bytepevPlayerIdpev_body ) );
            
message_end();
        }
        
        return 
PLUGIN_HANDLED;
    }
    
    
UTIL_SetPlayerSpeed ( const PlayerId, const Float:Speed )
    { 
        
set_pevPlayerIdpev_maxspeedSpeed ); 
        
engfuncEngFunc_SetClientMaxspeedPlayerIdSpeed ); 
    }
    
    
    
    
    
// DeFRAG scout
    
stock get_velocity_from_originentFloat:fOrigin[3], Float:fSpeedFloat:fVelocity[3] )
{
    new 
Float:fEntOrigin[3];
    
peventpev_originfEntOrigin );

    
// Velocity = Distance / Time

    
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_distancefEntOrigin,fOrigin ) / fSpeed );

    
fVelocity[0] = fDistance[0] / fTime;
    
fVelocity[1] = fDistance[1] / fTime;
    
fVelocity[2] = fDistance[2] / fTime;

    return ( 
fVelocity[0] && fVelocity[1] && fVelocity[2] );
}


// Sets velocity of an entity (ent) away from origin with speed (speed)

stock set_velocity_from_originentFloat:fOrigin[3], Float:fSpeed )
{
    new 
Float:fVelocity[3];
    
get_velocity_from_originentfOriginfSpeedfVelocity )

    
set_peventpev_velocityfVelocity );

    return ( 
);
}

public 
make_tracer(id)
{
    new 
Float:maxboost get_pcvar_float(defrag_scoutpush);
    if( !
maxboost )
        return;

    new 
weap read_data(2);        // id of the weapon
    
new ammo read_data(3);        // ammo left in clip

    
if( weap == CONC_WEAP && g_bAlive[id] )
    {

        if( 
lastweap[id] == )
            
lastweap[id] = weap;

        if( 
lastammo[id] > ammo && lastweap[id] == weap )
        {
            new 
Vec[3], Float:fVec[3], Float:origin[3];
            
get_user_origin(idVec3);

            
IVecFVec(VecfVec);

            
pev(idpev_originorigin);
            new 
Float:dist get_distance_foriginfVec );
            new 
Float:radius get_pcvar_float(defrag_scoutradius)
            if(
dist <= radius)
            {
                new 
Float:boost maxboost - ( ( maxboost dist) / radius );
                
set_velocity_from_origin(idfVecboost);
            }
        }

    }
}

    
// DeFRAG nodamages

public defrag_nodamages(identidattackerFloat:damagedamagebits)
{
    if( 
damagebits != DMG_FALL )
        return 
HAM_IGNORED

    damage 
*= get_pcvar_float(g_defrag_nodamages)
    
SetHamParamFloat(4damage)

    return 
HAM_HANDLED

Here's a new version! Only problem is with the scout conc... If someone can figure it it will really help me

Last edited by khios; 03-25-2009 at 13:18.
khios is offline
Send a message via MSN to khios Send a message via Skype™ to khios
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 03-25-2009 , 12:39   Re: DeFRAG [New Version OUT!] VIDEO+PICS
Reply With Quote #46

Make a cvar to enable/disable automatic cvar setting and if you plan on changing them multiple times use cvar pointers.
__________________
In Flames we trust!
Nextra is offline
khios
Junior Member
Join Date: Mar 2009
Location: Belgium
Old 03-25-2009 , 20:15   Re: DeFRAG [1.0 OUT]
Reply With Quote #47

So I've added everything back!

now i need help to revoke he_damage in this part someone can help?

PHP Code:
    register_event("Damage""hedamage_event""b""2!0""4!0""5!0""6!0")
    
register_cvar("he_push","20.0")


public 
hedamage_event(id) {
    new 
MAXPLAYERS
    MAXPLAYERS 
get_maxplayers()

    new 
inflictor entity_get_edict(idEV_ENT_dmg_inflictor)
    if (
inflictor <= MAXPLAYERS)
        return 
PLUGIN_CONTINUE

    
new classname2[8]
    
entity_get_string(inflictorEV_SZ_classnameclassname27)
    if (!
equal(classname2"grenade"))
        return 
PLUGIN_CONTINUE

    
new Float:upVector[3]
    
upVector[0] = float(read_data(4))
    
upVector[1] = float(read_data(5))
    
upVector[2] = float(read_data(6))

    new 
damagerept read_data(2)
    
set_velocity_from_origin(idupVectorget_cvar_float("he_push")*damagerept)

    return 
PLUGIN_CONTINUE

khios is offline
Send a message via MSN to khios Send a message via Skype™ to khios
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 03-26-2009 , 04:19   Re: DeFRAG [1.0 OUT]
Reply With Quote #48

You should generally cache maxplayers globally and then use it in all functions. Also I believe that you are able to, by setting the right parameters in register_event, make any further check of weapon or inflictor unnecessary in the function itself. If that does not work at least use static for the classname compare.
__________________
In Flames we trust!
Nextra is offline
dillen
Junior Member
Join Date: Jun 2008
Old 03-26-2009 , 04:35   Re: DeFRAG [1.0 OUT]
Reply With Quote #49

scout wont work for me ??

could someone fix this or help me with the scout, i really wanna try this.
dillen is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 03-26-2009 , 04:50   Re: DeFRAG [1.0 OUT]
Reply With Quote #50

what i wont to ask is if its possible to remove the +sprint cmd & add only +attack2 ?

cuz there are many idiots dont know how to bind or cant bind anykey on this! & i loos player on server when this mod is running.
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:00.


Powered by vBulletin®
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Theme made by Freecode