Hey Can some one fix this Warning? every time i add new line to plugin it make me this warning...
PHP Code:
#include < amxmodx >
#include < amxmisc >
#include < fakemeta >
#include < fun >
#include < xs >
#define ADMIN_VIP ADMIN_LEVEL_H
#define TELEPORT_INTERVAL 20.0 //float
#define TASK_REMOVEGODMODE 23131313
static const PLUGIN[ ] = "VIP Furien";
static const VERSION[ ] = "1.0";
static const szTag[ ] = "[Furien-Ultimate]";
new Float:g_fLastUsed[ 33 ];
new g_bNoRecoil[ 33 ];
new g_bGodMode[ 33 ]
new g_bTeleport[ 33 ]
new g_bHpAdded[ 33 ]
public plugin_init( )
{
register_plugin( PLUGIN, VERSION, "Unhask" )
register_event( "ResetHUD", "SpawnPlayer", "be" )
register_clcmd( "say", "SayChatAnswer" )
register_concmd( "+teleport", "CmdTeleport" )
register_concmd( "-teleport", "CmdTeleport" )
register_concmd( "+power", "CmdGodMode" )
register_concmd( "-power", "CmdGodMode" )
register_forward( FM_PlayerPreThink, "fwdPlayerPreThink" )
}
public client_disconnect(id)
{
if(task_exists(id+TASK_REMOVEGODMODE))
remove_task(id+TASK_REMOVEGODMODE)
}
public SpawnPlayer( id )
{
g_bGodMode[ id ] = false
g_bTeleport[ id ] = false
g_bHpAdded[ id ] = false
g_bNoRecoil[ id ] = false
}
public SayChatAnswer( id )
{
new szSaid[ 132 ]
read_args( szSaid, sizeof ( szSaid ) - 1 )
remove_quotes( szSaid )
if ( containi( szSaid, "/vipmenu" ) )
{
if ( is_user_alive( id ) && get_user_flags( id ) & ADMIN_VIP )
{
ShowMenuVIP( id )
}
}
}
public ShowMenuVIP( id )
{
new szMenu
switch ( get_user_team( id ) )
{
case 1:
{
szMenu = menu_create( "\rFurien \yVIP Menu", "iContent" )
menu_additem( szMenu, "\r1. \w255HP & 255AP", "1" )
menu_additem( szMenu, "\r2. \wHe Grenade", "2" )
}
case 2:
{
szMenu = menu_create( "\rAnti-Furien \yVIP Menu", "iContent" )
menu_additem( szMenu, "\r1. \w255HP & 255AP", "1" )
menu_additem( szMenu, "\r2. \wHe Grenade", "2" )
menu_additem( szMenu, "\r3. \wGodMode", "3" )
menu_additem( szMenu, "\r4. \wTeleport", "4" )
menu_additem( szMenu, "\r5. \wNoRecoil", "5" )
}
}
menu_display( id, szMenu, 0 )
return 0
}
public iContent( id, szMenu, Item )
{
if ( Item == MENU_EXIT )
{
menu_destroy( szMenu )
return 1
}
new iData[ 9 ], szName[ 32 ]
new iAccess, iCallback
menu_item_getinfo( szMenu, Item, iAccess, iData, sizeof ( iData ) - 1, szName, sizeof ( szName ) - 1, iCallback )
new iKeys = str_to_num( iData )
switch( get_user_team( id ) )
{
case 1:
{
switch( iKeys )
{
case 1:
{
if(!g_bHpAdded[id])
{
set_user_health( id, 255 )
set_user_armor( id, 255 )
g_bHpAdded[id] = true
print_colorchat( id, "!t%s !yYou choose !g255HP & 255AP", szTag )
}
}
case 2:
{
{
give_item( id, "weapon_hegrenade" )
print_colorchat( id, "!t%s !yYou choose !gHE", szTag )
}
}
}
}
case 2:
{
switch( iKeys )
{
case 1:
{
set_user_health( id, 255 )
set_user_armor( id, 255 )
print_colorchat( id, "!t%s !yYou choose !g255HP & 255AP", szTag )
}
case 2:
{
give_item( id, "weapon_hegrenade" )
print_colorchat( id, "!t%s !yYou choose !gHE", szTag )
}
case 3:
{
if(!g_bGodMode[id])
{
g_bGodMode[ id ] = true
client_cmd( id, "bind b ^"+power^"" )
print_colorchat( id, "!t%s !yYou choose !gGodMode", szTag )
print_colorchat( id, "!t%s !yBind [B] to use !gGodMode", szTag )
}
}
case 4:
{
if(!g_bTeleport[id])
{
g_bTeleport[ id ] = true
client_cmd( id, "bind v ^"+teleport^"" )
print_colorchat( id, "!t%s !yYou choose !gTeleport", szTag )
print_colorchat( id, "!t%s !yBind [V] to use !gTeleport", szTag )
}
}
case 5:
{
g_bNoRecoil[ id ] = true;
print_colorchat( id, "!t%s !yYou choose !gNoRecoil", szTag )
}
}
}
}
return 0
}
public RemoveGodM(id)
{
id -= TASK_REMOVEGODMODE
g_bGodMode[id] = false
set_pev(id,pev_takedamage,DAMAGE_AIM)
}
public CmdGodMode( id )
{
if( !is_user_alive( id ) || !g_bTeleport[ id ] )
return PLUGIN_HANDLED
set_pev(id,pev_takedamage,DAMAGE_NO)
set_task(20.0,"RemoveGodM",id+TASK_REMOVEGODMODE)
return PLUGIN_HANDLED
}
public CmdTeleport( id )
{
if( !is_user_alive( id ) || !g_bTeleport[ id ] )
return PLUGIN_HANDLED
static Float:fTime
fTime = get_gametime( )
if( g_fLastUsed[ id ] > 0.0 && ( fTime - g_fLastUsed[ id ] ) < TELEPORT_INTERVAL )
{
print_colorchat( id, "!t%s !yYou can use teleport once in !g%i !yseconds!", szTag, floatround( TELEPORT_INTERVAL ) )
return PLUGIN_HANDLED
}
static Float:start[ 3 ], Float:dest[ 3 ]
pev(id, pev_origin, start)
pev(id, pev_view_ofs, dest)
xs_vec_add(start, dest, start)
pev(id, pev_v_angle, dest)
engfunc(EngFunc_MakeVectors, dest)
global_get(glb_v_forward, dest)
xs_vec_mul_scalar(dest, 9999.0, dest)
xs_vec_add(start, dest, dest)
engfunc(EngFunc_TraceLine, start, dest, IGNORE_MONSTERS, id, 0)
get_tr2(0, TR_vecEndPos, start)
get_tr2(0, TR_vecPlaneNormal, dest)
static const player_hull[] = {HULL_HUMAN, HULL_HEAD}
engfunc(EngFunc_TraceHull, start, start, DONT_IGNORE_MONSTERS, player_hull[_:!!(pev(id, pev_flags) & FL_DUCKING)], id, 0)
if ( !get_tr2(0, TR_StartSolid) && !get_tr2(0, TR_AllSolid) && get_tr2(0, TR_InOpen))
{
engfunc(EngFunc_SetOrigin, id, start)
return PLUGIN_HANDLED
}
static Float:size[3]
pev(id, pev_size, size)
xs_vec_mul_scalar(dest, (size[0] + size[1]) / 2.0, dest)
xs_vec_add(start, dest, dest)
engfunc(EngFunc_SetOrigin, id, dest)
g_fLastUsed[id] = fTime
return PLUGIN_HANDLED
}
public fwdPlayerPreThink( id )
{
if( !is_user_alive( id ) && !g_bNoRecoil[ id ] )
return 1;
if ( get_user_flags( id ) & ADMIN_VIP )
{
set_pev( id, pev_punchangle, { 0.0,0.0,0.0 } );
}
return 0;
}
stock print_colorchat(const id, const input[], any:...)
{
new count = 1, players[32];
static msg[191];
vformat(msg,190,input,3);
replace_all(msg,190,"!g","^4");// green txt
replace_all(msg,190,"!y","^1");// orange txt
replace_all(msg,190,"!t","^3");// team txt
replace_all(msg,190,"!w","^0");// team txt
if (id) players[0] = id; else get_players(players,count,"ch");
for (new i=0;i<count;i++)
if (is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);
write_byte(players[i]);
write_string(msg);
message_end();
}
}