Raised This Month: $ Target: $400
 0% 

[H3LP] PlayerClass Fortress Forever


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
DarthMan
Veteran Member
Join Date: Aug 2011
Old 11-25-2017 , 11:05   [H3LP] PlayerClass Fortress Forever
Reply With Quote #1

Could someone help me in getting and setting the player class id for the game Fortress Forever?

Code:
stock int GetPlayerClass(int client) {     if(!IsPlayer(client))         return 0;         if (GetEngineVersion() == Engine_DarkMessiah)         return GetEntProp(client, Prop_Send, "m_iPlayerClass");         return GetEntProp(client, Prop_Send, "m_iClass"); } stock int SetPlayerClass(int client, int class, bool persistant=false) {     if(!IsPlayer(client))         return 0;         if (GetEngineVersion() == Engine_DarkMessiah)         SetEntProp(client, Prop_Send, "m_iPlayerClass", class);     else         SetEntProp(client, Prop_Send, "m_iClass", class);         if(persistent)         SetEntProp(client, Prop_Send, "m_iDesiredPlayerClass", class);         return 1; }

I tried to print the player class when typing console command classname but it throwed an error so I guess that something might be wrong on the stock maybe?
I got the netprops and it seems that FF indded contains the m_iClass prop.

Thanks !

Last edited by DarthMan; 11-25-2017 at 11:17.
DarthMan is offline
 



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 07:34.


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