I've been working on a map recently that would benefit from a plugin similar to shockwave death. I had in mind if a player hit delete their tank would explode with a shockwave, but any other type of death wouldn't result in the shockwave.
I have no plugin making knowledge, so would someone be willing to make it?
Thanks
Kamikaze Plugin
clarification
Will this map have rico or another way for the player to kill themself without pressing delete?
I'm not sure how to determine whether you killed yourself via delete or by shooting yourself. Other than that, it shouldn't be too hard.
I'm not sure how to determine whether you killed yourself via delete or by shooting yourself. Other than that, it shouldn't be too hard.
If this is done, delete would not be the key to use. You would probably have to create a new slash command (ex: /blowup) that simply fires a world weapon shock wave where you are at.
In addition, if you want to get points when the world weapon blows up a tank, you would need to set killerID in PlayerDieEvent to the ID of the player who used the command. This also requires the programmer to keep track of the shot ID passed to bz_fireWorldWep() and checking for that ID in the DieEvent (there is a data member in the DieEventData struct that stores the shot ID).
In addition, if you want to get points when the world weapon blows up a tank, you would need to set killerID in PlayerDieEvent to the ID of the player who used the command. This also requires the programmer to keep track of the shot ID passed to bz_fireWorldWep() and checking for that ID in the DieEvent (there is a data member in the DieEventData struct that stores the shot ID).
Well, here you have the plugin. It compiles fine but I couldn't test it because my BZFS doesn't load plugins because of some reason.
The plug-in attached will add a slash command /blowup which blows you up and fires a world weapon where you are. Hope it works.
Maybe someone who knows more about that than me can look at this a second time.
Greets,
patlkil
The plug-in attached will add a slash command /blowup which blows you up and fires a world weapon where you are. Hope it works.
Maybe someone who knows more about that than me can look at this a second time.
Greets,
patlkil
- Attachments
-
- kamikaze.cpp
- (1.26 KiB) Downloaded 321 times
I made a few changes so that scores are updated. This was done by basically copying and pasting some code from my mine plug-ins, since I know the code works. This might not compile though; I don't have 2.0.10 sources and cannot compile it.
I think you need 2.0.10 for this to work. I can't remember.
So here is the code for an untested plug-in that might not even compile.
[edit] And two minutes later, my first edit. You forgot to call bz_freePlayerRecord() to free the memory allocated by bz_getPlayerByIndex(). I also converted all tabs to spaces. Tabs are annoying. [/edit]
I think you need 2.0.10 for this to work. I can't remember.
So here is the code for an untested plug-in that might not even compile.
[edit] And two minutes later, my first edit. You forgot to call bz_freePlayerRecord() to free the memory allocated by bz_getPlayerByIndex(). I also converted all tabs to spaces. Tabs are annoying. [/edit]
- Attachments
-
- Kamikaze.cpp
- (2.74 KiB) Downloaded 320 times