View Single Post
Author Message
CryForMe
Junior Member
Join Date: Sep 2014
Old 12-18-2014 , 22:37   I cannot get this to work. I must be missing something. (AI speed control)
Reply With Quote #1

I've tried to get this to work, in numerous ways. I just can't determine what I'm missing. It compiles just fine, no errors. But it just doesn't work. All I want this to do is control the speed of the AI zombies. (I'm looking to speed them up.)

Here's what I've done.
PHP Code:
/*
* SourceMod Script
*/

#include <sourcemod>
#include <sdktools>

#define PLUGIN_VERSION "1.0"

new Handle:g_Cvar_zSpeed

public Plugin:myinfo 
{
    
name "zSpeed",
    
author "CryForMe",
    
description "Speeds Up Zombies",
    
version PLUGIN_VERSION,
    
url "http://www.contagiondeathsquad.clanservers.com/"
};


public 
OnPluginStart()
{
    
CreateConVar("sm_zSpeed_version"PLUGIN_VERSION"zSpeed Version"FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY)
    
g_Cvar_zSpeed    CreateConVar("sm_zSpeed""3.0"" Sets the zombies speed "FCVAR_PLUGIN)
   
    
AutoExecConfig();   
}


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

.
Game is Contagion.
..
CryForMe is offline