Raised This Month: $12 Target: $400
 3% 

[H3LP] PlayerClass Fortress Forever


Post New Thread Reply   
 
Thread Tools Display Modes
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 11-28-2017 , 16:26   Re: [H3LP] PlayerClass Fortress Forever
Reply With Quote #11

Quote:
Originally Posted by DarthMan View Post
It was ff_monkey.
Alright we'll it's working fine for me on that map now with the changes. You will also want to remove DispatchSpawn completely because I noticed it was keeping the previous class' weapons.
hlstriker is offline
DarthMan
Veteran Member
Join Date: Aug 2011
Old 11-28-2017 , 16:27   Re: [H3LP] PlayerClass Fortress Forever
Reply With Quote #12

Quote:
Originally Posted by hlstriker View Post
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.
Worked now, many thanks !
But, what about retaining the old player's position?
It seems that if i changed the vec origin it resets back to default.

Also, this crashes the server.

Code:
stock void FF_RemoveAllWeapons(int client) {     int weaponIndex;         for (int i = 0; i <= 5; i++)     {         weaponIndex = 0;         while ((weaponIndex = GetPlayerWeaponSlot(client, i)) != -1)         {             RemovePlayerItem(client, weaponIndex);             AcceptEntityInput(weaponIndex, "Kill");         }     } }

Last edited by DarthMan; 11-28-2017 at 16:30.
DarthMan is offline
DarthMan
Veteran Member
Join Date: Aug 2011
Old 11-28-2017 , 16:58   Re: [H3LP] PlayerClass Fortress Forever
Reply With Quote #13

Quote:
Originally Posted by DarthMan View Post
Worked now, many thanks !
But, what about retaining the old player's position?
It seems that if i changed the vec origin it resets back to default.

Also, this crashes the server.

Code:
stock void FF_RemoveAllWeapons(int client) {     int weaponIndex;         for (int i = 0; i <= 5; i++)     {         weaponIndex = 0;         while ((weaponIndex = GetPlayerWeaponSlot(client, i)) != -1)         {             RemovePlayerItem(client, weaponIndex);             AcceptEntityInput(weaponIndex, "Kill");         }     } }
So removing DispatchSpawn will not keep the previous weapons?
Without it, the class will not be changed.

Last edited by DarthMan; 11-28-2017 at 17:00.
DarthMan is offline
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 11-28-2017 , 17:27   Re: [H3LP] PlayerClass Fortress Forever
Reply With Quote #14

Quote:
Originally Posted by DarthMan View Post
So removing DispatchSpawn will not keep the previous weapons?
Without it, the class will not be changed.
Calling DispatchSpawn within a few frames of force changing their class will cause the player to keep their original class weapons as well as obtaining the new class weapons (they will have both pairs of weapons). You will need to delay DispatchSpawn by enough frames so that doesn't happen. If you don't call DispatchSpawn they will still die and respawn like normal.
hlstriker is offline
DarthMan
Veteran Member
Join Date: Aug 2011
Old 11-28-2017 , 17:30   Re: [H3LP] PlayerClass Fortress Forever
Reply With Quote #15

Quote:
Originally Posted by hlstriker View Post
Calling DispatchSpawn within a few frames of force changing their class will cause the player to keep their original class weapons as well as obtaining the new class weapons (they will have both pairs of weapons). You will need to delay DispatchSpawn by enough frames so that doesn't happen. If you don't call DispatchSpawn they will still die and respawn like normal.
The player won't die at all. it will just respawn with the desired class after he's dead. Any way to strip the user weapons? The method I gave you crashes the server.
DarthMan is offline
DarthMan
Veteran Member
Join Date: Aug 2011
Old 11-29-2017 , 04:20   Re: [H3LP] PlayerClass Fortress Forever
Reply With Quote #16

Quote:
Originally Posted by hlstriker View Post
Calling DispatchSpawn within a few frames of force changing their class will cause the player to keep their original class weapons as well as obtaining the new class weapons (they will have both pairs of weapons). You will need to delay DispatchSpawn by enough frames so that doesn't happen. If you don't call DispatchSpawn they will still die and respawn like normal.
Any good way to strip user weapons? Turns out that the offset is invalid.

Last edited by DarthMan; 11-29-2017 at 04:28.
DarthMan is offline
Reply


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 08:57.


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