From 1562530cdd7eb7cd30c042612374e72f245d8d6a Mon Sep 17 00:00:00 2001 From: Alexander Corn Date: Tue, 11 Nov 2014 02:23:44 -0500 Subject: [PATCH] Added TF2_GetClientTeam stock Also fixed some weird spacing and language in doc comments --- plugins/include/tf2_stocks.inc | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/plugins/include/tf2_stocks.inc b/plugins/include/tf2_stocks.inc index 43f69e24..5a411f6a 100644 --- a/plugins/include/tf2_stocks.inc +++ b/plugins/include/tf2_stocks.inc @@ -319,7 +319,19 @@ static const String:TFResourceNames[TFResourceType][] = }; /** - * Get's a Clients current class. + * Gets a client's current team. + * + * @param client Client index. + * @return Current TFTeam of client. + * @error Invalid client index. + */ +stock TFTeam:TF2_GetClientTeam(client) +{ + return TFTeam:GetClientTeam(client); +} + +/** + * Gets a client's current class. * * @param client Player's index. * @return Current TFClassType of player. @@ -331,14 +343,14 @@ stock TFClassType:TF2_GetPlayerClass(client) } /** - * Set's a Clients class. + * Sets a client's class. * * Note: If setting player class in a player spawn hook weapons should be set to false. * * @param client Player's index. * @param classType TFClassType class symbol. - * @param weapons This paramater is ignored. - * @param persistent If true changes the players desired class so the change stays after death. + * @param weapons This parameter is ignored. + * @param persistent If true, changes the player's desired class so the change stays after death. * @noreturn * @error Invalid client index. */ @@ -369,12 +381,12 @@ stock TF2_GetPlayerResourceData(client, TFResourceType:type) } new offset = FindSendPropInfo("CTFPlayerResource", TFResourceNames[type]); - + if (offset < 1) { return -1; } - + new entity = TF2_GetResourceEntity(); if (entity == -1) @@ -405,12 +417,12 @@ stock bool:TF2_SetPlayerResourceData(client, TFResourceType:type, any:value) } new offset = FindSendPropInfo("CTFPlayerResource", TFResourceNames[type]); - + if (offset < 1) { return false; } - + new entity = TF2_GetResourceEntity(); if (entity == -1)