AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   name results in different menu result (https://forums.alliedmods.net/showthread.php?t=147867)

reinert 01-15-2011 06:26

name results in different menu result
 
Hey I've made menu that shows admins online... but when I change nick and open menu again, the different nick results in different menu :/

PHP Code:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

#define Keysrod (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<6)|(1<<7)|(1<<8)|(1<<9)

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_menucmd(register_menuid("rod"), Keysrod"Pressedrod");
    
    
register_concmd("say /vips""Showrod")
}

public 
Showrod(id){
    new list[
256];
    new 
vipnames[33][33];
    new 
count;
    new 
x;
    new 
msg[256], iLen;
    
    for(
1<= 33x++){
    if(
is_user_connected(x))
        if(
get_user_flags(x) & ADMIN_BAN)
        
get_user_name(xvipnames[count++], 32)
    }
    
    if(
count == 0)
    {
    
formatex(list, 255"\yNo admins online")
    }
    else
    {
    for(new 
count i++) {
    
iLen += format(msg[iLen], 255-iLen"\w%s^n"vipnames[i])
    }
    
formatex(list, 255"\wAdmins online \y[ \w%d\y ]\w:^n%s"countiLen)
    
show_menu(idKeysrod, list, -1"rod");
    }
}
public 
Pressedrod(idkey) {
    switch (
key) {
        default: 
        {
        
        }
    }
    return 
PLUGIN_CONTINUE;


[IMG]http://img64.**************/img64/7568/adminse.jpg[/IMG]

I don't know where the problem is

xPaw 01-15-2011 07:35

Re: name results in different menu result
 
PHP Code:

formatex(list, 255"\wAdmins online \y[ \w%d\y ]\w:^n%s"countiLen

it should be msg not iLen


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

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