Raised This Month: $ Target: $400
 0% 

[TF2] Speed Changer


Post New Thread Reply   
 
Thread Tools Display Modes
Mnkras
Senior Member
Join Date: Mar 2009
Location: 127.0.0.1
Old 12-23-2009 , 19:13   Re: [TF2] Speed Changer
Reply With Quote #21

is this still working? moggiex's died, and i cannot seem to get this one to work it says it was changed but the speed is not changing..
__________________
Mnkras is offline
noodleboy347
AlliedModders Donor
Join Date: Mar 2009
Old 12-25-2009 , 00:26   Re: [TF2] Speed Changer
Reply With Quote #22

This should work, there is no reason it shouldn't.
noodleboy347 is offline
Mnkras
Senior Member
Join Date: Mar 2009
Location: 127.0.0.1
Old 12-25-2009 , 12:39   Re: [TF2] Speed Changer
Reply With Quote #23

I think there is something wrong with m_flMaxspeed with the latest update
__________________
Mnkras is offline
noodleboy347
AlliedModders Donor
Join Date: Mar 2009
Old 12-25-2009 , 13:39   Re: [TF2] Speed Changer
Reply With Quote #24

Quote:
Originally Posted by Mnkras View Post
I think there is something wrong with m_flMaxspeed with the latest update
It works fine with Premium, but I'll check that out.
noodleboy347 is offline
alinayg
Senior Member
Join Date: Apr 2009
Location: USA, RI
Old 12-26-2009 , 02:04   Re: [TF2] Speed Changer
Reply With Quote #25

Quote:
Originally Posted by alinayg View Post
How would I go about doing this with the plugin?
__________________
alinayg is offline
noodleboy347
AlliedModders Donor
Join Date: Mar 2009
Old 12-26-2009 , 02:28   Re: [TF2] Speed Changer
Reply With Quote #26

Quote:
Originally Posted by alinayg View Post
How would I go about doing this with the plugin?
It should just... work... it's not designed to work specifically in water, but it should make you as fast as the speed you set in water. So if you set a Heavy's speed to 400 (Scout speed), he would move as fast as a Scout in water.
noodleboy347 is offline
Mnkras
Senior Member
Join Date: Mar 2009
Location: 127.0.0.1
Old 12-26-2009 , 18:30   Re: [TF2] Speed Changer
Reply With Quote #27

its slightly slower actually as the water property subtracts some speed
__________________
Mnkras is offline
h00x
Senior Member
Join Date: Jun 2009
Old 12-26-2009 , 19:33   Re: [TF2] Speed Changer
Reply With Quote #28

Here the a list of errors.

