AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Help for kickmenu with player country. (https://forums.alliedmods.net/showthread.php?t=134236)

GarbageBox 08-02-2010 11:55

Help for kickmenu with player country.
 
I got some problem with the kickmenu with player country.
I have compiled the amxx, and I tested with my friend.
He said he could not see anything after my name and his name too, but I can see his country after his name and my name is no country too.
Here is the code what I have edited, please help to correct my mistake.
The red color is what I have added in the basic code from plmenu.sma
Code:

#include <geoip> //For test)
new g_IP[16], g_country[32] //For test)
*leave out
displayKickMenu(id, pos)
{
*leave out
        for (new a = start; a < end; ++a)
        {
                i = g_menuPlayers[id][a]
                get_user_name(i, name, 31)
                get_user_ip(id, g_IP, 15, 1)
                geoip_country(g_IP, g_country, 45)

                if (access(i, ADMIN_IMMUNITY) && i != id)
                {
                        ++b
               
                        if (g_coloredMenus)
                                len += format(menuBody[len], 511-len, "\d%d. %s (%s)^n\w", b, name, g_country)
                        else
                                len += format(menuBody[len], 511-len, "#. %s (%s)^n", name, g_country)
                } else {
                        keys |= (1<<b)
                               
                        if (is_user_admin(i))
                                len += format(menuBody[len], 511-len, g_coloredMenus ? "%d. %s \r*^n\w" : "%d. %s (%s) *^n", ++b, name, g_country)
                        else
                                len += format(menuBody[len], 511-len, "%d. %s (%s)^n", ++b, name, g_country)
                }
        }
*leave out
}


fysiks 08-02-2010 18:09

Re: Help for kickmenu with player country.
 
I think it's just one line that you forgot to modify completely.

:arrow:

PHP Code:

                len += format(menuBody[len], 511-leng_coloredMenus "%d. %s (%s)\r*^n\w" "%d. %s (%s)*^n", ++bnameg_country


GarbageBox 08-02-2010 21:52

Re: Help for kickmenu with player country.
 
This line I have already edited in my code...

fysiks 08-03-2010 01:36

Re: Help for kickmenu with player country.
 
Quote:

Originally Posted by GarbageBox (Post 1259921)
This line I have already edited in my code...

I knew you were going to say that! You didn't look close enough. Replace your line with my line. Trust me.

GarbageBox 08-03-2010 01:47

Re: Help for kickmenu with player country.
 
Oh! Thank you so much
I compared the two lines of code to have discovered after the original is different and now I can see the country after my name.

fysiks 08-03-2010 19:00

Re: Help for kickmenu with player country.
 
Quote:

Originally Posted by GarbageBox (Post 1260058)
Oh! Thank you so much
I compared the two lines of code to have discovered after the original is different and now I can see the country after my name.

Yeah :). The one that you did edit would work for games that don't have colored menus.


All times are GMT -4. The time now is 00:08.

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