AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Csx forwards problem (https://forums.alliedmods.net/showthread.php?t=326554)

Shadows Adi 08-05-2020 17:45

Csx forwards problem
 
Hello,
I have some problems with bomb_* forwards from csx module.
The problem is that it doesn't works properly, from debugging, it prints only 'false', right after the event is called ( tero win ).
Code:
Code:
#include <amxmodx> #include <csx> new bool:g_bBombExplode; public plugin_init() {     register_clcmd( "say /test", "clcmd_say_test" )     register_event("SendAudio", "ev_T_won", "a", "2&%!MRAD_terwin") } public bomb_explode(id) {     g_bBombExplode = true; } public ev_T_won() {     server_print("%s", g_bBombExplode == true ? "true" : "false"); } public clcmd_say_test(id) {     client_print(id, print_chat, "%s", g_bBombExplode == true ? "true" : "false") }

Natsheh 08-05-2020 21:24

Re: Csx forwards problem
 
It will be easier to explain what are you trying to achieve.

Shadows Adi 08-06-2020 05:30

Re: Csx forwards problem
 
The code explain what I want to do. When event is called ( ev_T_won ), the boolean's value remain "false" instead "true", so, the event bomb_explode is not called when the bomb exploded. Same story with the rest of bomb_* forwards.

Natsheh 08-06-2020 08:07

Re: Csx forwards problem
 
What makes you so certain that terrwin is called after bomb explosion

Do debugging and post the results.

Also what amxx version are you using?

Shadows Adi 08-06-2020 08:33

Re: Csx forwards problem
 
1. What I does is debugging xd
2. I am running amxx 1.9.0, last branch

Natsheh 08-06-2020 16:25

Re: Csx forwards problem
 
That's barely a debugging, and also you didn't post any debugging results how should we know if bomb_explode is not getting called for Godsake.

Shadows Adi 08-07-2020 04:21

Re: Csx forwards problem
 
Quote:

Originally Posted by Natsheh (Post 2713275)
That's barely a debugging, and also you didn't post any debugging results how should we know if bomb_explode is not getting called for Godsake.

Quote:

Originally Posted by Shadows Adi (Post 2713150)
The problem is that it doesn't works properly, from debugging, it prints only 'false', right after the event is called ( tero win ).
[/pawn]


Black Rose 08-07-2020 08:11

Re: Csx forwards problem
 
Code:
public plugin_init() {     // ...     register_event("SendAudio", "ev_T_won", "a", "2&%!MRAD_terwin") } public bomb_explode(id) {     server_print("bomb_explode() called"); } public ev_T_won() {     server_print("ev_T_won() called"); }
Code:

ev_T_won() called
bomb_explode() called


Shadows Adi 08-07-2020 15:15

Re: Csx forwards problem
 
For a reason, ev_T_won() is called before bomb_explode() forward, so I set up a bit delay in ev_T_won() and solved it. Thanks for your help :) https://prnt.sc/tvwmsn


All times are GMT -4. The time now is 02:38.

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