PHP Code:
L 12/26/2009 18:27:27: [SMDisplaying call stack trace for plugin "speedchanger.smx":
L 12/26/2009 18:27:27: [SM] [0Line 87, /home/groups/alliedmodders/forums/files/5/0/5/3/9/52686.attach::Event_Death()
L 12/26/2009 18:27:27: [SMNative "CloseHandle" reportedHandle d is invalid (error 1)
L 12/26/2009 18:27:27: [SMDisplaying call stack trace for plugin "speedchanger.smx":
L 12/26/2009 18:27:27: [SM] [0Line 87, /home/groups/alliedmodders/forums/files/5/0/5/3/9/52686.attach::Event_Death()
L 12/26/2009 18:27:28: [SMNative "CloseHandle" reportedHandle d is invalid (error 1)
L 12/26/2009 18:27:28: [SMDisplaying call stack trace for plugin "speedchanger.smx":
L 12/26/2009 18:27:28: [SM] [0Line 87, /home/groups/alliedmodders/forums/files/5/0/5/3/9/52686.attach::Event_Death()
L 12/26/2009 18:27:29: [SMNative "CloseHandle" reportedHandle d is invalid (error 1)
L 12/26/2009 18:27:29: [SMDisplaying call stack trace for plugin "speedchanger.smx":
L 12/26/2009 18:27:29: [SM] [0Line 87, /home/groups/alliedmodders/forums/files/5/0/5/3/9/52686.attach::Event_Death()
L 12/26/2009 18:27:29: [SMNative "CloseHandle" reportedHandle d is invalid (error 1)
L 12/26/2009 18:27:29: [SMDisplaying call stack trace for plugin "speedchanger.smx":
L 12/26/2009 18:27:29: [SM] [0Line 87, /home/groups/alliedmodders/forums/files/5/0/5/3/9/52686.attach::Event_Death()
L 12/26/2009 18:27:30: [SMNative "CloseHandle" reportedHandle d is invalid (error 1)
L 12/26/2009 18:27:30: [SMDisplaying call stack trace for plugin "speedchanger.smx":
L 12/26/2009 18:27:30: [SM] [0Line 87, /home/groups/alliedmodders/forums/files/5/0/5/3/9/52686.attach::Event_Death()
L 12/26/2009 18:27:30: [SMNative "CloseHandle" reportedHandle d is invalid (error 1)
L 12/26/2009 18:27:30: [SMDisplaying call stack trace for plugin "speedchanger.smx":
L 12/26/2009 18:27:30: [SM] [0Line 87, /home/groups/alliedmodders/forums/files/5/0/5/3/9/52686.attach::Event_Death()
L 12/26/2009 18:27:31: [SMNative "CloseHandle" reportedHandle d is invalid (error 1)
L 12/26/2009 18:27:31: [SMDisplaying call stack trace for plugin "speedchanger.smx":
L 12/26/2009 18:27:31: [SM] [0Line 87, /home/groups/alliedmodders/forums/files/5/0/5/3/9/52686.attach::Event_Death()
L 12/26/2009 18:27:31: [SMNative "CloseHandle" reportedHandle d is invalid (error 1)
L 12/26/2009 18:27:31: [SMDisplaying call stack trace for plugin "speedchanger.smx":
L 12/26/2009 18:27:31: [SM] [0Line 87, /home/groups/alliedmodders/forums/files/5/0/5/3/9/52686.attach::Event_Death()
L 12/26/2009 18:27:45: [SMNative "CloseHandle" reportedHandle d is invalid (error 1)
L 12/26/2009 18:27:45: [SMDisplaying call stack trace for plugin "speedchanger.smx":
L 12/26/2009 18:27:45: [SM] [0Line 232, /home/groups/alliedmodders/forums/files/5/0/5/3/9/52686.attach::OnClientDisconnect()
L 12/26/2009 18:27:45: [SMNative "GetEntProp" reportedEntity 1 (1is invalid
L 12
/26/2009 18:27:45: [SMDisplaying call stack trace for plugin "speedchanger.smx":
L 12/26/2009 18:27:45: [SM] [0Line 94, /groups/sourcemod/compiler-1.2/include/tf2_stocks.inc::TF2_GetPlayerClass()
L 12/26/2009 18:27:45: [SM] [1Line 113, /home/groups/alliedmodders/forums/files/5/0/5/3/9/52686.attach::Timer_Speed()
L 12/26/2009 18:27:45: [SMNative "GetEntProp" reportedEntity 1 (1is invalid
L 12
/26/2009 18:27:45: [SMDisplaying call stack trace for plugin "speedchanger.smx":
L 12/26/2009 18:27:45: [SM] [0Line 94, /groups/sourcemod/compiler-1.2/include/tf2_stocks.inc::TF2_GetPlayerClass()
L 12/26/2009 18:27:45: [SM] [1Line 113, /home/groups/alliedmodders/forums/files/5/0/5/3/9/52686.attach::Timer_Speed()
L 12/26/2009 18:27:45: [SMNative "GetEntProp" reportedEntity 1 (1is invalid
L 12
/26/2009 18:27:45: [SMDisplaying call stack trace for plugin "speedchanger.smx":
L 12/26/2009 18:27:45: [SM] [0Line 94, /groups/sourcemod/compiler-1.2/include/tf2_stocks.inc::TF2_GetPlayerClass()
L 12/26/2009 18:27:45: [SM] [1Line 113, /home/groups/alliedmodders/forums/files/5/0/5/3/9/52686.attach::Timer_Speed()
L 12/26/2009 18:27:50: [SMNative "CloseHandle" reportedHandle d is invalid (error 1)
L 12/26/2009 18:27:50: [SMDisplaying call stack trace for plugin "speedchanger.smx":
L 12/26/2009 18:27:50: [SM] [0Line 87, /home/groups/alliedmodders/forums/files/5/0/5/3/9/52686.attach::Event_Death()
L 12/26/2009 18:28:02: [SMNative "CloseHandle" reportedHandle d is invalid (error 1)
L 12/26/2009 18:28:02: [SMDisplaying call stack trace for plugin "speedchanger.smx":
L 12/26/2009 18:28:02: [SM] [0Line 87, /home/groups/alliedmodders/forums/files/5/0/5/3/9/52686.attach::Event_Death()
L 12/26/2009 18:28:05: [SMNative "CloseHandle" reportedHandle d is invalid (error 1)
L 12/26/2009 18:28:05: [SMDisplaying call stack trace for plugin "speedchanger.smx":
L 12/26/2009 18:28:05: [SM] [0Line 87, /home/groups/alliedmodders/forums/files/5/0/5/3/9/52686.attach::Event_Death()
L 12/26/2009 18:28:28: [SMNative "CloseHandle" reportedHandle d is invalid (error 1)
L 12/26/2009 18:28:28: [SMDisplaying call stack trace for plugin "speedchanger.smx":
L 12/26/2009 18:28:28: [SM] [0Line 87, /home/groups/alliedmodders/forums/files/5/0/5/3/9/52686.attach::Event_Death()
L 12/26/2009 18:28:43: [SMNative "CloseHandle" reportedHandle d is invalid (error 1)
L 12/26/2009 18:28:43: [SMDisplaying call stack trace for plugin "speedchanger.smx":
L 12/26/2009 18:28:43: [SM] [0Line 87, /home/groups/alliedmodders/forums/files/5/0/5/3/9/52686.attach::Event_Death()
L 12/26/2009 18:29:12: [SMNative "CloseHandle" reportedHandle d is invalid (error 1)
L 12/26/2009 18:29:12: [SMDisplaying call stack trace for plugin "speedchanger.smx":
L 12/26/2009 18:29:12: [SM] [0Line 87, /home/groups/alliedmodders/forums/files/5/0/5/3/9/52686.attach::Event_Death()
L 12/26/2009 18:29:13: [SMNative "CloseHandle" reportedHandle d is invalid (error 1)
L 12/26/2009 18:29:13: [SMDisplaying call stack trace for plugin "speedchanger.smx":
L 12/26/2009 18:29:13: [SM] [0Line 87, /home/groups/alliedmodders/forums/files/5/0/5/3/9/52686.attach::Event_Death()
L 12/26/2009 18:29:56: [SMNative "CloseHandle" reportedHandle d is invalid (error 1)
L 12/26/2009 18:29:56: [SMDisplaying call stack trace for plugin "speedchanger.smx":
L 12/26/2009 18:29:56: [SM] [0Line 87, /home/groups/alliedmodders/forums/files/5/0/5/3/9/52686.attach::Event_Death()
L 12/26/2009 18:29:56: [SMNative "CloseHandle" reportedHandle d is invalid (error 1)
L 12/26/2009 18:29:56: [SMDisplaying call stack trace for plugin "speedchanger.smx":
L 12/26/2009 18:29:56: [SM] [0Line 87, /home/groups/alliedmodders/forums/files/5/0/5/3/9/52686.attach::Event_Death()
L 12/26/2009 18:30:27: [SMNative "CloseHandle" reportedHandle d is invalid (error 1)
L 12/26/2009 18:30:27: [SMDisplaying call stack trace for plugin "speedchanger.smx":
L 12/26/2009 18:30:27: [SM] [0Line 87, /home/groups/alliedmodders/forums/files/5/0/5/3/9/52686.attach::Event_Death()
L 12/26/2009 18:30:41: [SMNative "CloseHandle" reportedHandle d is invalid (error 1)
L 12/26/2009 18:30:41: [SMDisplaying call stack trace for plugin "speedchanger.smx":
L 12/26/2009 18:30:41: [SM] [0Line 87, /home/groups/alliedmodders/forums/files/5/0/5/3/9/52686.attach::Event_Death() 
Is there also anyways we can get rid of all of this?

PHP Code:
L 12/26/2009 19:38:24: [speedchanger.smxPersia's speed was set to 400.000000
L 12/26/2009 - 19:38:26: [speedchanger.smx] Persia'
s speed was set to 400.000000
L 12
/26/2009 19:39:07: [speedchanger.smxCryBaby's speed was set to 400.000000
L 12/26/2009 - 19:40:23: [speedchanger.smx] Persia'
s speed was set to 400.000000
L 12
/26/2009 19:42:01: [speedchanger.smxWITCH's speed was set to 400.000000
L 12/26/2009 - 19:42:01: [speedchanger.smx] WITCH'
s speed was set to 400.000000
L 12
/26/2009 19:42:25: [speedchanger.smxScreamin' Eagles's speed was set to 400.000000
L 12
/26/2009 19:42:26: [speedchanger.smxWITCH's speed was set to 400.000000
L 12/26/2009 - 19:42:31: [speedchanger.smx] Chucklenuts'
s speed was set to 400.000000
L 12
/26/2009 19:42:50: [speedchanger.smxScreamin' Eagles's speed was set to 400.000000
L 12
/26/2009 19:42:56: [speedchanger.smxCryBaby's speed was set to 400.000000
L 12/26/2009 - 19:43:07: [speedchanger.smx] Screamin' 
Eagles's speed was set to 400.000000
L 12/26/2009 - 19:43:21: [speedchanger.smx] Chucklenuts'
s speed was set to 400.000000
L 12
/26/2009 19:43:36: [speedchanger.smxWITCH's speed was set to 400.000000
L 12/26/2009 - 19:44:02: [speedchanger.smx] CryBaby'
s speed was set to 400.000000 

Last edited by h00x; 12-26-2009 at 20:45.
h00x is offline
Mnkras
Senior Member
Join Date: Mar 2009
Location: 127.0.0.1
Old 12-26-2009 , 22:51   Re: [TF2] Speed Changer
Reply With Quote #29

open the sp file and delete the lines that have log in it

recompile
__________________
Mnkras is offline
h00x
Senior Member
Join Date: Jun 2009
Old 12-26-2009 , 23:57   Re: [TF2] Speed Changer
Reply With Quote #30

Quote:
Originally Posted by Mnkras View Post
open the sp file and delete the lines that have log in it

recompile
Good idea, I edited the code and removed all of the logging information incase no one cares for it to be logged. I also removed the message telling you everytime after respawn that your speed was set to whatever just incase anyone is annoyed with it in chat. The code is below.

PHP Code:
/*-----------------------------------------------/
 G L O B A L  S T U F F
------------------------------------------------*/
#include <sourcemod>
#include <sdktools>
#include <tf2>
#include <tf2_stocks>
#define PLUGIN_VERSION "1.1"
#define SCOUT_SPEED "400.0"
#define SOLDIER_SPEED "240.0"
#define PYRO_SPEED "300.0"
#define DEMOMAN_SPEED "280.0"
#define HEAVY_SPEED "230.0"
#define ENGINEER_SPEED "300.0"
#define MEDIC_SPEED "320.0"
#define SNIPER_SPEED "300.0"
#define SPY_SPEED "300.0"
new Handle:scout;
new 
Handle:soldier;
new 
Handle:pyro;
new 
Handle:demoman;
new 
Handle:heavy;
new 
Handle:engineer;
new 
Handle:medic;
new 
Handle:sniper;
new 
Handle:spy;
new 
Handle:adminOnly;
new 
Handle:enabled;
/*-----------------------------------------------/
 P L U G I N  I N F O
------------------------------------------------*/
public Plugin:myinfo 
{
 
name "[TF2] Speed Changer",
 
author "noodleboy347",
 
description "Allows admins to set the speed of each class",
 
version PLUGIN_VERSION,
 
url "http://www.frozencubes.com"
}
/*-----------------------------------------------/
 P L U G I N  S T A R T
------------------------------------------------*/
public OnPluginStart()
{
 
scout CreateConVar("sm_speed_scout"SCOUT_SPEED"Speed for Scouts");
 
soldier CreateConVar("sm_speed_soldier"SOLDIER_SPEED"Speed for Soldiers");
 
pyro =CreateConVar("sm_speed_pyro"PYRO_SPEED"Speed for Pyros");
 
demoman CreateConVar("sm_speed_demoman"DEMOMAN_SPEED"Speed for Demomen");
 
heavy CreateConVar("sm_speed_heavy"HEAVY_SPEED"Speed for Heavies");
 
engineer CreateConVar("sm_speed_engineer"ENGINEER_SPEED"Speed for Engineers");
 
medic CreateConVar("sm_speed_medic"MEDIC_SPEED"Speed for Medics");
 
sniper CreateConVar("sm_speed_sniper"SNIPER_SPEED"Speed for Snipers");
 
spy CreateConVar("sm_speed_spy"SPY_SPEED"Speed for Spies");
 
 
adminOnly CreateConVar("sm_speed_adminonly""0""Speed is only changed for admins");
 
enabled CreateConVar("sm_speed_enabled""1""Allows speeds to be altered");
 
CreateConVar("sm_speed_version"PLUGIN_VERSION"Speed Changer version");
 
 
RegAdminCmd("sm_speed_reset"Command_ResetADMFLAG_GENERIC);
 
 
HookEvent("player_spawn"Event_Spawn);
 
HookEvent("player_spawn"Event_Death);
 
 
AutoExecConfig();
}
/*-----------------------------------------------/
 P L A Y E R  S P A W N
------------------------------------------------*/
public Event_Spawn(Handle:event, const String:name[], bool:dontBroadcast)
{
 if(
GetConVarInt(enabled) == 1)
 {
  new 
client GetClientOfUserId(GetEventInt(event"userid"));
  
CreateTimer(0.1Timer_Speedclient);
 }
}
/*-----------------------------------------------/
 P L A Y E R  D E A T H
------------------------------------------------*/
public Event_Death(Handle:event, const String:name[], bool:dontBroadcast)
{
 
CloseHandle(Handle:Timer_Speed);
}
/*-----------------------------------------------/
 S P E E D  T I M E R
------------------------------------------------*/
public Action:Timer_Speed(Handle:timerany:client)
{
 new 
TFClassType:playerClass TF2_GetPlayerClass(client);
 if(
GetEntProp(clientProp_Send"m_nPlayerCond") & 1)
 {
  
//Nothing
 
}
 else
 {
  if(
GetConVarInt(adminOnly) == 0)
  {
   if(
playerClass == TFClass_Scout)
   {
    
SetEntPropFloat(clientProp_Send"m_flMaxspeed"GetConVarFloat(scout))
   }
   if(
playerClass == TFClass_Soldier)
   {
    
SetEntPropFloat(clientProp_Send"m_flMaxspeed"GetConVarFloat(soldier))
   }
   if(
playerClass == TFClass_Pyro)
   {
    
SetEntPropFloat(clientProp_Send"m_flMaxspeed"GetConVarFloat(pyro))
   }
   if(
playerClass == TFClass_DemoMan)
   {
    
SetEntPropFloat(clientProp_Send"m_flMaxspeed"GetConVarFloat(demoman))
   }
   if(
playerClass == TFClass_Heavy)
   {
    
SetEntPropFloat(clientProp_Send"m_flMaxspeed"GetConVarFloat(heavy))
   }
   if(
playerClass == TFClass_Engineer)
   {
    
SetEntPropFloat(clientProp_Send"m_flMaxspeed"GetConVarFloat(engineer))
   }
   if(
playerClass == TFClass_Medic)
   {
    
SetEntPropFloat(clientProp_Send"m_flMaxspeed"GetConVarFloat(medic))
   }
   if(
playerClass == TFClass_Sniper)
   {
    
SetEntPropFloat(clientProp_Send"m_flMaxspeed"GetConVarFloat(sniper))
   }
   if(
playerClass == TFClass_Spy)
   {
    
SetEntPropFloat(clientProp_Send"m_flMaxspeed"GetConVarFloat(spy))
   }
  }
  else
  {
   if(
GetUserFlagBits(client) & ADMFLAG_GENERIC)
   {
    if(
playerClass == TFClass_Scout)
    {
     
SetEntPropFloat(clientProp_Send"m_flMaxspeed"GetConVarFloat(scout))
    }
    if(
playerClass == TFClass_Soldier)
    {
     
SetEntPropFloat(clientProp_Send"m_flMaxspeed"GetConVarFloat(soldier))
    }
    if(
playerClass == TFClass_Pyro)
    {
     
SetEntPropFloat(clientProp_Send"m_flMaxspeed"GetConVarFloat(pyro))
    }
    if(
playerClass == TFClass_DemoMan)
    {
     
SetEntPropFloat(clientProp_Send"m_flMaxspeed"GetConVarFloat(demoman))
    }
    if(
playerClass == TFClass_Heavy)
    {
     
SetEntPropFloat(clientProp_Send"m_flMaxspeed"GetConVarFloat(heavy))
    }
    if(
playerClass == TFClass_Engineer)
    {
     
SetEntPropFloat(clientProp_Send"m_flMaxspeed"GetConVarFloat(engineer))
    }
    if(
playerClass == TFClass_Medic)
    {
     
SetEntPropFloat(clientProp_Send"m_flMaxspeed"GetConVarFloat(medic))
    }
    if(
playerClass == TFClass_Sniper)
    {
     
SetEntPropFloat(clientProp_Send"m_flMaxspeed"GetConVarFloat(sniper))
    }
    if(
playerClass == TFClass_Spy)
    {
     
SetEntPropFloat(clientProp_Send"m_flMaxspeed"GetConVarFloat(spy))
    }
   }
  }
 }
 if(
GetConVarInt(enabled) == 1)
 {
  
CreateTimer(0.0Timer_Speedclient);
 }
}
/*-----------------------------------------------/
 R E S E T S P E E D
------------------------------------------------*/
public Action:Command_Reset(clientargs)
{
 
SetConVarFloat(scout400.0);
 
SetConVarFloat(soldier240.0);
 
SetConVarFloat(pyro300.0);
 
SetConVarFloat(demoman280.0);
 
SetConVarFloat(heavy230.0);
 
SetConVarFloat(engineer300.0);
 
SetConVarFloat(medic320.0);
 
SetConVarFloat(sniper300.0);
 
SetConVarFloat(spy300.0);
 
ReplyToCommand(client"Restored all class speeds to their default values.")
 return 
Plugin_Handled;
}
/*-----------------------------------------------/
 C L I E N T  D I S C O N N E C T
------------------------------------------------*/
public OnClientDisconnect(client)
{
 if(
GetConVarInt(enabled) == 1)
 {
  
CloseHandle(Handle:Timer_Speed);
 }

h00x is offline
Reply



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 04:31.


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