Raised This Month: $44 Target: $400
 11% 

[REQ] More terrorist Speed


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Zibi17k
Member
Join Date: Sep 2015
Old 09-26-2016 , 17:55   [REQ] More terrorist Speed
Reply With Quote #1

Hallo
Need plugin increase terrorist speed.
Somebody have this plugin?
Zibi17k is offline
Nursik
Senior Member
Join Date: Jul 2016
Location: In TF2
Old 09-27-2016 , 03:32   Re: [REQ] More terrorist Speed
Reply With Quote #2

Quote:
Originally Posted by Zibi17k View Post
Hallo
Need plugin increase terrorist speed.
Somebody have this plugin?
PHP Code:
#pragma semicolon 1
#include sourcemod

ConVar g_tspeed;

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

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

public 
OnPlayerSpawn(client)
{
    if (
GetClientTeam(client) == 3)
    {
         
SetEntPropFloat(client"m_flLaggedMovementValue"GetConvarFloat(g_tspeed));
    }
}

public 
OnPlayerWeaponSwitch(client)
{
    if (
GetClientTeam(client) == 3)
    {
        
SetEntPropFloat(client"m_flLaggedMovementValue"GetConvarFloat(g_tspeed));
    }

Set terrorist_speed cvar to the speed you want, but i haven't tested it. You'll have to compile this as an .sp file.

Last edited by Nursik; 09-27-2016 at 03:46.
Nursik is offline
Zibi17k
Member
Join Date: Sep 2015
Old 09-27-2016 , 04:42   Re: [REQ] More terrorist Speed
Reply With Quote #3

Thx, but I can't complier it
Code:
// terrorist_speed.sp(8) : error 017: undefined symbol "CreateConvar"
// terrorist_speed.sp(8) : warning 213: tag mismatch
// terrorist_speed.sp(13) : error 017: undefined symbol "SDKHook"
// terrorist_speed.sp(14) : error 017: undefined symbol "SDKHook"
// terrorist_speed.sp(21) : error 035: argument type mismatch (argument 2)
// terrorist_speed.sp(29) : error 035: argument type mismatch (argument 2)
//
// 5 Errors.

Last edited by Zibi17k; 09-27-2016 at 04:44.
Zibi17k is offline
shanapu
Veteran Member
Join Date: Apr 2015
Location: .de
Old 09-27-2016 , 08:41   Re: [REQ] More terrorist Speed
Reply With Quote #4

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);
    }

__________________
free software
coding
shanapu is offline
Nursik
Senior Member
Join Date: Jul 2016
Location: In TF2
Old 09-27-2016 , 11: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 11:37.
Nursik is offline
xines
Veteran Member
Join Date: Aug 2013
Location: Denmark
Old 09-27-2016 , 11:32   Re: [REQ] More terrorist Speed
Reply With Quote #6

Quote:
Originally Posted by Nursik View Post
And i still don't understand what are the "void"'s for in the "public"'s.
Void, basically means no return is needed.
Like if you did a Action function, then you would need to tell the function what to return, like:
PHP Code:
return Plugin_Continue;        /**< Continue with the original action */
return Plugin_Changed;        /**< Inputs or outputs have been overridden with new values */
return Plugin_Handled;        /**< Handle the action at the end (don't call it) */
return Plugin_Stop;        /**< Immediately stop the hook chain and handle the original */ 
__________________
xines is offline
Nursik
Senior Member
Join Date: Jul 2016
Location: In TF2
Old 09-27-2016 , 11:36   Re: [REQ] More terrorist Speed
Reply With Quote #7

Quote:
Originally Posted by xines View Post
Void, basically means no return is needed.
Like if you did a Action function, then you would need to tell the function what to return, like:
PHP Code:
return Plugin_Continue;        /**< Continue with the original action */
return Plugin_Changed;        /**< Inputs or outputs have been overridden with new values */
return Plugin_Handled;        /**< Handle the action at the end (don't call it) */
return Plugin_Stop;        /**< Immediately stop the hook chain and handle the original */ 
Thanks, mate. Can you or someone tell me why people use iClient or int client instead of client? Is that because of the "new-decl" pragma?

Last edited by Nursik; 09-27-2016 at 11:47.
Nursik is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 09-27-2016 , 11:36   Re: [REQ] More terrorist Speed
Reply With Quote #8

Quote:
Originally Posted by Nursik View Post
Oh, the coding in cs:go is different than in tf2....
Nah, you were just mixing the old syntax with the newer syntax.

Also, Terrorist team is Team 2.
Also hooking OnSpawn instead of the player_spawn doesn't seem like that would work, however it will still work because of the weapon switching.

Last edited by Mitchell; 09-27-2016 at 11:37.
Mitchell is offline
Nursik
Senior Member
Join Date: Jul 2016
Location: In TF2
Old 09-27-2016 , 12:12   Re: [REQ] More terrorist Speed
Reply With Quote #9

Quote:
Originally Posted by Mitchell View Post
Nah, you were just mixing the old syntax with the newer syntax.
Yeah, i noticed, but GetConVarFloat should have worked in both tf2 and cs. And cs has a different netprop than tf2. Plus tf2 has red team as team 3, i think. So that's why i say tf2 is different codewise.

Quote:
Originally Posted by xines View Post
Try this.

PHP Code:
#pragma semicolon 1
#pragma newdecls required
#include <sourcemod>

ConVar g_tspeed;

public 
void OnPluginStart()
{
    
g_tspeed CreateConVar("terrorist_speed""2.0""Sets terrorist team's speed");
    
HookEvent("player_spawn"PlayerSpawn);
}

public 
Action PlayerSpawn(Event event, const char[] namebool dontBroadcast)
{
    
int client GetClientOfUserId(event.GetInt("userid"));
    if(
IsClientInGame(client) && IsPlayerAlive(client) && GetClientTeam(client) == 2)
        
SetEntPropFloat(clientProp_Data"m_flLaggedMovementValue"g_tspeed.FloatValue);
    
    return 
Plugin_Continue;

Should hook weapon switch, because speed changes when you change weps. And the speed value is so low, didn't know about that in CS:GO.

Last edited by Nursik; 09-27-2016 at 12:23.
Nursik is offline
xines
Veteran Member
Join Date: Aug 2013
Location: Denmark
Old 09-27-2016 , 12:32   Re: [REQ] More terrorist Speed
Reply With Quote #10

Quote:
Originally Posted by Nursik View Post
Should hook weapon switch, because speed changes when you change weps. And the speed value is so low, didn't know about that in CS:GO.
Notice in CS:S, CS:GO, 2.0 equals 200% speed, i thought 200.0 was a typo, since that would result in 20000% speed lol.

Here then:
Spoiler
__________________
xines 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 07:36.


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