Ammo station code?

I would like my ammo stations in my mod to work like those in tribes2.
Players can get a new armor, weapon, core, just by using the station.
This code works but some times the player coil skin, electric skin, effects get messed up..
I just can't seem to find the issue in my code below, if there are any Devs, around that understand how this could work, please help...

Basically, player skins on the back end and trails some times get messed up..
Try it out, replace your function Player::equipLoadout, in server\game\player.cs

I have been messing with trying to get the ammo station to function like ones in tribes2, or tribes, ever since I started modding legions. I had them working like tribes early on, but had a player ghosting bug, then a later update changed the whole function.

I dislike the current system, needing to respawn to change weapons, armors, cores, kinda blows. I already made simple code along time ago to make ammo station triggers team only if within a small radius of a teams flag stand and basically the main base area if the search distance is set to 100 or a little bit larger..

Basically, player skins on the back end and trails some times get messed up..
Try it out, replace your function Player::equipLoadout, in server\game\player.cs

I have been messing with trying to get the ammo station to function like ones tribes2, or tribes, ever since I started modding legions. I had them working like tribes early on, but had a player ghosting bug, then a later update changed the whole function.

I dislike the current system, needing to respawn to change weapons, armors, cores, kinda blows. I already made simple code along time ago to make ammo station triggers team only if within a small radius of a teams flag stand and basically the main base area if the search distance is set to 100 or a little bit larger..

Click to expand...

Ahaa, I would imagine there is some very inflexible coding around re-spawning to do with resetting a lot of stuff. (at a guess)

No its not assigned in the map or any place, I just made the changes to Player::equipLoadout, was thinking this would make all ammo stations in the game, give players new loadouts when selected, including armors.

No, I am going to have the ammo stations team only, in the trigger code, I will do a team flagstand search, then set the triggers team to that flags team.
Did this for my team only inventory stations in my old mod..

This is my older code for that.
To use, the flagstand datablock will need a class name added...

I just tested this, the player coil skin, electric skin, effects get messed up..
Same problem I had in my function posted at the top of this topic.
Also if i switch from light armor to heavy, the heavy will seem to use mass setting for the light, lol... I will post some pictures in the morning...

To fix that i had to add this to my first function in this topic..
This is ripped from the dodge core...

My scaling of the armors, was not the issue, removed it permanently, besides that nothing else should effect it..
On player respawn the coil skin, electric skin, effects issue is not there.
Only after using the Player::equipLoadout, with the basic changes you suggested..
No big deal, I kinda like the yellow looking blank skins on the back, not a big trade off for having tribes like inventorys