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

[Help] why is this posting the message twice


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Giass
Member
Join Date: Aug 2011
Location: {Israel}
Old 05-12-2017 , 14:16   [Help] why is this posting the message twice
Reply With Quote #1

PHP Code:
*sniff
this mod allows me to control things through the chat,
however, if i heal the ct's it posts the message on invidual too

example:

Code:
[AMXX] (server name) got +1 HP
[AMXX] The Terrorists got +1 HP
How to fix that?
__________________
All you need is carb

Last edited by Giass; 05-12-2017 at 15:45.
Giass is offline
Old 05-12-2017, 14:54
OciXCrom
This message has been deleted by OciXCrom.
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 05-12-2017 , 14:55   Re: [Help] why is this posting the message twice
Reply With Quote #2

Because there's no if/else when sending the first message, so the second one gets sent as well.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Giass
Member
Join Date: Aug 2011
Location: {Israel}
Old 05-12-2017 , 15:06   Re: [Help] why is this posting the message twice
Reply With Quote #3

Quote:
Originally Posted by OciXCrom View Post
Because there's no if/else when sending the first message, so the second one gets sent as well.
PHP Code:
*sniff
this is not working too T_T
__________________
All you need is carb

Last edited by Giass; 05-12-2017 at 15:44.
Giass is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 05-12-2017 , 15:13   Re: [Help] why is this posting the message twice
Reply With Quote #4

Of course not.

PHP Code:
if(some condition is true)
{
    
first message
}

if(
another condition is true)
{
    
second message

You have both conditions true, so both message will be printed.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Giass
Member
Join Date: Aug 2011
Location: {Israel}
Old 05-12-2017 , 15:44   Re: [Help] why is this posting the message twice
Reply With Quote #5

Quote:
Originally Posted by OciXCrom View Post
Of course not.

PHP Code:
if(some condition is true)
{
    
first message
}

if(
another condition is true)
{
    
second message

You have both conditions true, so both message will be printed.
ok thanks,
+karma
__________________
All you need is carb
Giass is offline
Reply



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 09:02.


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