Raised This Month: $12 Target: $400
 3% 

Csx forwards problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 08-05-2020 , 17:45   Csx forwards problem
Reply With Quote #1

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") }
__________________


Accepting Paid Requests, contact PM.

MVP Of The Round View project on GITHUB / AlliedModders
CSGO REMAKE ~ CSGO MOD [STABLE + SOURCE CODE]
Shadows Adi is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 08-05-2020 , 21:24   Re: Csx forwards problem
Reply With Quote #2

It will be easier to explain what are you trying to achieve.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 08-06-2020 , 05:30   Re: Csx forwards problem
Reply With Quote #3

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.
__________________


Accepting Paid Requests, contact PM.

MVP Of The Round View project on GITHUB / AlliedModders
CSGO REMAKE ~ CSGO MOD [STABLE + SOURCE CODE]
Shadows Adi is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 08-06-2020 , 08:07   Re: Csx forwards problem
Reply With Quote #4

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?
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 08-06-2020 at 08:13.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 08-06-2020 , 08:33   Re: Csx forwards problem
Reply With Quote #5

1. What I does is debugging xd
2. I am running amxx 1.9.0, last branch
__________________


Accepting Paid Requests, contact PM.

MVP Of The Round View project on GITHUB / AlliedModders
CSGO REMAKE ~ CSGO MOD [STABLE + SOURCE CODE]
Shadows Adi is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 08-06-2020 , 16:25   Re: Csx forwards problem
Reply With Quote #6

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.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 08-07-2020 , 04:21   Re: Csx forwards problem
Reply With Quote #7

Quote:
Originally Posted by Natsheh View Post
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 View Post
The problem is that it doesn't works properly, from debugging, it prints only 'false', right after the event is called ( tero win ).
[/pawn]
__________________


Accepting Paid Requests, contact PM.

MVP Of The Round View project on GITHUB / AlliedModders
CSGO REMAKE ~ CSGO MOD [STABLE + SOURCE CODE]
Shadows Adi is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 08-07-2020 , 08:11   Re: Csx forwards problem
Reply With Quote #8

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
__________________
Black Rose is offline
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 08-07-2020 , 15:15   Re: Csx forwards problem
Reply With Quote #9

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
__________________


Accepting Paid Requests, contact PM.

MVP Of The Round View project on GITHUB / AlliedModders
CSGO REMAKE ~ CSGO MOD [STABLE + SOURCE CODE]

Last edited by Shadows Adi; 08-08-2020 at 07:07.
Shadows Adi is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:05.


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