Kód:
/* Formatright © 2009, ConnorMcLeod
Furiens 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.
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 Furiens; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#include <amxmodx>
#include <cstrike>
#include <engine>
#include <fun>
#include <hamsandwich>
#define VERSION "0.0.2"
#define MAX_PLAYERS 32
#define Ham_Player_ResetMaxSpeed Ham_Item_PreFrame
new g_pCvarGravity, g_pCvarMaxSpeed
public plugin_init()
{
register_plugin("Furiens", VERSION, "ConnorMcLeod")
g_pCvarGravity = register_cvar("amx_furien_gravity", "0.375")
g_pCvarMaxSpeed = register_cvar("amx_furien_maxspeed", "500")
RegisterHam(Ham_Spawn, "player", "Player_Spawn_Post", 1)
RegisterHam(Ham_Player_ResetMaxSpeed, "player", "Player_ResetMaxSpeed", 1)
new iEnt = create_entity("info_target")
entity_set_string(iEnt, EV_SZ_classname, "check_speed")
entity_set_float(iEnt, EV_FL_nextthink, get_gametime() + 0.1)
register_think("check_speed", "Set_Terrorist_Visibility")
}
public plugin_cfg()
{
set_cvar_num("sv_maxspeed", 1100)
set_cvar_num("cl_forwardspeed", 1100)
set_cvar_num("cl_sidespeed", 1100)
set_cvar_num("cl_backspeed", 1100)
}
public Player_Spawn_Post( id )
{
if( is_user_alive(id) )
{
if( cs_get_user_team(id) == CS_TEAM_T )
{
set_user_gravity(id, get_pcvar_float(g_pCvarGravity))
set_user_footsteps(id, 1)
}
else
{
set_user_footsteps(id, 0)
}
set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderNormal, 0)
}
}
public Player_ResetMaxSpeed( id )
{
if( is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_T && get_user_maxspeed(id) != -1.0 )
{
set_user_maxspeed(id, get_pcvar_float(g_pCvarMaxSpeed))
}
}
public Set_Terrorist_Visibility( iEnt )
{
entity_set_float(iEnt, EV_FL_nextthink, get_gametime() + 0.1)
new iPlayers[MAX_PLAYERS], iNum, id, Float:fVecVelocity[3], iSpeed
get_players(iPlayers, iNum, "ae", "TERRORIST")
new iInvisibility
for(new i; i<iNum; i++)
{
id = iPlayers[i]
if( get_user_weapon(id) == CSW_KNIFE )
{
entity_get_vector(id, EV_VEC_velocity, fVecVelocity)
iSpeed = floatround( vector_length(fVecVelocity) )
if( iSpeed < 255 )
{
iInvisibility = iSpeed - (256 - iSpeed) / 3
if( iInvisibility < 0 )
{
iInvisibility = 0
}
set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, iInvisibility)
}
else
{
set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderNormal, 0)
}
}
else
{
set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderNormal, 0)
}
}
}
itt az egész ,nekem az lenne a lényeg h a furen jóval gyorsabban fusson a mostaninál...