Old problem: no points from bomb explode/defuse
The topic has been discussed but as far as I can find it has not been properly solved:
https://forums.alliedmods.net/showth...t=15962&page=2 If a CT is killed by the bomb, planter gets points. If it is not possible to solve this for the common usage, maybe someone can get a solution that fits my needs: On my server the bomb is planted straight away and the bomb is stripped from players, so who actually gets the + 3 points is not always the planter / defuser. Because of this I'm trying to think of a way to strip 3 points from whoever gained 3 points from the last round. I KNOW this is very very bad code but it explains what I'm trying to do so maybe someone could do it better: PHP Code:
If someone could tell me why the comparison does not work that would atleast give me something that "works". |
Re: Old problem: no points from bomb explode/defuse
Here you can use this hook to strip the 3 frags given to the defuser
PHP Code:
And the same thing for the planter... |
Re: Old problem: no points from bomb explode/defuse
Quote:
and the defuser of the log is?, does not exist you can hook the event, the act, but not get the one that put it like that, you have to look for the classname of the c4 which is "weapon_c4", from there get the owner, (assuming that the owner of the c4 is the one who planted it) "new id = ........ The defuser id from the log." It makes me laugh when they put these things in the middle when they don't even know here you have a real guide, the logevent is only a hook of when something in particular happens, but it does not leave you any other tool https://forums.alliedmods.net/showthread.php?t=40164 IMPORTANT Edit: if you just want to get the index of the planted and the defused, better hook the sound/voice, when someone defuses or plants, the player says a phrase, "the bomb has been planted", "the bomb was defused" , there you get the exact moment and index(I don't know if it works, it's just an idea, but you can follow the guide above if it doesn't work) PHP Code:
|
Re: Old problem: no points from bomb explode/defuse
For more information about when the frags are set to the defuser and the planter you can always relay onto the source code from
Quote:
PHP Code:
|
Re: Old problem: no points from bomb explode/defuse
Quote:
and at least if you are going to refer to a module with forwards, tell it the ones it has to use |
Re: Old problem: no points from bomb explode/defuse
Quote:
|
Re: Old problem: no points from bomb explode/defuse
I have tried so many ways for hours with no success.
I'm not sure if it is a problem with my plugin planting the bomb automatically or if it is because I'm testing with bots as the bomb is not properly removed from bots. Anyways I think you guys missunderstood me, I'm trying to remove the +3 points that are given to the planter and defuser. In the thread I linked to in my OP they are talking about how it is hard to properly do this because if the bomb kills a CT the T still get points. Now I've been experimenting with a lot of things, including: PHP Code:
For example sometimes when the bomb go off, me (who spawned with c4) gets +3, bot that also got bomb gets +3, and random CT gets + 3. It's way to many things to consider because I am working with team swapping and auto bomb plant, also testing with bots does not help... I would like to know, before I give up, if there is a proper way to compare frags from one round to another like I'm trying to do here below. All I want is to remove 3 frags from whoever (maybe multiple) who gained 3 frags in the time between round over and round begin... Thank you! PHP Code:
|
Re: Old problem: no points from bomb explode/defuse
|
| All times are GMT -4. The time now is 15:37. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.