AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Blocking Ts victory after bomb explosion. (https://forums.alliedmods.net/showthread.php?t=55909)

Rolnaaba 06-01-2007 19:56

Blocking Ts victory after bomb explosion.
 
I am using this to make the bomb explode when conditions occur:
Code:
set_pdata_float(ent, 100, 0.0);
which works perfectly, but I want to block the Terrorist victory, and make the CTs win if the bomb explodes. How cna I do this?

Rolnaaba 06-02-2007 13:52

Re: Blocking Ts victory after bomb explosion.
 
*bump* where ya at VEN I need your help :D

regalis 06-02-2007 15:47

Re: Blocking Ts victory after bomb explosion.
 
I don't sure but i think that is impossible..
If you bomb the C4 the objective success and the T win...I think the only solution would be to hook the "terrorists win" text message and send your own "ct win" text message..and then remove one point from T team and add it to CT...
Any other ideas?

greetz regalis
PS: i love fakemeta :P

Rolnaaba 06-10-2007 23:31

Re: Blocking Ts victory after bomb explosion.
 
um i have no idea how to do that regalis, but can you show me what you mean and I will try it out...

regalis 06-11-2007 10:27

Re: Blocking Ts victory after bomb explosion.
 
Here are the messages i have logged with msglogging-plugin...
Code:

MessageBegin (SendAudio "100") (Destination "Broadcast<0>") (Args "3") (Entity "<NULL>") (Classname "<NULL>") (Netname "<NULL>") (Origin "0.000000 0.000000 0.000000")
Arg 1 (Byte "0")
Arg 2 (String "%!MRAD_terwin")
Arg 3 (Short "100")
MessageEnd (SendAudio "100")
MessageBegin (TextMsg "77") (Destination "All<2>") (Args "2") (Entity "<NULL>") (Classname "<NULL>") (Netname "<NULL>") (Origin "0.000000 0.000000 0.000000")
Arg 1 (Byte "4")
Arg 2 (String "#Terrorists_Win")
MessageEnd (TextMsg "77")

With this you can hook the Audio message:
Code:

register_event("SendAudio", "t_win", "a", "2&%!MRAD_terwin")
register_event("SendAudio", "ct_win", "a", "2&%!MRAD_ctwin")

or for all end round szenarios the same time:
register_event("SendAudio", "end_round", "a", "2=%!MRAD_terwin", "2=%!MRAD_ctwin", "2=%!MRAD_rounddraw")

The Textmessages can also be hooked but i don't want to do all the work :P

greetz regalis

Rolnaaba 06-12-2007 18:02

Re: Blocking Ts victory after bomb explosion.
 
sorry for the bump, but what about this?
Code:
#include <amxmodx> #include <fakemeta> new gMakeCtsWin = 0; public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         register_message(get_user_msgid("SendAudio"), "Hook_SendAudio");     register_message(get_user_msgid("TextMsg"), "Hook_TextMsg"); } public bomb_exploding_function() {     gMakeCtsWin = 1;     set_pdata_float(ent, 100, 0.0); } public Hook_SendAudio() {     if(gMakeCtsWin) {         set_msg_arg_int(1, 1, 0);         set_msg_arg_string(2, "%!MRAD_ctwin");         set_msg_arg_int(1, 1, 100);                 gMakeCtsWin = 0;     }     return PLUGIN_CONTINUE; } public Hook_TextMsg() {     if(gMakeCtsWin) {         set_msg_arg_int(1, 1, 4);         set_msg_arg_string(2, "#Counter_Terrorist_Win");                 gMakeCtsWin = 0;     }     return PLUGIN_CONTINUE; }

XxAvalanchexX 06-12-2007 19:20

Re: Blocking Ts victory after bomb explosion.
 
What if you used VEN's force team win and then immediately after detonated the bomb?

Rolnaaba 06-12-2007 20:52

Re: Blocking Ts victory after bomb explosion.
 
cause I dont want to do all that team switching, I would rather fake the win :D

providing that the above snippette works, how do I add or subtract to a team's score?

XxAvalanchexX 06-12-2007 21:51

Re: Blocking Ts victory after bomb explosion.
 
I don't know if there are any ways to internally change the team wins, you'd have to use the MemHack module or something. But you can change what it appears as with the TeamScore message.

Rolnaaba 06-12-2007 22:38

Re: Blocking Ts victory after bomb explosion.
 
with the changing what appears, if a team wins for real, wouldnt that override my fake scoreboard and cause it to look stupid?
i.e.: I have it displaying 6, when the real score is 5, after a victory the score is upped to 6...will the display become 6 because a new scoremessage appeared or will it say 7?


All times are GMT -4. The time now is 10:35.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.