Raised This Month: $32 Target: $400
 8% 

Kickmenu, cannot see all players in server


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jonatat
Senior Member
Join Date: Dec 2017
Old 01-20-2018 , 13:12   Kickmenu, cannot see all players in server
Reply With Quote #1

Hello all. I have simple kickmenu plugin (Cannot use default amxx kickmenu, dont ask why ). My this plugin working fine, but sometimes i cannot see all players? Sometimes just players on my team, sometime random... And dont uderstand why... Can somebody help? Thanks

Plugin looks like that:

PHP Code:
#include < amxmodx >
#include < amxmisc >
#include < cstrike >

public plugin_init( ) 
{
register_plugin"amx_kickmenu""1.0""Juice" );
register_clcmd"amx_kickmenu""showmenu"ADMIN_KICK );
register_clcmd"say .kick""showmenu"ADMIN_KICK );
register_clcmd"say_team .kick""showmenu"ADMIN_KICK );
}

public 
ShowMenu( const id, const level, const cid )
{
if( 
cmd_accessidlevelcid) )
showmenuid );
}

public 
showmenu( const id )
{
new 
menu menu_create"\ySelect player to kick""submenu" );

new 
players32 ], pnumtempid;
new 
szName32 ], szTempid10 ];

get_playersplayerspnum"a" );

for( new 
iipnumi++ )
{
tempid players];

get_user_nametempidszName31 );
num_to_strtempidszTempid);
menu_additemmenuszNameszTempid);
}

menu_displayidmenu );
return 
PLUGIN_HANDLED;
}

public 
submenu( const id, const menu, const item )
{
if( 
item == MENU_EXIT )
{
menu_destroymenu );
return 
PLUGIN_HANDLED;
}

new 
data], iName64 ];
new 
accesscallback;
menu_item_getinfomenuitemaccessdata,5iName63callback );

new 
tempid str_to_numdata );
if( !
is_user_bottempid ) )
kick_usertempid"You have been kicked from server by admin request");

menu_destroymenu );
return 
PLUGIN_HANDLED;
}

kick_user( const id, const szKickMsg[] ) 

emessage_beginMSG_ONE2_id ); // oranguntanz 
ewrite_stringszKickMsg );
emessage_end( );

jonatat is offline
Old 01-20-2018, 14:00
Black Rose
This message has been deleted by Black Rose.
DjSoftero
Veteran Member
Join Date: Nov 2014
Location: Lithuania
Old 01-20-2018 , 14:27   Re: Kickmenu, cannot see all players in server
Reply With Quote #2

get_players( players, pnum, "a" );

flags
Optional list of filtering flags:
"a" - do not include dead clients
"b" - do not include alive clients
"c" - do not include bots
"d" - do not include human clients
"e" - match with team
"f" - match with part of name
"g" - match case insensitive
"h" - do not include HLTV proxies
"i" - include connecting clients

https://www.amxmodx.org/api/amxmodx/get_players
__________________
retired chump
DjSoftero 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:04.


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