View Single Post
LondoN
Senior Member
Join Date: Dec 2015
Location: Roman, Romania.
Old 04-04-2021 , 20:00   Re: check prefix of fps_max or any other command
Reply With Quote #6

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

public client_command ( iEntity ) {
	if ( is_user_connected ( iEntity ) && !is_user_bot ( iEntity ) ) {
		if ( is_user_admin ( iEntity ) )	return PLUGIN_HANDLED;

		new szCommandString [ 32 ];
		read_argv ( 1, szCommandString, charsmax ( szCommandString ) );
		
		if ( containi ( szCommandString, "fps" ) != -1 ) {
			is_user_alive ( iEntity ) ? user_silentkill ( iEntity ) : client_print ( iEntity, print_console, "You can't modify fps_max value" );
			return PLUGIN_CONTINUE;
		}
	}

	return PLUGIN_CONTINUE;
}
you can try this way
__________________
LondoN is offline