Raised This Month: $ Target: $400
 0% 

TF2 Tools


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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 - 2592 views - 7.6 KB)
File Type: inc tf2.inc (1.4 KB, 1361 views)
File Type: txt nican.offsets.txt (115 Bytes, 1360 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
 


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 18:13.


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