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

[TF2] How to short a comnand?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Pootisbird
Junior Member
Join Date: Jan 2013
Location: Germany
Old 01-17-2013 , 14:45   [TF2] How to short a comnand?
Reply With Quote #1

Hey hey
Is it possible to short a command?
like : sm_giveballs @me 5 to sm_ball

Can someone make this for me?

sm_giveballs @me 5 to sm_ball

sm_givepiss @me 5 to sm_piss

sm_setspeed @me 420 to sm_premspeed

sm_setmetal @me 1000 to sm_premmetal

Pls
__________________


Pootisbird is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 01-17-2013 , 14:49   Re: [TF2] How to short a comnand?
Reply With Quote #2

PHP Code:
#pragma semicolon 1

#include <sourcemod>

public OnPluginStart() {
    
RegConsoleCmd("sm_ball"Command_Ball);
    
RegConsoleCmd("sm_piss"Command_Piss);
    
RegConsoleCmd("sm_premspeed"Command_Speed);
    
RegConsoleCmd("sm_premmetal"Command_Metal);
}

public 
Action:Command_Ball(clientargs) {
    
ServerCommand("sm_giveballs #%d 5"GetClientUserId(client));
    return 
Plugin_Handled;
}

public 
Action:Command_Piss(clientargs) {
    
ServerCommand("sm_givepiss #%d 5"GetClientUserId(client));
    return 
Plugin_Handled;
}

public 
Action:Command_Speed(clientargs) {
    
ServerCommand("sm_setspeed #%d 420"GetClientUserId(client));
    return 
Plugin_Handled;
}

public 
Action:Command_Metal(clientargs) {
    
ServerCommand("sm_setmetal #%d 1000"GetClientUserId(client));
    return 
Plugin_Handled;

__________________

Last edited by Dr. McKay; 01-17-2013 at 14:49.
Dr. McKay is offline
Pootisbird
Junior Member
Join Date: Jan 2013
Location: Germany
Old 01-17-2013 , 15:04   Re: [TF2] How to short a comnand?
Reply With Quote #3

Now, this was fast! Thanks but what now with this xD
__________________


Pootisbird is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 01-17-2013 , 16:20   Re: [TF2] How to short a comnand?
Reply With Quote #4

Paste it here: http://www.sourcemod.net/compiler.php
__________________
Dr. McKay is offline
Sheepdude
SourceMod Donor
Join Date: Aug 2012
Location: Chicago
Old 01-17-2013 , 17:21   Re: [TF2] How to short a comnand?
Reply With Quote #5

Can't you just use "alias"?
__________________
Sheepdude is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 01-17-2013 , 17:21   Re: [TF2] How to short a comnand?
Reply With Quote #6

Quote:
Originally Posted by Sheepdude View Post
Can't you just use "alias"?
Not if you want clients to be able to use the short commands.
__________________
Dr. McKay is offline
Sheepdude
SourceMod Donor
Join Date: Aug 2012
Location: Chicago
Old 01-17-2013 , 17:24   Re: [TF2] How to short a comnand?
Reply With Quote #7

I see.
__________________
Sheepdude is offline
captaindeterprimary
AlliedModders Donor
Join Date: Sep 2012
Old 01-18-2013 , 13:57   Re: [TF2] How to short a comnand?
Reply With Quote #8

Quote:
Originally Posted by Dr. McKay View Post
Spoiler
I love you.

Could you also post the code to toggle the arg 0 && 1
__________________
Last edited by ; Today at 08:20 AM. Reason: Get rid of s

Last edited by captaindeterprimary; 01-18-2013 at 14:00.
captaindeterprimary 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 22:34.


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