Raised This Month: $ Target: $400
 0% 

Control Speed of AI Only?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CryForMe
Junior Member
Join Date: Sep 2014
Old 11-23-2014 , 16:16   Re: Control Speed of AI Only?
Reply With Quote #1

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
Reply


Thread Tools
Display Modes

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 05:09.


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