Thread: TF2 Stocks
View Single Post
Author Message
naris
AlliedModders Donor
Join Date: Dec 2006
Old 05-08-2010 , 14:42   TF2 Stocks
Reply With Quote #1

Here are several stocks I use for TF2 for various things. Included here are:

○ tf2_ammo
PHP Code:
enum TFAmmoTypes
stock TF2_GetAmmoAmount
(client,TFAmmoTypes:type=Primary)
stock TF2_SetAmmoAmount(clientammo,TFAmmoTypes:type=Primary)
stock TF2_GetMetalAmount(client)
stock TF2_GetMetalAmount(client


○ tf2_build
PHP Code:
stock BuildSentry(hBuilder, const Float:fOrigin[3], const Float:fAngle[3], iLevel=1,
                  
bool:bDisabled=falsebool:bMini=falsebool:bShielded=false,
                  
iHealth=-1iMaxHealth=-1iShells=-1iRockets=-1,
                  
Float:flPercentage=1.0)

stock BuildDispenser(hBuilder, const Float:fOrigin[3], const Float:fAngle[3], iLevel=1,
                     
bool:iDisabled=falseiHealth=-1iMaxHealth=-1iMetal=-1,
                     
Float:flPercentage=1.0TFExtObject:type=TFExtObject_Dispenser)

stock BuildTeleporterEntry(hBuilder, const Float:fOrigin[3], const Float:fAngle[3],
                           
iLevel=1bool:iDisabled=falseiHealth=-1iMaxHealth=-1,
                           
Float:flPercentage=1.0)

stock BuildTeleporterExit(hBuilder, const Float:fOrigin[3], const Float:fAngle[3],
                          
iLevel=1bool:iDisabled=falseiHealth=-1iMaxHealth=-1,
                          
Float:flPercentage=1.0


tf2_cloak tf2_meter
PHP Code:
stock Float:TF2_GetCloakMeter(client)
stock TF2_SetCloakMeter(client,Float:cloakMeter)
stock Float:TF2_GetChargeMeter(client)
stock TF2_SetChargeMeter(client,Float:chargeMeter)
stock Float:TF2_GetRageMeter(client)
stock TF2_SetRageMeter(client,Float:rageMeter)
stock Float:TF2_GetHypeMeter(client)
stock TF2_SetHypeMeter(client,Float:hypeMeter)
stock Float:TF2_GetEnergyDrinkMeter(client)
stock TF2_SetEnergyDrinkMeter(client,Float:energyDrinkMeter


○ tf2_flag
PHP Code:
stock bool:TF2_HasTheFlag(client)
stock TF2_GetFlagCarrier(team


○ tf2_game_text: Display text box message similar to domination messages
PHP Code:
stock tf2_game_text(const String:message[], const String:icon[]=""


○ tf2_objects
PHP Code:
enum TFExtObjectType
{
    
TFExtObject_Unknown = -1,
    
TFExtObject_CartDispenser 0,
    
TFExtObject_Dispenser 0,
    
TFExtObject_Teleporter 1,
    
TFExtObject_Sentry 2,
    
TFExtObject_Sapper 3,
    
TFExtObject_TeleporterEntry,
    
TFExtObject_TeleporterExit,
    
TFExtObject_MiniSentry,
    
TFExtObject_Amplifier,
    
TFExtObject_RepairNode,
    
TFExtObject_UpgradeStation
};

stock const String:TF2_ObjectClassNames[TFExtObjectType][]
stock const String:TF2_ObjectNames[TFExtObjectType][]
stock TF2_ObjectModes[TFExtObjectType]

// Sentry Ammo for each Level
stock const TF2_MaxSentryShells[]
stock const TF2_MaxSentryRockets[]
stock const TF2_SentryHealth[]

stock const TF2_MaxUpgradeMetal
stock 
const TF2_MaxDispenserMetal

stock TFExtObjectType
:TF2_GetExtObjectType(entitybool:specific=false


○ tf2_optional: Automatically makes tf2 natives optional when REQUIRE_EXTENSIONS is not defined
PHP Code:
public __ext_tf2_SetNTVOptional


○ tf2_player
PHP Code:
stock const String:TF2_TeamName[TFTeam][]
stock const String:TF2_ClassName[TFClassType][]
stock const TF2_ClassHealth[TFClassType]
stock const Float:TF2_ClassSpeed[TFClassType]

const 
String:TF2_GetClassName(TFClassType:class)
TF2_GetClassHealth(TFClassType:class)
Float:TF2_GetClassSpeed(TFClassType:class)

stock TF2_GetNumHealers(client)
stock Float:TF2_GetPlayerSpeed(client)
stock TF2_GetPlayerMaxHealth(client)

bool:TF2_Is<condition>(pcond)
bool:TF2_IsPlayer<condition>(client)

stock TF2_GetPlayerConditionLowBits(client)
stock TF2_GetPlayerConditionHighBits(client


○ tf2_uber
PHP Code:
stock TF2_IsUberCharge(client)
stock Float:TF2_GetUberLevel(client)
stock TF2_SetUberLevel(clientFloat:uberlevel)

// Ex functions validate player is a medic with a medigun first
stock TF2_ExIsUberCharge(client)
stock Float:TF2_ExGetUberLevel(client
stock bool:TF2_ExSetUberLevel(clientFloat:uberlevel)
stock TF2_GetNumHealers(client)
stock TF2_GetHealingTarget(client, &bool:ubered false


○ weapons
PHP Code:
#define MAX_SLOTS 48
stock GetActiveWeapon(clientbool:validate=true)
stock GetCurrentWeaponClass(clientString:name[], maxlength)
stock GetCurrentWeaponEdictClass(clientString:name[], maxlength)
stock GetClip(weapon)
stock SetClip(weaponamount)
stock GetAmmoType(weapon)

stock SetNextAttack(clientFloat:duration=0.0

Attached Files
File Type: inc tf2_ammo.inc (916 Bytes, 975 views)
File Type: inc tf2_build.inc (17.6 KB, 975 views)
File Type: inc tf2_flag.inc (895 Bytes, 1177 views)
File Type: inc tf2_game_text.inc (1.3 KB, 637 views)
File Type: inc tf2_objects.inc (3.4 KB, 668 views)
File Type: inc tf2_player.inc (16.2 KB, 703 views)
File Type: inc tf2_uber.inc (3.3 KB, 863 views)
File Type: inc tf2_meter.inc (1.5 KB, 960 views)
File Type: inc tf2_giveweapon.inc (6.5 KB, 915 views)
File Type: inc weapons.inc (2.2 KB, 763 views)

Last edited by naris; 08-29-2012 at 22:49.
naris is offline