Saved ya
2 Attachment(s)
Saved ya - Description - This plugin is based on a feature that CSGO has, that's when a player kill an enemy while another teammate is being killed or was about to be killed by him, it prints a message on the chat. - Change log
Spoiler
https://i.imgur.com/D7BGJDg.png Plugin's check explanation: - If you hit someone and he/her is not seeing you, your id is catched by the plugin. If in an interval of time of 2 seconds someone kill you, he'll save the player who you've had hit before. - If in a certain distance (closer enough) someone just saw you and another teammate killed him, that teammate will be considered a savior as well (the same, 2 seconds delay, otherwise the ID will be reseted). Basically, it does the same as this - https://gist.github.com/sigsegv-mvm/...8284151423041b, the only difference is that my code is a little bit hacky, but works. |
Re: Saved ya
This looks really cool. I will give it a try.
|
Re: Saved ya
I'm using it on deathmatch and it seems like I'm saving everyone from death.
Probably not best for CSDM I would like to try it on a 3 or 4 second interval. |
Re: Saved ya
Death Match is not a good idea to use it since most of the time you're confronting someone while another player is shooting at you, it's not recommended. So here's the deal:
Use sy_deathmatch_support 1 (default is 0) to block the client_PreThink code, so with that, you'll only save someone if an enemy has hit your teammate behind his back, it could make the save feature harder (maybe not that much) to happen. |
Re: Saved ya
Ok I'll give it a try. With the amount of carnage in deathmatch a little saving just might work.
|
Re: Saved ya
PHP Code:
|
Re: Saved ya
need to check if entity is connected at client_PreThink
|
Re: Saved ya
Quote:
|
Re: Saved ya
Quote:
Guess that get_players with "a" flag do not return correct who is alive or just connected |
Re: Saved ya
Guess he meant inside the loop, I didn't know that get_players could return invalid players as well, that's odd. Anyway, I made some changes, it's already avaliable.
|
Re: Saved ya
Quote:
He should post the actual error log. |
Re: Saved ya
Quote:
|
Re: Saved ya
Quote:
I think your problem might be coming from this, the teams are backwards. Code:
(get_user_team(id) == 1) ? "CT" : "TERRORIST") |
Re: Saved ya
There's nothing to do with that, with that check, i'm trying to see if there's more than one player on the enemy team, so if I try to shot one, the other teammate will be able to save him.
@tarsisd2, try the new code, this error may have been fixed. |
Re: Saved ya
Added a little forward to detect when someone saves anybody, so people can give custom rewards ^^.
PHP Code:
|
| All times are GMT -4. The time now is 06:31. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.