View Single Post
Nursik
Senior Member
Join Date: Jul 2016
Location: In TF2
Old 09-27-2016 , 10:16   Re: [REQ] More terrorist Speed
Reply With Quote #5

Quote:
Originally Posted by shanapu View Post
try these:

PHP Code:
#pragma semicolon 1
#pragma newdecls required

#include <sourcemod>
#include <sdkhooks>

ConVar g_tspeed;

public 
void OnPluginStart()
{
    
g_tspeed CreateConVar("terrorist_speed""200.0""Sets terrorist team's speed");
}

public 
void OnClientPutInServer(int client)
{
    
SDKHook(clientSDKHook_SpawnOnPlayerSpawn);
    
SDKHook(clientSDKHook_WeaponSwitchOnPlayerWeaponSwitch);
}

public 
void OnPlayerSpawn(int client)
{
    if (
GetClientTeam(client) == 3)
    {
         
SetEntPropFloat(clientProp_Data"m_flLaggedMovementValue"g_tspeed.FloatValue);
    }
}

public 
void OnPlayerWeaponSwitch(int client)
{
    if (
GetClientTeam(client) == 3)
    {
        
SetEntPropFloat(clientProp_Data"m_flLaggedMovementValue"g_tspeed.FloatValue);
    }

lol, i forgot to include sdkhooks. And i still don't understand what are the "void"'s for in the "public"'s. Oh, the coding in cs:go is different than in tf2... Oh and Zibi17k, when you compile it you'll have to be using the values in floats, not integers. Float examples: 300.0, 450.50, 520.0. Integer examples: 200, 300, 100.

Last edited by Nursik; 09-27-2016 at 10:37.
Nursik is offline