[H3LP] PlayerClass Fortress Forever
Could someone help me in getting and setting the player class id for the game Fortress Forever?
Code:
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 ! |
Re: [H3LP] PlayerClass Fortress Forever
The error I'm getting : L 11/26/2017 - 12:53:50: [SM] Exception reported: Property "m_iClass" not found (entity 1/player)
I can conrifm that the property m_iClass exists on FF. |
Re: [H3LP] PlayerClass Fortress Forever
You will want to use "m_iClassStatus". But that won't work to set the class, so read all to the end.
GetClassSlot PHP Code:
PHP Code:
Here is a simple plugin I whipped up so you can see how to change a client's class in Fortress-Forever. PHP Code:
|
Re: [H3LP] PlayerClass Fortress Forever
Quote:
I also tested the GetClassSlot and that seems to work fine. |
Re: [H3LP] PlayerClass Fortress Forever
Updated my post above.
|
Re: [H3LP] PlayerClass Fortress Forever
Quote:
#FF_ERROR_NOLONGERAVAILABLE. |
Re: [H3LP] PlayerClass Fortress Forever
Quote:
Also change this line: PHP Code:
PHP Code:
|
Re: [H3LP] PlayerClass Fortress Forever
Also instead of doing "GetEngineVersion()" within your stock you can just save it in a static variable or use HasEntProp()
|
Re: [H3LP] PlayerClass Fortress Forever
I went ahead and updated the ForceChangeClass function in my example plugin above. Although I would still like to know which map was giving you that message in console.
|
Re: [H3LP] PlayerClass Fortress Forever
Quote:
|
All times are GMT -4. The time now is 01:14. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.