Raised This Month: $12 Target: $400
 3% 

[TF2 REQ] Set jump height


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
deadmau54
AlliedModders Donor
Join Date: May 2013
Old 01-03-2015 , 08:16   [TF2 REQ] Set jump height
Reply With Quote #1

I can't seem to find a plugin that allows players to set their jump height, I've seen 'set speed' one but there is no 'set jump height' plugin.

If anyone could do it, it would be greatly appretiated.

Thanks in advance.
__________________
deadmau54 is offline
Potato Uno
Veteran Member
Join Date: Jan 2014
Location: Atlanta, Georgia
Old 01-03-2015 , 15:53   Re: [TF2 REQ] Set jump height
Reply With Quote #2

Use the TF2Items give weapon plugin (the advanced one by a SM approver, not by FlamingSarge) and assign the jump height bonus attribute to the weapon?

I'm on mobile so I can't find the URL to the plugin or the attribute ID for jump height bonus. However, does that sound like an appropriate solution? (You may want to write a small wrapper plugin for it.)
Potato Uno is offline
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 01-03-2015 , 16:27   Re: [TF2 REQ] Set jump height
Reply With Quote #3

Command : sm_setjumpheight
CODE:
PHP Code:
#include <sourcemod>
#include <morecolors>
#include <tf2attributes>

new Float:JumpMultiplier[MAXPLAYERS+1] = 1.0;


public 
Plugin:myinfo =
{
    
name        =    "Set jump height",
    
author        =    "Arkarr",
    
description    =    "Set the jump height on a player",
    
version        =    "1.0",
    
url            =    "http://www.sourcemod.net"
};

public 
OnPluginStart()
{
    
RegAdminCmd("sm_setjumpheight"CMD_SetJumpHeightADMFLAG_CHEATS);
    
HookEvent("player_spawn"PlayerSpawn);
}

public 
Action:CMD_SetJumpHeight(clientargs)
{
    if(
args != 2)
    {
        
CPrintToChat(client"{green}[Jump Height]{default} Usage : sm_setjumpheight <target> <multiplier>");
        return 
Plugin_Handled;
    }
    
    
decl String:arg1[50], String:arg2[20];
    
GetCmdArg(1arg1sizeof(arg1));
    
GetCmdArg(2arg2sizeof(arg2));
    new 
String:target_name[MAX_TARGET_LENGTH];
    new 
target_list[MAXPLAYERS], target_count;
    new 
bool:tn_is_ml;
    if ((
target_count ProcessTargetString(
            
arg1,
            
client,
            
target_list,
            
MAXPLAYERS,
            
COMMAND_FILTER_NO_BOTS,
            
target_name,
            
sizeof(target_name),
            
tn_is_ml)) <= 0)
    {
        
ReplyToTargetError(clienttarget_count);
        return 
Plugin_Handled;
    }
    
    for (new 
0target_counti++)
    {
        
JumpMultiplier[target_list[i]] = StringToFloat(arg2);
        
TF2Attrib_SetByName(target_list[i], "increased jump height"JumpMultiplier[target_list[i]]);
    }
    
    return 
Plugin_Handled;
}

public 
Action:PlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast){
    
    new 
client GetClientOfUserId(GetEventInt(event"userid"));
    
    if(
IsValidClient(client) && JumpMultiplier[client] != 1.0)
        
TF2Attrib_SetByName(client"increased jump height"JumpMultiplier[client]);
    
    return 
Plugin_Continue;
}

