View Single Post
CryForMe
Junior Member
Join Date: Sep 2014
Old 11-23-2014 , 16:16   Re: Control Speed of AI Only?
Reply With Quote #5

Ok, here's what I've tried so far and I can't seem to get it working.

PHP Code:
/*
* SourceMod Script
*/

#include <sourcemod>
#include <sdktools>

#define PLUGIN_VERSION "1.0"

new Handle:g_Cvar_zSpeed
new Handle:g_Cvar_zWeight

public Plugin:myinfo 
{
    
name "zSpeed",
    
author "",
    
description "Speeds Up Zombies",
    
version PLUGIN_VERSION,
    
url ""
};


public 
OnPluginStart()
{
    
CreateConVar("sm_zspeed_version"PLUGIN_VERSION"zSpeed Version"FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY)
    
g_Cvar_zspeed    CreateConVar("sm_zspeed_speed""3.0"" Sets the zombies speed "FCVAR_PLUGIN)
    
g_Cvar_zweight   CreateConVar("sm_zspeed_weight""0.0"" Sets the zombies weight"FCVAR_PLUGIN)
   
    
AutoExecConfig();   
    
}

public 
OnEntityCreated(ent, const String:classname[]){
if(
StrEqual(classname"zombie"false)){
   
    
SetEntPropFloat(entProp_Data"m_flLaggedMovementValue"GetConVarFloat(g_cvar_zspeed))
    
SetEntityGravity(entGetConVarFloat(g_Cvar_zWeight))
}  

CryForMe is offline