Raised This Month: $ Target: $400
 0% 

[Solved] Bug StatusIcon xD


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 06-29-2014 , 17:20   [Solved] Bug StatusIcon xD
Reply With Quote #1

I am using statusicon msg to display the amount of lasermines i have.
It happens this after install lasermines



Code:
PHP Code:
public update_lmmsg(id)
{
    if(
is_user_connected(id) && !is_user_bot(id))
    {
        
update_finalmsg(id0)
        
update_finalmsg(idis_user_alive(id) ? 0)
    }
}

public 
update_finalmsg(idonoff)
{
    static 
LMSprites[33]
    
format(LMSpritessizeof(LMSprites), "number_%d"g_havemine[id])
    
    
message_begin(MSG_ONE_UNRELIABLEg_Msg_StatusIcon, {0,0,0}, id)
    
write_byte(onoff)
    
write_string(LMSprites)
    
write_byte(42// red
    
write_byte(212// green
    
write_byte(255// blue
    
message_end()

__________________
Jhob94 is offline
Freezo Begin
BANNED
Join Date: Mar 2014
Location: Morocco
Old 06-29-2014 , 17:25   Re: Bug StatusIcon xD
Reply With Quote #2

i don't get is
PHP Code:
update_finalmsg(id0)
update_finalmsg(idis_user_alive(id) ? 0
if i'm not right the second is sufficient ? you don't have to set the first !

Last edited by Freezo Begin; 06-29-2014 at 17:25.
Freezo Begin is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 06-29-2014 , 17:32   Re: Bug StatusIcon xD
Reply With Quote #3

Quote:
Originally Posted by Freezo Begin View Post
i don't get is
PHP Code:
update_finalmsg(id0)
update_finalmsg(idis_user_alive(id) ? 0
if i'm not right the second is sufficient ? you don't have to set the first !
The first i made because of the bug. Thought maybe it could fix it, didnt fixed..
__________________
Jhob94 is offline
Freezo Begin
BANNED
Join Date: Mar 2014
Location: Morocco
Old 06-29-2014 , 17:37   Re: Bug StatusIcon xD
Reply With Quote #4

post the whole code ! i think the problem isn't from here maybe there's a bool to check planting lm and you forget to check it !

Last edited by Freezo Begin; 06-29-2014 at 17:38.
Freezo Begin is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 06-29-2014 , 17:39   Re: Bug StatusIcon xD
Reply With Quote #5

Quote:
Originally Posted by Freezo Begin View Post
post the whole code !
If i havent posted whole code is because i havent authorization to do it.
Also, i guess the problem is here, nothing else in code touch this message.
__________________
Jhob94 is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 06-29-2014 , 19:53   Re: Bug StatusIcon xD
Reply With Quote #6

So you only want 1 number to be shown at a time? Where are you telling it to hide the previous icons? You keep telling it to display a new one but never hide the old one. So, you need to send the message twice. Once for the previous icon to hide it and then again for the new icon to show it

Quote:
Originally Posted by Jhob94 View Post
If i havent posted whole code is because i havent authorization to do it.
As long as you have the code, you have authorization to do whatever you want with it. Nobody can prevent you from distributing it
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 06-30-2014 , 18:03   Re: Bug StatusIcon xD
Reply With Quote #7

Quote:
Originally Posted by YamiKaitou View Post
So you only want 1 number to be shown at a time? Where are you telling it to hide the previous icons? You keep telling it to display a new one but never hide the old one. So, you need to send the message twice. Once for the previous icon to hide it and then again for the new icon to show it
I realized it yesterday xD
But thanks


Quote:
Originally Posted by YamiKaitou View Post
As long as you have the code, you have authorization to do whatever you want with it. Nobody can prevent you from distributing it
I know, but i meant, its something private for the team in cause. I dont want to leak it out since is a big edit of the lasermines plugin.
__________________
Jhob94 is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 06-30-2014 , 22:58   Re: [Solved] Bug StatusIcon xD
Reply With Quote #8

Anyway..

PHP Code:
public update_lmmsg(id)
{
    if(
is_user_connected(id) && !is_user_bot(id))
    {
        
update_finalmsg(idg_havemine[id] + 10// deleting the previous num
        
update_finalmsg(idg_havemine[id], is_user_alive(id) ? 0// set the current num
    
}
}

public 
update_finalmsg(idnumberonoff)
{
    static 
LMSprites[33]
    
format(LMSpritessizeof(LMSprites), "number_%d"number)
    
    
message_begin(MSG_ONE_UNRELIABLEg_Msg_StatusIcon, {0,0,0}, id)
    
write_byte(onoff)
    
write_string(LMSprites)
    
write_byte(42// red
    
write_byte(212// green
    
write_byte(255// blue
    
message_end()

__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS 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 21:06.


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