📄 spread tweak.txt
字号:
Here it is, something that will make your spread tweaking (I don't know why you would) way easier. This can also be used in the .cfg too.
spreadeditor.cpp
Code:
//
// *~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
// ::[PaRaNoIa]:: *
// Legendary Amir (2003) *
// parseFloat (2003) *
// *
// Version: FINAL *
// Last Updated: 9/13/03 *
// *~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// NOTE:
// GNU license doesn't cover Engine directory.
// Content of Engine directory is copyrighted (c) 1999, 2000, by Valve LLC
// and it is licensed under Valve's proprietary license (see original HL SDK).
//
#include "spreadeditor.h"
#include "interpreter.h"
void func_deagle()
{
float spread = cmd.argF(1);
spread_s.DEAGLE = spread;
}
void func_mp5()
{
float spread = cmd.argF(1);
spread_s.MP5 = spread;
}
void func_ak47()
{
float spread = cmd.argF(1);
spread_s.AK47 = spread;
}
void func_sg552()
{
float spread = cmd.argF(1);
spread_s.SG552 = spread;
}
void func_aug()
{
float spread = cmd.argF(1);
spread_s.AUG = spread;
}
void func_m4a1()
{
float spread = cmd.argF(1);
spread_s.M4A1 = spread;
}
void func_m249()
{
float spread = cmd.argF(1);
spread_s.M249 = spread;
}
void func_mac10()
{
float spread = cmd.argF(1);
spread_s.MAC10 = spread;
}
void func_ump45()
{
float spread = cmd.argF(1);
spread_s.UMP45 = spread;
}
void func_tmp()
{
float spread = cmd.argF(1);
spread_s.TMP = spread;
}
void func_p90()
{
float spread = cmd.argF(1);
spread_s.P90 = spread;
}
void func_p228()
{
float spread = cmd.argF(1);
spread_s.P228 = spread;
}
void func_fiveseven()
{
float spread = cmd.argF(1);
spread_s.FIVESEVEN = spread;
}
void func_elite()
{
float spread = cmd.argF(1);
spread_s.ELITE = spread;
}
void func_glock18()
{
float spread = cmd.argF(1);
spread_s.GLOCK18 = spread;
}
void func_usp()
{
float spread = cmd.argF(1);
spread_s.USP = spread;
}
void func_g3sg1()
{
float spread = cmd.argF(1);
spread_s.G3SG1 = spread;
}
void func_sg550()
{
float spread = cmd.argF(1);
spread_s.SG550 = spread;
}
void func_restore()
{
char* weapon = cmd.argC(1);
if( weapon == "deagle" )
{
spread_s.DEAGLE = DEAGLE_r;
}
else if( weapon == "mp5" )
{
spread_s.MP5 = MP5_r;
}
else if( weapon == "ak47" )
{
spread_s.AK47 = AK47_r;
}
else if( weapon == "sg552" )
{
spread_s.SG552 = SG552_r;
}
else if( weapon == "aug" )
{
spread_s.AUG = AUG_r;
}
else if( weapon == "m4a1" )
{
spread_s.M4A1 = M4A1_r;
}
else if( weapon == "m249" )
{
spread_s.M249 = M249_r;
}
else if( weapon == "mac10" )
{
spread_s.MAC10 = MAC10_r;
}
else if( weapon == "ump45" )
{
spread_s.UMP45 = UMP45_r;
}
else if( weapon == "tmp" )
{
spread_s.TMP = TMP_r;
}
else if( weapon == "p90" )
{
spread_s.P90 = P90_r;
}
else if( weapon == "p228" )
{
spread_s.P228 = P228_r;
}
else if( weapon == "fiveseven" )
{
spread_s.FIVESEVEN = FIVESEVEN_r;
}
else if( weapon == "elite" )
{
spread_s.ELITE = ELITE_r;
}
else if( weapon == "glock18" )
{
spread_s.GLOCK18 = GLOCK18_r;
}
else if( weapon == "usp" )
{
spread_s.USP = USP_r;
}
else if( weapon == "g3sg1" )
{
spread_s.G3SG1 = G3SG1_r;
}
else if( weapon == "sg550" )
{
spread_s.SG550 = SG550_r;
}
else
{
return;
}
}
void func_restoreall()
{
spread_s.DEAGLE = DEAGLE_r;
spread_s.MP5 = MP5_r;
spread_s.AK47 = AK47_r;
spread_s.SG552 = SG552_r;
spread_s.AUG = AUG_r;
spread_s.M4A1 = M4A1_r;
spread_s.M249 = M249_r;
spread_s.MAC10 = MAC10_r;
spread_s.UMP45 = UMP45_r;
spread_s.TMP = TMP_r;
spread_s.P90 = P90_r;
spread_s.P228 = P228_r;
spread_s.FIVESEVEN = FIVESEVEN_r;
spread_s.ELITE = ELITE_r;
spread_s.GLOCK18 = GLOCK18_r;
spread_s.USP = USP_r;
spread_s.G3SG1 = G3SG1_r;
spread_s.SG550 = SG550_r;
}
spreadeditor.h
Code:
//
// *~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
// ::[PaRaNoIa]:: *
// Legendary Amir (2003) *
// parseFloat (2003) *
// *
// Version: FINAL *
// Last Updated: 9/13/03 *
// *~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// NOTE:
// GNU license doesn't cover Engine directory.
// Content of Engine directory is copyrighted (c) 1999, 2000, by Valve LLC
// and it is licensed under Valve's proprietary license (see original HL SDK).
//
#ifndef SPREADEDITOR_H
#define SPREADEDITOR_H
struct spread_storage
{
float DEAGLE;
float MP5;
float AK47;
float SG552;
float AUG;
float M4A1;
float M249;
float MAC10;
float UMP45;
float TMP;
float P90;
float P228;
float FIVESEVEN;
float ELITE;
float GLOCK18;
float USP;
float G3SG1;
float SG550;
};
extern struct spread_storage spread_s;
static const float DEAGLE_r = 0.9f;
static const float MP5_r = 0;
static const float AK47_r = 0.2f;
static const float SG552_r = 0.2f;
static const float AUG_r = 0.3f;
static const float M4A1_r = 0.2f;
static const float M249_r = 0.2f;
static const float MAC10_r = 0.15f;
static const float UMP45_r = 0;
static const float TMP_r = 0.2f;
static const float P90_r = 0.15f;
static const float P228_r = 0.9f;
static const float FIVESEVEN_r = 0.92f;
static const float ELITE_r = 0.88f;
static const float GLOCK18_r = 0.9f;
static const float USP_r = 0.92f;
static const float G3SG1_r = 0.2f;
static const float SG550_r = 0.2f;
void func_deagle();
void func_mp5();
void func_ak47();
void func_sg552();
void func_aug();
void func_m4a1();
void func_m249();
void func_mac10();
void func_ump45();
void func_tmp();
void func_p90();
void func_p228();
void func_fiveseven();
void func_elite();
void func_glock18();
void func_usp();
void func_g3sg1();
void func_sg550();
void func_restore();
void func_restoreall();
#endif
The rest I suggest you do on your own. Oh yah, one more peice
somewhere in client.cpp
Code:
void DefaultSpreadVar(int weaponid)
{
if (weaponid == WEAPONLIST_DEAGLE)
me.spread.spreadvar = spread_s.DEAGLE;
else if (weaponid == WEAPONLIST_MP5)
me.spread.spreadvar = spread_s.MP5;
else if (weaponid == WEAPONLIST_AK47)
me.spread.spreadvar = spread_s.AK47;
else if (weaponid == WEAPONLIST_SG552)
me.spread.spreadvar = spread_s.SG552;
else if (weaponid == WEAPONLIST_AUG)
me.spread.spreadvar = spread_s.AUG;
else if (weaponid == WEAPONLIST_M4A1)
me.spread.spreadvar = spread_s.M4A1;
else if (weaponid == WEAPONLIST_M249)
me.spread.spreadvar = spread_s.M249;
else if (weaponid == WEAPONLIST_MAC10)
me.spread.spreadvar = spread_s.MAC10;
else if (weaponid == WEAPONLIST_UMP45)
me.spread.spreadvar = spread_s.UMP45;
else if (weaponid == WEAPONLIST_TMP)
me.spread.spreadvar = spread_s.TMP;
else if (weaponid == WEAPONLIST_P90)
me.spread.spreadvar = spread_s.P90;
else if (weaponid == WEAPONLIST_P228)
me.spread.spreadvar = spread_s.P228;
else if (weaponid == WEAPONLIST_FIVESEVEN)
me.spread.spreadvar = spread_s.FIVESEVEN;
else if (weaponid == WEAPONLIST_ELITE)
me.spread.spreadvar = spread_s.ELITE;
else if (weaponid == WEAPONLIST_GLOCK18)
me.spread.spreadvar = spread_s.GLOCK18;
else if (weaponid == WEAPONLIST_USP)
me.spread.spreadvar = spread_s.USP;
else if (weaponid == WEAPONLIST_G3SG1)
me.spread.spreadvar = spread_s.G3SG1;
else if (weaponid == WEAPONLIST_SG550)
me.spread.spreadvar = spread_s.SG550;
else
me.spread.spreadvar = 0;
}
By: Legendary Amir
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -