terrorist can defuse
hello
let's say i gave a terrorist a defuser kit PHP Code:
PHP Code:
PHP Code:
then terrorists have to defuse it. i have been able to prevent ct from defusing PHP Code:
help! |
Re: terrorist can defuse
bump for this.
|
Re: terrorist can defuse
Quite a crazy idea. Wouldn't it be easier if you would switch all players team quietly with cs_set_user_team, while not changing their model? That way the cts could plant, and the ts could defuse. :)
Seriously try go around it. Check if the user, who wants to defuse is pressing the USE key( check in player pre think ) and pointing against the planted bomb entity( use get_user_aiming, because you can set the distance here ). If so, then start a "defuse progress" animation( you can find a good example for that in the zp_extra_lasermine plugin ). If the progress finished, then remove the bomb entity and force a round end, plus display a message in the center. Simple! :mrgreen: Edit: Never mind the player pre think - pointing - using part. Your Ham function is better. |
Re: terrorist can defuse
Tested and works.
PHP Code:
|
Re: terrorist can defuse
There is only 2 ways for that, either changing the team in pre/post like connor above, or blocking use as pre and rewrite all the code. Though changing the team all the time is really ugly.
|
Re: terrorist can defuse
Thanks connor, works perfectly, I just wanted to know what these stuff do:
get_pdata_int(id, m_iTeam, XO_PLAYER) set_pdata_int(id, m_iTeam, TEAM_CT, XO_PLAYER) set_pdata_int(id, m_iTeam, TEAM_T, XO_PLAYER) I would say, it gets team, and the other both sets team. In this case, tell me if I am wrong, what's with cs_s(g)et_user_team ? |
Re: terrorist can defuse
Both does the same, it uses a player's offset. Though, there is a difference about cs_set_user_team(), it set the team + send ClientUserInfoChanged + send TeamInfo message + pass the team name by reference.
In CC4::Use(), there is a check with the team offset to make sure you are in the CT team. So, all you need here is to set the offset with the CT team value (2), as pre, and restore as post. It does the trick. You don't need all the stuffs that does the cstrike native, that's why using the offset is enough. |
Re: terrorist can defuse
Oh thanks, and how is get_pdata_int, I mean with cstrike you make == CS_TEAM_*
|
Re: terrorist can defuse
I don't understand what you ask.
|
Re: terrorist can defuse
I mean with cstrike, you get team by, cs_get_user_team(id) == CS_TEAM_* and with connors method I don't see how he can get the terror team.
|
| All times are GMT -4. The time now is 14:47. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.