stock bool:IsValidClient(client)
{
    if(
client <= ) return false;
    if(
client MaxClients) return false;
    if(!
IsClientConnected(client)) return false;
    return 
IsClientInGame(client);

NOTE: I set the attribute on the player instend of the weapon. 'cause I have no limit.
__________________
Want to check my plugins ?

Last edited by Arkarr; 01-03-2015 at 16:36.
Arkarr is offline
zyox123cc
Senior Member
Join Date: Jul 2016
Location: spycrab
Old 10-14-2016 , 09:47   Re: [TF2 REQ] Set jump height
Reply With Quote #4

Quote:
Originally Posted by Potato Uno View Post
Use the TF2Items give weapon plugin (the advanced one by a SM approver, not by FlamingSarge) and assign the jump height bonus attribute to the weapon?

I'm on mobile so I can't find the URL to the plugin or the attribute ID for jump height bonus. However, does that sound like an appropriate solution? (You may want to write a small wrapper plugin for it.)
sm_setjumpheight @bots 1000000 wtf i do
zyox123cc is offline
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 10-14-2016 , 11:08   Re: [TF2 REQ] Set jump height
Reply With Quote #5

Quote:
Originally Posted by zyox123cc View Post
sm_setjumpheight @bots 1000000 wtf i do
That necro bump haha
__________________
Want to check my plugins ?
Arkarr is offline
BraveFox
AlliedModders Donor
Join Date: May 2015
Location: Israel
Old 10-14-2016 , 11:14   Re: [TF2 REQ] Set jump height
Reply With Quote #6

Quote:
Originally Posted by Arkarr View Post
Command : sm_setjumpheight

NOTE: I set the attribute on the player instend of the weapon. 'cause I have no limit.
Use the new style.
PHP Code:
include <sourcemod
#include <morecolors> 
#include <tf2attributes> 

int float JumpMultiplier[MAXPLAYERS+1] = 1.0


public 
Plugin:myinfo 

    
name        =    "Set jump height"
    
author        =    "Arkarr"
    
description    =    "Set the jump height on a player"
    
version        =    "1.0"
    
url            =    "http://www.sourcemod.net" 
}; 

public 
OnPluginStart() 

    
RegAdminCmd("sm_setjumpheight"CMD_SetJumpHeightADMFLAG_CHEATS); 
    
HookEvent("player_spawn"PlayerSpawn); 


public 
Action CMD_SetJumpHeight(clientargs

    if(
args != 2
    { 
        
CPrintToChat(client"{green}[Jump Height]{default} Usage : sm_setjumpheight <target> <multiplier>"); 
        return 
Plugin_Handled
    } 
     
    
char arg1[50], char arg2[20]; 
    
GetCmdArg(1arg1sizeof(arg1)); 
    
GetCmdArg(2arg2sizeof(arg2)); 
    
char target_name[MAX_TARGET_LENGTH]; 
    
int target_list[MAXPLAYERS], target_count
    
bool tn_is_ml
    if ((
target_count ProcessTargetString
            
arg1
            
client
            
target_list
            
MAXPLAYERS
            
COMMAND_FILTER_NO_BOTS
            
target_name
            
sizeof(target_name), 
            
tn_is_ml)) <= 0
    { 
        
ReplyToTargetError(clienttarget_count); 
        return 
Plugin_Handled
    } 
     
    for (
int i 0target_counti++) 
    { 
        
JumpMultiplier[target_list[i]] = StringToFloat(arg2); 
        
TF2Attrib_SetByName(target_list[i], "increased jump height"JumpMultiplier[target_list[i]]); 
    } 
     
    return 
Plugin_Handled


public 
Action PlayerSpawn(Handle eventchar name[64], bool dontBroadcast){ 
     
    new 
client GetClientOfUserId(GetEventInt(event"userid")); 
     
    if(
IsValidClient(client) && JumpMultiplier[client] != 1.0
        
TF2Attrib_SetByName(client"increased jump height"JumpMultiplier[client]); 
     
    return 
Plugin_Continue


stock bool IsValidClient(client

    if(
client <= ) return false
    if(
client MaxClients) return false
    if(!
IsClientConnected(client)) return false
    return 
IsClientInGame(client); 

__________________
Contact Me:
Steam: NoyB
Discord: Noy#9999
Taking Private Requests

Last edited by BraveFox; 10-14-2016 at 11:16.
BraveFox is offline
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 10-14-2016 , 11:16   Re: [TF2 REQ] Set jump height
Reply With Quote #7

Quote:
Originally Posted by BraveFox View Post
Use the new style.
[...]
Dude, it was the 3 January 2015. No new style at this date.
__________________
Want to check my plugins ?

Last edited by Arkarr; 10-14-2016 at 11:48.
Arkarr is offline
shanapu
Veteran Member
Join Date: Apr 2015
Location: .de
Old 10-14-2016 , 12:28   Re: [TF2 REQ] Set jump height
Reply With Quote #8

Quote:
Originally Posted by BraveFox View Post
PHP Code:
int float JumpMultiplier[MAXPLAYERS+1] = 1.0
int float?

Quote:
Originally Posted by BraveFox View Post
Use the new style.
PHP Code:
public Action CMD_SetJumpHeight(clientargs
This and some other parts are not Transitional Syntax. https://wiki.alliedmods.net/SourcePa...itional_Syntax

try with this
PHP Code:
#pragma newdecls required 
__________________
coding & free software

Last edited by shanapu; 10-14-2016 at 12:37.
shanapu is offline
Reply



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 17:47.


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