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

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


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Gameplay        Approver:   Exolent[jNr] (178)
khios
Junior Member
Join Date: Mar 2009
Location: Belgium
Old 03-17-2009 , 12:52   DeFRAG [1.0 OUT] // News to come soon!
Reply With Quote #1

DeFRAG 1.0 BETA

by superNOVA_


Description: DeFRAG is a plugin that modify the game experience of the user. Super speed, total control and trick maps are the mains points. If you want a totally new experience try this!

No more need of svdefrag.cfg! Server config added in the plugin! =)
Have fun with it! And I'm looking for one or two mappers

How to :
Download defrag.sma
cldefrag
defrag_trainv2b

For executing! Place defrag.amxx in plugin folder and add it to the plugins.ini file [found in the amxmodx/configs folder]
place cldefrag in your cstrike folder
Launch game and exec cldefrag.cfg
Play the game

New map out to! defrag_trainv2b -> Harder friends harder....

Here's some pics of each part of the map! First line is knife speed part, second is scout part!!

And a video too

http://www.dailymotion.com/video/x8q...s16_videogames : streaming with sound
http://www.youtube.com/watch?v=Wj6is36wRaE : streaming (without sound)
http://www.filedropper.com/defrag_2 : direct download





Continue giving me advice it motives me to do great work for the community

Cya and have fun with the plugin

Quote:
Changelog
0.1 - Pasted different codes without any kind of experience
0.5 - Added scout_conc
0.6 - Modified scout cvar to be a bit harder
0.9 - Redone part of the code need some explanation from pro to do better
0.91 - Removed double register_forward!
1.0 - Recoded many many things

Plugin Change to come
- Add Noclip and Grenade conc

MAP Change to come :
-Help printed on wall to fully understand the process
PHP Code:
/*

    DeFRAG for CS1.6
    Version 1.0
    By superNOVA_
    
    Information about this plugin can be found at:
    https://forums.alliedmods.net/showthread.php?t=87863

*/

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <fakemeta_util>
#include <hamsandwich>
#include <cstrike>

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


new bool:g_bAlive[33]
new 
lastammo[33
new 
lastweap[33]
new 
defrag_scoutpush
new defrag_scoutradius
new g_defrag_nodamages
new g_pcvarGravity
new g_iCdWaterJumpTime[33]

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")
    
register_event("CurWeapon","make_tracer""be""1=1");    
    
RegisterHam(Ham_TakeDamage"player""defrag_nodamages")
    
RegisterHam(Ham_Player_Jump"player""Player_Jump")
    
register_forward(FM_UpdateClientData"UpdateClientData")
    
register_forward(FM_CmdStart"CmdStart")
    
RegisterHam(Ham_Spawn"player""Check_Alive"1)
    
RegisterHam(Ham_Killed"player""Check_Alive"1)
    
g_pcvarGravity get_cvar_pointer("sv_gravity")
    
    
// 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)
    
    // DeFRAG 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)
    
    // DeFRAG BHOP
    #define PLAYER_JUMP     6
    
}

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_floatdefrag_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_floatdefrag_scoutradius );
            if(
dist <= radius){
                new 
Float:boost maxboost - ( ( maxboost dist) / radius );
                
set_velocity_from_origin(idfVecboost);
            }
        }
        
lastammo[id] = ammo;
        
lastweap[id] = weap;
    }
}


    
// 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
}



    
// DeFRAG BHOP
    
public CmdStart(iduc_handleseed)
{
    if( 
g_bAlive[id] && get_uc(uc_handleUC_Buttons) & IN_USE && pev(idpev_flags) & FL_ONGROUND )
    {
        static 
Float:fVelocity[3]
        
pev(idpev_velocityfVelocity)
        
fVelocity[0] *= 0.3
        fVelocity
[1] *= 0.3
        fVelocity
[2] *= 0.3
        set_pev
(idpev_velocityfVelocity)
    }
}

public 
Player_Jump(id)
{
    if(    !
g_bAlive[id]
    ||    
g_iCdWaterJumpTime[id]
    ||    
pev(idpev_waterlevel) >= 2    )
    {
        return
    }

    static 
iFlags iFlags pev(idpev_flags)
    if( !(
iFlags FL_ONGROUND) )
    {
        return
    }

    static 
iOldButtons iOldButtons pev(idpev_oldbuttons)
    if( 
iOldButtons IN_JUMP )
    {
        return
    }

    
set_pev(idpev_oldbuttonsiOldButtons IN_JUMP)

    static 
Float:fVelocity[3]
    
pev(idpev_velocityfVelocity)

    static 
Float:fFrameTimeFloat:fPlayerGravity
    global_get
(glb_frametimefFrameTime)
    
pev(idpev_gravityfPlayerGravity)

    
fVelocity[2] = 268.328157 fPlayerGravity fFrameTime 0.5 get_pcvar_num(g_pcvarGravity)

    
set_pev(idpev_velocityfVelocity)
    
set_pev(idpev_gaitsequencePLAYER_JUMP)
    
set_pev(idpev_frame0.0)
}

