Raised This Month: $32 Target: $400
 8% 

TF2 Tools


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Nican
Veteran Member
Join Date: Jan 2006
Location: NY
Old 10-26-2007 , 20:13   TF2 Tools
Reply With Quote #1

TF2 tools

Description
For now this plugin is kind of useless, It only give some extra commands to other plugins...
I am working on (Not done) class-blocker and instant build in build phase

Version: 1.2

Installation:
  • Put tftools.smx into /plugins folder
  • Put nican.offsets.txt into /gamedata
  • Put tf2.inc into /scripting/include (Not required)
Note: All folders are related to the SourceMod base folder, in <gamemod>\addons\sourcemod

Avaliable tools for scripters:
PHP Code:
#define TF2_SCOUT 1
#define TF2_SNIPER 2
#define TF2_SOLDIER 3 
#define TF2_DEMOMAN 4
#define TF2_MEDIC 5
#define TF2_HEAVY 6
#define TF2_PYRO 7
#define TF2_SPY 8
#define TF2_ENG 9


/**
 * Changes the level of a turret, the sentry has to be build
 *
 * @param index         Player ID or Sentry ID
 * @param level            Level to change to, 1-3
 * @return                0 = sucess, 
 *                        2=builing state
 *                        3=It is not a sentry
 *                        4=Could not find sentry of Player ID
 *                        5=Client not conneted
 *                        6=not a valid level
 */
native TF_TurretLevel(indexlevel);

/**
 * Finds the turret the player is looking at
 *
 * @param index         Finds by trace to what turrent the player is looking at
 * @return                Sentry id, 0 on failture
 */
native TF_EyeTurret(client);


/**
 * Get the class of the player
 *
 * @param index         Client index
 * @return                class number    
 */
native TF_GetClass(client);

/**
 * Get the max health of the player
 *
 * @param index         Client index
 * @return                Max health
 */
native TF_GetMaxHealth(client);

/**
 * Get client total score
 *
 * @param index         Client index
 * @return                Total score    
 */
native TF_TotalScore(client);

/**
 * Return the CTFPlayerResource id
 *
 * @return                CTFPlayerResource id
 */
native TF_GetResource(client); 

Exemple:
PHP Code:
public Action:MakeTurretThree(clientargs){
    new 
aimtr;
    
aim TF_EyeTurret(client);
    
    if(
aim == 0){
        
ReplyToCommand(client"[NC] You are not looking at a turret!");
        return;
    }
    
    
tr TF_TurretLevel(aim3);
    
    if(
tr == 0){
        
ReplyToCommand(client"[NC] Turret level chaned to 3!");
    } else {
        
ReplyToCommand(client"[NC] Failure!");
    }

I need some ideas to what to do next, gimme some


Change log
  • October 26, 2007
    • Initial release
  • October 27, 2007
    • Added class support
  • October 28, 2007
    • Added some more natives
Attached Files
File Type: sp Get Plugin or Get Source (tftools.sp - 2541 views - 7.6 KB)
File Type: inc tf2.inc (1.4 KB, 1341 views)
File Type: txt nican.offsets.txt (115 Bytes, 1339 views)
__________________
http://www.nican132.com
I require reputation!

Last edited by Nican; 11-05-2007 at 20:32.
Nican is offline
Send a message via ICQ to Nican Send a message via MSN to Nican
urus
Senior Member
Join Date: Jan 2007
Old 10-26-2007 , 22:03   Re: TF2 Tools
Reply With Quote #2

You can make restrict player clasess per team (defined by admin)!?

Last edited by urus; 10-26-2007 at 22:06.
urus is offline
Nican
Veteran Member
Join Date: Jan 2006
Location: NY
Old 10-26-2007 , 23:12   Re: TF2 Tools
Reply With Quote #3

I was thinking of doing that now :O
__________________
http://www.nican132.com
I require reputation!
Nican is offline
Send a message via ICQ to Nican Send a message via MSN to Nican
_cm
New Member
Join Date: Oct 2007
Old 10-27-2007 , 09:46   Re: TF2 Tools
Reply With Quote #4

That would be great! Our server is always filled with pyros and it's just sad. Being able to restrict classes would make a big difference in there. Thumbs up!
_cm is offline
Nican
Veteran Member
Join Date: Jan 2006
Location: NY
Old 10-27-2007 , 17:04   Re: TF2 Tools
Reply With Quote #5

1/2 done

I was able to get Player Class, now I have to set it to a value
__________________
http://www.nican132.com
I require reputation!
Nican is offline
Send a message via ICQ to Nican Send a message via MSN to Nican
K2
Member
Join Date: Oct 2004
Location: HELL
Old 10-27-2007 , 22:08   Re: TF2 Tools
Reply With Quote #6

Nice Nican, hopefully other mod authors will find this useful.
__________________
- http://www.hardfought.org
- IRC: #hardfought on gamesurge.net
K2 is offline
Bandare
Junior Member
Join Date: Jan 2007
Old 10-28-2007 , 14:04   Re: TF2 Tools
Reply With Quote #7

can you define what exactly this does a little better in the top post..... looks great but don't really know what it does.....

thanks
Bandare is offline
FlyingMongoose
Veteran Member
Join Date: Mar 2004
Old 10-28-2007 , 15:31   Re: TF2 Tools
Reply With Quote #8

it's an api for plugin developers it actually belongs here
http://forums.alliedmods.net/forumdisplay.php?f=112
__________________
Please do NOT PM for support.

Only ask for support in plugin threads.

TunedChaos.com - Precision Tuned Game Servers
FlyingMongoose is offline
Lio4
New Member
Join Date: Nov 2007
Old 11-04-2007 , 06:05   Re: TF2 Tools
Reply With Quote #9

Your plugin doesn't work
I put tftools.smx in plugins folder

11 <Error> "TF Tools" (1.2) by Nican132
Lio4 is offline
Nican
Veteran Member
Join Date: Jan 2006
Location: NY
Old 11-04-2007 , 09:17   Re: TF2 Tools
Reply With Quote #10

Does it show any errors?
__________________
http://www.nican132.com
I require reputation!
Nican is offline
Send a message via ICQ to Nican Send a message via MSN to Nican
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 21:13.


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