Is acting the same, reading only first line:
Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
new const PLUGIN[] = "Blocking Pick UP Weapon",
VERSION[] = "0.1",
AUTHOR[] = "Craxor";
new filename[256];
new buffer[60];
public plugin_init( )
{
register_plugin
(
.plugin_name = PLUGIN,
.version = VERSION,
.author = AUTHOR
)
register_forward( FM_Touch, "WeaponBk" );
}
public plugin_cfg( )
{
get_configsdir( filename, charsmax( filename ) )
format( filename, charsmax( filename ), "%s/blockpuw.ini", filename )
new filepointer = fopen( filename, "r" )
if( filepointer )
{
new readdata[128], parsemodel[32];
while( !feof( filepointer) )
{
fgets( filepointer,readdata,charsmax( readdata) )
parse( readdata, parsemodel, charsmax( parsemodel ) )
formatex( buffer, charsmax( buffer ), "models/w_%s.mdl", parsemodel );
break;
}
fclose( filepointer )
}
}
public WeaponBk( Entity, Id )
{
if ( !pev_valid( Entity ) || !pev_valid( Id ) || !is_user_alive( Id ) )
return FMRES_IGNORED;
new Model[32];
pev(Entity, pev_model, Model, charsmax( Model ) );
if( equali ( Model, buffer ) )
return FMRES_SUPERCEDE;
return FMRES_IGNORED;
}
__________________