public 
UpdateClientData(idsendweaponscd_handle)
{
    
g_iCdWaterJumpTime[id] = get_cd(cd_handleCD_WaterJumpTime)

Credit goes to

ConnorMcLeod : Bhop script -> http://forums.alliedmods.net/showthr...light=slowdown
skyjur : Semiclip -> http://forums.alliedmods.net/showthr...light=semiclip post #6
arkshine : Sprint plugin code [VERSION 2] -> http://forums.alliedmods.net/showthread.php?t=85767 post #10
Meow meow : Scout conc -> http://forums.alliedmods.net/showthr...highlight=conc [Original idea from Fatalis]
Attached Files
File Type: zip defrag_train.zip (370.0 KB, 858 views)
File Type: cfg cldefrag.cfg (79 Bytes, 986 views)
File Type: zip defrag_trainv2b.zip (641.9 KB, 1041 views)
File Type: sma Get Plugin or Get Source (defrag.sma - 2432 views - 6.8 KB)

Last edited by khios; 03-26-2009 at 14:28. Reason: DeFRAG is now at 1.0 =)
khios is offline
Send a message via MSN to khios Send a message via Skype™ to khios
rufee
Junior Member
Join Date: Aug 2008
Location: Lithuania
Old 03-17-2009 , 13:06   Re: DeFRAG
Reply With Quote #2

Interesting
i used to play q3 defrag
will definitely try this plugin out
anyway great work
__________________
rufee is offline
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 03-17-2009 , 13:12   Re: DeFRAG
Reply With Quote #3

Nice idea.

- Please add descriptions for the cvars.
- Do not publish a compiled version, it is not allowed here.
- Maybe add a dialog that will automatically execute the cvars on the client if he gives permission.
__________________
In Flames we trust!

Last edited by Nextra; 03-17-2009 at 15:43.
Nextra is offline
kevinikill
Member
Join Date: Mar 2008
Location: Home
Old 03-17-2009 , 13:16   Re: DeFRAG
Reply With Quote #4

Lol wtf is DeFRAG?? xD

is it smth. similar to kreedz?
__________________

kevinikill is offline
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 03-17-2009 , 13:23   Re: DeFRAG
Reply With Quote #5

It's the kreedz of Quake so to speak (but that does not mean it is the same, which it in fact is not). This is the first movie I found on youtube, you will see what it is about http://www.youtube.com/watch?v=fqq9YcmHW1A

//edit:
DeFrag is a mod that alters, afaik, the movement of Quake3. These things are not possible in standard Q3 what also makes it different from kreedz as kreedz is possible without adjustments.
__________________
In Flames we trust!

Last edited by Nextra; 03-17-2009 at 15:43.
Nextra is offline
kevinikill
Member
Join Date: Mar 2008
Location: Home
Old 03-17-2009 , 13:24   Re: DeFRAG
Reply With Quote #6

WOW i <3 IT !!!

and that for counterstrike ommqqqq n1n1n1

;D
__________________

kevinikill is offline
khios
Junior Member
Join Date: Mar 2009
Location: Belgium
Old 03-17-2009 , 13:57   Re: DeFRAG
Reply With Quote #7

Quote:
Originally Posted by Nextra View Post
Nice idea.

- Please add descriptions for the cvars.
- Do not publish a compiled version, it is not allowed here.
- Maybe add a dialog that will automatically execute the cvars on the client if he gives permission.
Thanks for the advice about the compiled version! New here

Will add description tomorrow and for the last point don't now (yet) how to do this
khios is offline
Send a message via MSN to khios Send a message via Skype™ to khios
crazyeffect
Veteran Member
Join Date: Jul 2008
Location: Belgium
Old 03-17-2009 , 14:41   Re: DeFRAG
Reply With Quote #8

Like the plugin

Only 2 things i think

1. You are not allowed to add Ip adresses...
2. Post the scripting in a php text... [Example: [_php] SCRIPT [_/PHP] (Without the _)]
__________________
crazyeffect is offline
Send a message via MSN to crazyeffect
DarkGod
SourceMod DarkCrab
Join Date: Jul 2007
Location: Sweden
Old 03-17-2009 , 15:43   Re: DeFRAG
Reply With Quote #9

I thought that you were allowed to add an IP if it's the public test server for the plugin. I may be wrong, though.

This seems like a pretty dang sweet script!
You should add something when a client joins to accept or deny you to change their settings to be more appropriate for the servers (i.e the settings in cldefrag.cfg). If they accept you edit the settings. If they deny it you kick them.
__________________
DarkGod is offline
Send a message via AIM to DarkGod Send a message via MSN to DarkGod
khios
Junior Member
Join Date: Mar 2009
Location: Belgium
Old 03-17-2009 , 16:21   Re: DeFRAG
Reply With Quote #10

Quote:
Originally Posted by DarkGod View Post
I thought that you were allowed to add an IP if it's the public test server for the plugin. I may be wrong, though.

This seems like a pretty dang sweet script!
You should add something when a client joins to accept or deny you to change their settings to be more appropriate for the servers (i.e the settings in cldefrag.cfg). If they accept you edit the settings. If they deny it you kick them.
Mmmmh... Will seek for it! Thx for the advice!

The problem is that I got many ideas but not the knowledge to make them
khios is offline
Send a message via MSN to khios Send a message via Skype™ to khios
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 11:12.


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