AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [DoD:S] game_player_equip entity fix (0.1.1) (https://forums.alliedmods.net/showthread.php?t=275256)

Prof. Orribilus 11-25-2015 20:47

[DoD:S] game_player_equip entity fix (0.1.1)
 
3 Attachment(s)
If you didn't know, "game_player_equip" is the name of a mechanism, implemented in some Source Engine based games, which allows mappers to set the outfit of players during gameplay. In Day of Defeat: Source, this can be used to place pickable weapons in the scenery; so, for example, a player can change their main weapon without changing class, and without waiting the drop of another player, or can pick a grenade not provided by his class. But in Day of Defeat: Source there are two issues about this mechanism:
  • These pickable weapons can't have more than one ammo.
  • If the player picks a weapon (except some grenades) which takes up a slot occupied by a weapons he owns, the picked weapon is spawned to the player position, falls over the ground then disappears. (mainly a visual issue, however)
so, this plugin fixes this.



Requirements:
I tested this plugin on SourceMod 1.7.3 build 5275, but every build which works on the latest version of Day of Defeat: Source should be good.

Notes for programmers and mappers:
  • This plugin needs SMlib during compile; i have attached the snapshot from its GitHub i used.
  • This plugin corrects what happens when the game_player_equip entity receive the Use input and the activator is the player. I tested it with a trigger_multiple linked to a game_player_equip, but even a func_button should work.
  • As you can imagine, the amount of ammo must be specified in the value field related to the weapon specified as key name. A single unit of ammo is a single round, not a single bullet (except for bazooka and grenades).
  • I attached a map for testing purposes.
Maps designed for this plugin:



Obviously, any feedback is well accepted.
A thanks to the authors of SourceMod, the SMlib and SPEdit.

Prof. Orribilus 12-12-2015 05:26

Version History
 
Version History:
  • 0.1.0
    • Initial release
  • 0.1.1
    • Now the plugin works as described (a single unit of ammo is a single round, not a single bullet)
    • Now weapons associated to the same slot can all be given to the player


All times are GMT -4. The time now is 13:16.

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