Byłby ktoś w stanie przerobić ten plugin ,aby była jeszcze opcja brak noża i po włączeniu jej ,nie widać by było noża oraz wszystkich broni?
#include <amxmodx>
#include <cstrike>
#include <fakemeta>
new bool:g_bPlayerInvisible[33], bool:g_bWaterInvisible[33];
new bool:g_bWaterEntity[1386], bool:g_bWaterFound;
public plugin_init( )
{
register_plugin( "Invis", "1.0", "edited by DarkGL");
register_clcmd( "say /invis", "menuInvisDisplay" );
register_menucmd( register_menuid( "" ), 1023, "MenuInvis" );
register_forward( FM_AddToFullPack, "fwdAddToFullPack_Post", 1 );
}
public plugin_cfg( )
{
new ent = engfunc( EngFunc_FindEntityByString, -1, "classname", "func_water" );
while( ent )
{
if( !g_bWaterFound )
{
g_bWaterFound = true;
}
g_bWaterEntity[ent] = true;
ent = engfunc( EngFunc_FindEntityByString, ent, "classname", "func_water" );
}
}
public fwdAddToFullPack_Post( es_handle, e, ent, host, hostflags, player, pset )
{
if( player ){
if(is_user_alive(host) && g_bPlayerInvisible[host] && host != ent && is_user_alive(ent) && pev_valid(ent) && pev_valid(host) && cs_get_user_team( host ) == cs_get_user_team( ent )){
set_es( es_handle, ES_Origin, { 999999999.0, 999999999.0, 999999999.0 } );
}
}
else if( g_bWaterInvisible[host] && g_bWaterEntity[ent]){
set_es( es_handle, ES_Effects, EF_NODRAW );
}
}
public menuInvisDisplay( plr )
{
static menu[1024];
new len = 0;
len += format( menu[len], sizeof menu - len, "\r1. \wGracze: \d(\r%s\d)^n", g_bPlayerInvisible[plr] ? "Niewidoczni" : "Widoczni" );
len += format( menu[len], sizeof menu - len, "\r2. \wWoda: \d(\r%s\d)^n^n", g_bWaterFound ? ( g_bWaterInvisible[plr] ? "Niewidoczna" : "Widoczna" ) : "Brak wody" );
len += format( menu[len], sizeof menu - len, "\r0. \wWyjscie" );
show_menu( plr, ( 1<<0 | 1<<1 | 1<<9 ), menu, -1 );
return PLUGIN_HANDLED;
}
public MenuInvis( plr, key )
{
switch( key )
{
case 0:
{
g_bPlayerInvisible[plr] = !g_bPlayerInvisible[plr];
menuInvisDisplay( plr );
}
case 1:
{
g_bWaterInvisible[plr] = !g_bWaterInvisible[plr];
menuInvisDisplay( plr );
}
case 9: show_menu( plr, 0, "" );
}
}
public client_connect( plr )
{
g_bPlayerInvisible[plr] = false;
g_bWaterInvisible[plr] = false;
}