Player DeathDrop
-
I have some specially request for my server side mod, now for death drop, I don’t know how to get it works perfect.
I know the fuse, but when i use it, death drop will also be active when NPC dead, so player will can follow a npc and waiting it dead for get npc’s ammo etc …. And i don’t want my server become a junker’s home… i want death drop only active on playership, How can i do this? (serverside please)
-
This is a tricky one. You could go the mod-side route and clone player versions of all ships, however that will not be strictly server-side for obvious reasons. My only other suggestion would be some sort of Hook-side implementation, and I believe one exists somewhere - check out the FLHook Plugin version, that’d be my first guess.
-
U can make a death fuse drop and add it to every ship or add the fuse at the end of the death fuses of the ship.
Of course this will mean that also the NPC’s will drop their stuff on death. -
I have done my “money taker” plugin, it runs good, but i wish a hook to make player only death drop too.
My server admin’s plan not allowed me to make a client&server mod (player need install mod before they play), they want to me just edit serverside stuff to make players have fun.
-
There’s a hook for ships dropping/jettisoning cargo in 88 Flak’s FLHook. The callback function is _SpawnItem in HkCbOther.cpp. It shouldn’t be hard to prevent drops for NPCs - something like
uint iClientID = HkGetClientIDByShip(iShip); if(iClientID) return true; return false; ```should do it. As for keeping ammo dropped by mounted weapons…you should be able to re-add the ammo after it's dropped, though I don't remember if you can add cargo to dead players or not. If not you'll have to do it after they respawn or log off. Sorry, but I probably won't make a plugin to prevent NPC cargo drops. Feel free to make your own based off my hook though.
-
There’s a death drop function in one of the versions of the player cntl plugin; it’s a bit buggy and I haven’t found time to fix it but it might server as a start point.
You can configure the amount and type of stuff to be dropped when the player ship dies based on the size of the destroyed ship.