[Snippet][TF2] Directly Spawning Mannpower Powerups and extra info...
Hi Guys
I'd like to share with you quite lazy snippet which allows you to spawn normally working powerups without mannpower mode on nor need to use info_target spawners. Directly thru 'CreateEntityByName' :bee: Test Plugin: PHP Code:
PHP Code:
For Linux you will probably need to change 'Address:1256' to linux equivalent of that address It is either: 1276 or probably one of these: PHP Code:
- CTFRune::CreateRune(Vector const&, int, bool, Vector) //Found in there offset for setting type of powerups\\ *You can find it on windows by searching string 'item_powerup_rune'. - CTFRune::MyTouch(CBasePlayer *) //Found in there ids of powerups\\ *Can be found by searching 'You got the PRECISION power-up!' string* - Enjoy. I'il probably update/refine/turn into plugin this snippet tommorow cause it's kinda messy at it's current state :bacon: |
Re: [Snippet][TF2] Directly Spawning Mannpower Powerups and extra info...
Those IDs look like they're just the condition #'s of the player conds granted by the runes.
|
Re: [Snippet][TF2] Directly Spawning Mannpower Powerups...
Quote:
PHP Code:
|
Re: [Snippet][TF2] Directly Spawning Mannpower Powerups...
Quote:
An improvement would be changing it to use gamedata with offsets relative to existing sendprops or datadesc vars (also named in gamedata), rather than hardcoding offsets relative to the entity base in the plugin. They be very likely to change on most updates like that. Ex. offset of m_iszModel + 24. |
Re: [Snippet][TF2] Directly Spawning Mannpower Powerups and extra info...
This is beta, and early at that... The offsets are going to change for sure.
|
Re: [Snippet][TF2] Directly Spawning Mannpower Powerups and extra info...
Throwin' my hat in the ring with something I made. Gives the powerup directly to the player and when you die the powerup drops. Only thing is they seem do a flashy thing after a while of not being picked up and they don't seem to disappear. They do respect team spawn rooms and that you can't bring a powerup into your own spawn. As well, you can only pick one up, but using these commands will grant you every powerup without losing any.
Very shitty code mind you, but still usable. And no, not clearing the individual rune type on the death event does not lead to "having the powerup effect without having the rune". It appears that the HasRune condition is the true controller of whether or not you have the rune's effect. PHP Code:
|
Re: [Snippet][TF2] Directly Spawning Mannpower Powerups and extra info...
I haven't tried it, but if you want to give players a particular rune directly, you can probably use TF2Items to spawn the inventory version of it on them.
Also, I have no idea why the weapon class is listed as saxxy in the schema, it just is. |
Re: [Snippet][TF2] Directly Spawning Mannpower Powerups and extra info...
Quote:
|
Re: [Snippet][TF2] Directly Spawning Mannpower Powerups and extra info...
Quando omni flunkus Saxxy (When all else fails, Saxxy)
|
Re: [Snippet][TF2] Directly Spawning Mannpower Powerups and extra info...
Quote:
The saxxy meta-class maps to these server classes, depending on the player class:
|
All times are GMT -4. The time now is 15:48. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.