Sorry forgot the code Oo
//Not so clean, i know, it's quite old code
PHP Code:
new count=0;
for(new i = 0; i <= MAXPLAYERS; i++)
{
if(count == 6)
{
menu_addblank(menu,0);
new choice[32],msg[4],info[5];
formatex(info,4,"133%d",type)
formatex(msg,3,"M_%d",type);
formatex(choice,31,"\y%L",LANG_PLAYER,msg);
if(types[id] == 0) types[id] = 1;
menu_additem(menu,choice,info,0,-1);
count = 0;
}
if(is_user_connected(i) && !(get_user_flags(i) & ADMIN_NOBLOCK_LVL) && id != i)
{
new buffer[37],ind[4];
get_user_name(i,buffer,30);
switch((usr ? states[i] : usrstate[id][i]))
{
case 1:
{
format(buffer,36,"%s \rV",buffer);
}
case 2:
{
format(buffer,36,"%s \rC",buffer);
}
case 3:
{
format(buffer,36,"%s \rV C",buffer);
}
}
formatex(ind,3,"%d",i);
menu_additem(menu,buffer,ind,0,-1);
count++;
}
}
if(count != 0)
{
for(new i = count;i < 6;i++)
{
menu_addblank(menu,1);
}
menu_addblank(menu,0);
new choice[32],msg[4],info[5];
formatex(info,4,"133%d",type)
formatex(msg,3,"M_%d",type);
formatex(choice,31,"\y%L",LANG_PLAYER,msg);
if(types[id] == 0) types[id] = 1;
menu_additem(menu,choice,info,0,-1);
count = 0;
}
menu_display(id,menu,page);
}
Handler code is irrelevant because the item id is -3 without modifing anything in the handler
Btw its working fine if i'm not adding the blanks