Здравствуйте, нужна помощь плагин не компилируется при "вырезании" части кода ненужных команд пунктов кроме :1 оружие. 2Воскреснуть, 3воскресить друга , 4ноклип
Буду признателен тому кто поможет
Буду признателен тому кто поможет
Код:
#include < amxmodx >
#include < cstrike >
#include < fakemeta_util >
#include < hamsandwich >
#include <engine>
new FastSpeed[33]
#define P "Admin Menu"
#define V "3.0"
#define A "liFe iS GoOD"
#define FL_WATERJUMP (1<<11)
#define FL_ONGROUND (1<<9)
#define RegisterAdminMenu(%1,%2) register_menucmd(register_menuid(%1), 1023, %2)
#define MAX_CHAR 512
#define access(%1) get_user_flags(%1) & ADMIN_BAN
#define al(%1) is_user_alive(%1)
new iKey = MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_5|MENU_KEY_6|MENU_KEY_7|MENU_KEY_8|MENU_KEY_9|MENU_KEY_0
new bool:AdminMenu[ 33 ][ 6 ] , iSpawn[ 33 ] , iMoney[ 33 ] , iNumberSpawn[ 33 ] , g_iPlayerPage[ 33 ] , szPlayersMenu[ 33 ][ 32 ]
public plugin_init( )
{
register_plugin( P , V , A )
register_concmd( "adminmenu" , "CmdShowAdminMenu" )
register_event( "HLTV" , "EventRoundStart" , "a" , "1=0" , "2=0" )
RegisterHam( Ham_Spawn , "player" , "HamSpawnPlayer" , 1 )
RegisterAdminMenu( "AdminMenus" , "AdminKeysMenu" )
RegisterAdminMenu( "MenuPlayersRespawn" , "MenuPlayerKeysRespawn" )
}
public EventRoundStart( )
{
for( new i = 1; i <= get_maxplayers( ); i++ )
{
iSpawn[ i ] = 5
iNumberSpawn[ i ] = 1
iMoney[ i ] = random_num( 10000 , 50000 )
}
}
public HamSpawnPlayer( id )
{
for( new i = 1; i <= 5; i++ )
AdminMenu[ id ][ i ] = false
}
public CmdShowAdminMenu( id )
{
new Mode[ 32]
get_cvar_string( "deathrun_mode" , Mode , charsmax( Mode ) )
if( equali ( Mode , "DUEL" ) )
return PLUGIN_CONTINUE
AdminMenuNew( id )
return PLUGIN_HANDLED
}
public ShowRespawnMenu( id )
{
MenuPlayerRespawn( id , g_iPlayerPage[ id ] = 0 )
return PLUGIN_HANDLED;
}
public AdminMenuNew( id )
{
static menu[ MAX_CHAR ] , iLen
iLen = 0
iLen = formatex( menu[ iLen ] , charsmax( menu ) - iLen , "\yАдмин меню^n^n" )
iLen += formatex( menu[ iLen ] , charsmax( menu ) - iLen , "\r1. %sОружие: %s^n" , access( id ) && al( id ) ? "\w" : "\d" , AdminMenu[ id ][ 1 ] ? "\yВкл" : "\rВыкл" )
iLen += formatex( menu[ iLen ] , charsmax( menu ) - iLen , "\r2. %sВоскреснуть \r[%d]^n" , access( id ) && iSpawn[ id ] > 0 && NumberCT( ) > 3 ? "\w" : "\d" , iSpawn[ id ] )
iLen += formatex( menu[ iLen ] , charsmax( menu ) - iLen , "^n\r3%sВоскресить Друга \r[%d]^n^n" , access( id ) && iNumberSpawn[ id ] > 0 && NumberCT( ) > 9 ? "\w" : "\d" , iNumberSpawn[ id ] )
iLen += formatex( menu[ iLen ] , charsmax( menu ) - iLen , "\r4. %sНоклип: %s^n" , access( id ) && al( id ) ? "\w" : "\d" , AdminMenu[ id ][ 4 ] ? "\yВкл" : "\rВыкл" )
iLen += formatex( menu[ iLen ] , charsmax( menu ) - iLen , "^n\r0. \wЗакрыть" )
//Блокируем нажатия на клавиш.
access( id ) && al( id ) ? ( iKey |= MENU_KEY_1 ) : ( iKey &= ~MENU_KEY_1 )
get_user_flags( id ) & ADMIN_CFG && al( id ) ? ( iKey |= MENU_KEY_2 ) : ( iKey &= ~MENU_KEY_2 )
access( id ) && iSpawn[ id ] > 0 && NumberCT( ) > 3 ? ( iKey |= MENU_KEY_3 ) : ( iKey &= ~MENU_KEY_3 )
access( id ) ? ( iKey |= MENU_KEY_4 ) : ( iKey &= ~MENU_KEY_4 )
access( id ) && iNumberSpawn[ id ] > 0 && NumberCT( ) > 3 ? ( iKey |= MENU_KEY_5 ) : ( iKey &= ~MENU_KEY_5 )
access( id ) && al( id ) ? ( iKey |= MENU_KEY_6 ) : ( iKey &= ~MENU_KEY_6 )
access( id ) && al( id ) ? ( iKey |= MENU_KEY_7 ) : ( iKey &= ~MENU_KEY_7 )
access( id ) && !AdminMenu[ id ][ 5 ] ? ( iKey |= MENU_KEY_8 ) : ( iKey &= ~MENU_KEY_8 )
access( id ) ? ( iKey |= MENU_KEY_9 ) : ( iKey &= ~MENU_KEY_9 )
//Показываем меню.
show_menu( id , iKey , menu , -1 , "AdminMenus" )
return PLUGIN_CONTINUE
}
public AdminKeysMenu( id , key )
{
switch( key )
{
case 0:
{
fm_strip_user_weapons( id )
fm_give_item( id , AdminMenu[ id ][ 1 ] ? "weapon_knife" : "weapon_m4a1" )
fm_give_item( id , AdminMenu[ id ][ 1 ] ? "" : "weapon_ak47" )
cs_set_user_bpammo( id , CSW_AK47, 200 )
cs_set_user_bpammo( id , CSW_M4A1, 200 )
AdminMenu[ id ][ 1 ] = AdminMenu[ id ][ 1 ] ? false : true
CmdShowAdminMenu( id )
}
case 1:
{
FastSpeed[ id ] = FastSpeed[ id ] ? false : true
CmdShowAdminMenu( id )
}
case 2:
{
ExecuteHam( Ham_CS_RoundRespawn , id )
--iSpawn[ id ]
CmdShowAdminMenu( id )
}
}
case 3: ShowRespawnMenu( id )
case 4:
{
if( !( get_user_team( id ) == 3 ) )
{
client_print( id , print_center , "Ноклип доступен только спектаторов." )
CmdShowAdminMenu( id )
return PLUGIN_HANDLED
}
fm_set_user_noclip( id , fm_get_user_noclip( id ) ? 0 : 1 )
AdminMenu[ id ][ 4 ] = AdminMenu[ id ][ 4 ] ? false : true
if( !AdminMenu[ id ] [ 4 ] )
fm_set_user_rendering( id )
else fm_set_user_rendering( id , _, _, _, _, kRenderTransAdd , 70 )
CmdShowAdminMenu( id )
}
case 7:
case 8: client_cmd( id , "amxmodmenu" )
}
return PLUGIN_CONTINUE
}
public MenuPlayerRespawn(id, iPage)
{
new szPlayers[ 32 ] , iNum , iLen , menu[ MAX_CHAR ] , iKey, iItem, name[ 32 ]
get_players( szPlayers , iNum );
szPlayersMenu[ id ] = szPlayers
new iStart = iPage * 8;
new iEnd = iStart + 8;
iLen = format(menu[ iLen ] , charsmax( menu ) - iLen , "\yВоскресить Друга^n^n" )
for( new i = iStart; i < iEnd; i++ )
{
if( i < iNum )
{
get_user_name( szPlayers[ i ] , name , charsmax( name ) )
if( id == szPlayers[ i ] )
{
iKey &= ~( 1<<iItem )
iLen += format( menu[ iLen ] , charsmax( menu ) - iLen , "\r%d. \d%s \y(\rЭто вы\y)^n" , ++iItem , name )
}
else if( get_user_flags( szPlayers[ i ] ) & ADMIN_IMMUNITY )
{
iKey &= ~( 1<<iItem )
iLen += format( menu[ iLen ] , charsmax( menu ) - iLen , "\r%d. \d%s \r*^n" , ++iItem , name )
}
else if( is_user_alive( szPlayers[ i ] ) )
{
iKey &= ~( 1<<iItem )
iLen += format( menu[ iLen ] , charsmax( menu ) - iLen , "\r%d. \d%s^n" , ++iItem , name )
}
else
{
iKey |= ( 1<<iItem )
iLen += format( menu[ iLen ] , charsmax( menu ) - iLen , "\r%d. \w%s^n" , ++iItem , name )
}
}
}
iKey |= ( 1<<9 )
if(iEnd < iNum)
{
iKey |= ( 1<<8 )
iLen += format( menu[ iLen ] , charsmax( menu ) - iLen , "^n\r9. \wДальше^n\r0. \w%s" , iPage ? "Назад" : "Выход" )
}
else
iLen += format( menu[ iLen ] , charsmax( menu ) - iLen , "^n\r0. \w%s" , iPage ? "Назад" : "Выход" )
return show_menu( id , iKey , menu , -1 , "MenuPlayersRespawn" )
}
public MenuPlayerKeysRespawn( id , iKey )
{
switch( iKey )
{
case 8: MenuPlayerRespawn( id , ++g_iPlayerPage[ id ] )
case 9: MenuPlayerRespawn( id , --g_iPlayerPage[ id ] )
default:
{
new pPlayer = szPlayersMenu[ id ][ ( g_iPlayerPage[ id ] * 8 ) + iKey ]
if( !is_user_connected( pPlayer ) )
return PLUGIN_CONTINUE
new szName[ 32 ] , szNameVictim[ 32 ]
get_user_name( id , szName , charsmax( szName ) )
get_user_name( pPlayer , szNameVictim , charsmax( szNameVictim ) )
ExecuteHam( Ham_CS_RoundRespawn , pPlayer )
client_print( 0 , print_chat , "[АдминКа] Админ %s воскресил %s" , szName , szNameVictim )
--iNumberSpawn[ id ]
}
}
return PLUGIN_HANDLED
}
stock NumberCT( )
{
new CountCT, i
for(i = 1; i <= get_maxplayers(); i++)
if(is_user_alive(i) && is_user_connected(i) && get_user_team(i) == 2)
CountCT++
return CountCT
}
public client_PreThink(id)
{
new Mode[ 128 ]
get_cvar_string( "deathrun_mode" , Mode , sizeof( Mode )-1 )
if( equali ( Mode , "DUEL" ) )
return PLUGIN_CONTINUE
if( !FastSpeed[ id ] )
return PLUGIN_CONTINUE
entity_set_float(id, EV_FL_fuser2, 0.0)
if(entity_get_int(id, EV_INT_button) & 2)
{
new flags = entity_get_int(id, EV_INT_flags)
if(flags & FL_WATERJUMP)
return PLUGIN_CONTINUE
if(entity_get_int(id, EV_INT_waterlevel) >= 2)
return PLUGIN_CONTINUE
if(!(flags & FL_ONGROUND))
return PLUGIN_CONTINUE
new Float:vecVelocity[3]
entity_get_vector(id, EV_VEC_velocity, vecVelocity)
vecVelocity[0] *= 1.20
vecVelocity[1] *= 1.20
entity_set_vector(id, EV_VEC_velocity, vecVelocity);
entity_set_int(id, EV_INT_gaitsequence, 6) // Play the Jump Animation
}
return PLUGIN_CONTINUE
}
Код:
#include < amxmodx >
#include < cstrike >
#include < fakemeta_util >
#include < hamsandwich >
#include <engine>
new FastSpeed[33]
#define P "Admin Menu"
#define V "3.0"
#define A "liFe iS GoOD"
#define FL_WATERJUMP (1<<11)
#define FL_ONGROUND (1<<9)
#define RegisterAdminMenu(%1,%2) register_menucmd(register_menuid(%1), 1023, %2)
#define MAX_CHAR 512
#define access(%1) get_user_flags(%1) & ADMIN_BAN
#define al(%1) is_user_alive(%1)
new iKey = MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_5|MENU_KEY_6|MENU_KEY_7|MENU_KEY_8|MENU_KEY_9|MENU_KEY_0
new bool:AdminMenu[ 33 ][ 6 ] , iSpawn[ 33 ] , iMoney[ 33 ] , iNumberSpawn[ 33 ] , g_iPlayerPage[ 33 ] , szPlayersMenu[ 33 ][ 32 ]
public plugin_init( )
{
register_plugin( P , V , A )
register_concmd( "adminmenu" , "CmdShowAdminMenu" )
register_event( "HLTV" , "EventRoundStart" , "a" , "1=0" , "2=0" )
RegisterHam( Ham_Spawn , "player" , "HamSpawnPlayer" , 1 )
RegisterAdminMenu( "AdminMenus" , "AdminKeysMenu" )
RegisterAdminMenu( "MenuPlayersRespawn" , "MenuPlayerKeysRespawn" )
}
public EventRoundStart( )
{
for( new i = 1; i <= get_maxplayers( ); i++ )
{
iSpawn[ i ] = 5
iNumberSpawn[ i ] = 1
iMoney[ i ] = random_num( 10000 , 50000 )
}
}
public HamSpawnPlayer( id )
{
for( new i = 1; i <= 5; i++ )
AdminMenu[ id ][ i ] = false
}
public CmdShowAdminMenu( id )
{
new Mode[ 32]
get_cvar_string( "deathrun_mode" , Mode , charsmax( Mode ) )
if( equali ( Mode , "DUEL" ) )
return PLUGIN_CONTINUE
AdminMenuNew( id )
return PLUGIN_HANDLED
}
public ShowRespawnMenu( id )
{
MenuPlayerRespawn( id , g_iPlayerPage[ id ] = 0 )
return PLUGIN_HANDLED;
}
public AdminMenuNew( id )
{
static menu[ MAX_CHAR ] , iLen
iLen = 0
iLen = formatex( menu[ iLen ] , charsmax( menu ) - iLen , "\yАдмин меню^n^n" )
iLen += formatex( menu[ iLen ] , charsmax( menu ) - iLen , "\r1. %sОружие: %s^n" , access( id ) && al( id ) ? "\w" : "\d" , AdminMenu[ id ][ 1 ] ? "\yВкл" : "\rВыкл" )
iLen += formatex( menu[ iLen ] , charsmax( menu ) - iLen , "\r2. %sУскоритель: %s^n" , get_user_flags( id ) & ADMIN_CFG && al( id ) ? "\w" : "\d" , FastSpeed[ id ] ? "\yВкл" : "\rВыкл" )
iLen += formatex( menu[ iLen ] , charsmax( menu ) - iLen , "\r3. %sВоскреснуть \r[%d]^n" , access( id ) && iSpawn[ id ] > 0 && NumberCT( ) > 3 ? "\w" : "\d" , iSpawn[ id ] )
switch( get_user_team( id ) )
{
case 1: iLen += formatex( menu[ iLen ] , charsmax( menu ) - iLen , "\r4. %sВаша команда: \yТеррорист^n" , access( id ) ? "\w" : "\d" )
case 2: iLen += formatex( menu[ iLen ] , charsmax( menu ) - iLen , "\r4. %sВаша команда: \yКТ^n" , access( id ) ? "\w" : "\d" )
case 3: iLen += formatex( menu[ iLen ] , charsmax( menu ) - iLen , "\r4. %sВаша команда: \yСпектатор^n" , access( id ) ? "\w" : "\d" )
}
iLen += formatex( menu[ iLen ] , charsmax( menu ) - iLen , "^n\r5. %sВоскресить Друга \r[%d]^n^n" , access( id ) && iNumberSpawn[ id ] > 0 && NumberCT( ) > 3 ? "\w" : "\d" , iNumberSpawn[ id ] )
iLen += formatex( menu[ iLen ] , charsmax( menu ) - iLen , "\r6. %sБессмертие: %s^n" , access( id ) && al( id ) ? "\w" : "\d" , AdminMenu[ id ][ 3 ] ? "\yВкл" : "\rВыкл" )
iLen += formatex( menu[ iLen ] , charsmax( menu ) - iLen , "\r7. %sНоклип: %s^n" , access( id ) && al( id ) ? "\w" : "\d" , AdminMenu[ id ][ 4 ] ? "\yВкл" : "\rВыкл" )
iLen += formatex( menu[ iLen ] , charsmax( menu ) - iLen , "\r8. %sДеньги \r[%d]^n" , access( id ) && !AdminMenu[ id ][ 5 ] ? "\w" : "\d" , iMoney[ id ] )
iLen += formatex( menu[ iLen ] , charsmax( menu ) - iLen , "\r9. %sAMX Mod X Меню^n" , access( id ) ? "\w" : "\d" )
iLen += formatex( menu[ iLen ] , charsmax( menu ) - iLen , "^n\r0. \wЗакрыть" )
//Блокируем нажатия на клавиш.
access( id ) && al( id ) ? ( iKey |= MENU_KEY_1 ) : ( iKey &= ~MENU_KEY_1 )
get_user_flags( id ) & ADMIN_CFG && al( id ) ? ( iKey |= MENU_KEY_2 ) : ( iKey &= ~MENU_KEY_2 )
access( id ) && iSpawn[ id ] > 0 && NumberCT( ) > 3 ? ( iKey |= MENU_KEY_3 ) : ( iKey &= ~MENU_KEY_3 )
access( id ) ? ( iKey |= MENU_KEY_4 ) : ( iKey &= ~MENU_KEY_4 )
access( id ) && iNumberSpawn[ id ] > 0 && NumberCT( ) > 3 ? ( iKey |= MENU_KEY_5 ) : ( iKey &= ~MENU_KEY_5 )
access( id ) && al( id ) ? ( iKey |= MENU_KEY_6 ) : ( iKey &= ~MENU_KEY_6 )
access( id ) && al( id ) ? ( iKey |= MENU_KEY_7 ) : ( iKey &= ~MENU_KEY_7 )
access( id ) && !AdminMenu[ id ][ 5 ] ? ( iKey |= MENU_KEY_8 ) : ( iKey &= ~MENU_KEY_8 )
access( id ) ? ( iKey |= MENU_KEY_9 ) : ( iKey &= ~MENU_KEY_9 )
//Показываем меню.
show_menu( id , iKey , menu , -1 , "AdminMenus" )
return PLUGIN_CONTINUE
}
public AdminKeysMenu( id , key )
{
switch( key )
{
case 0:
{
fm_strip_user_weapons( id )
fm_give_item( id , AdminMenu[ id ][ 1 ] ? "weapon_knife" : "weapon_m4a1" )
fm_give_item( id , AdminMenu[ id ][ 1 ] ? "" : "weapon_ak47" )
cs_set_user_bpammo( id , CSW_AK47, 200 )
cs_set_user_bpammo( id , CSW_M4A1, 200 )
AdminMenu[ id ][ 1 ] = AdminMenu[ id ][ 1 ] ? false : true
CmdShowAdminMenu( id )
}
case 1:
{
FastSpeed[ id ] = FastSpeed[ id ] ? false : true
CmdShowAdminMenu( id )
}
case 2:
{
ExecuteHam( Ham_CS_RoundRespawn , id )
--iSpawn[ id ]
CmdShowAdminMenu( id )
}
case 3:
{
switch( get_user_team( id ) )
{
case 1: cs_set_user_team( id , CS_TEAM_CT )
case 2: cs_set_user_team( id , CS_TEAM_SPECTATOR )
case 3: cs_set_user_team( id , CS_TEAM_T )
}
CmdShowAdminMenu( id )
}
case 4: ShowRespawnMenu( id )
case 5:
{
fm_set_user_godmode( id , fm_get_user_godmode( id ) ? 0 : 1 )
AdminMenu[ id ][ 3 ] = AdminMenu[ id ][ 3 ] ? false : true
CmdShowAdminMenu( id )
}
case 6:
{
if( !( get_user_team( id ) == 3 ) )
{
client_print( id , print_center , "Ноклип доступен только спектаторов." )
CmdShowAdminMenu( id )
return PLUGIN_HANDLED
}
fm_set_user_noclip( id , fm_get_user_noclip( id ) ? 0 : 1 )
AdminMenu[ id ][ 4 ] = AdminMenu[ id ][ 4 ] ? false : true
if( !AdminMenu[ id ] [ 4 ] )
fm_set_user_rendering( id )
else fm_set_user_rendering( id , _, _, _, _, kRenderTransAdd , 70 )
CmdShowAdminMenu( id )
}
case 7:
{
cs_set_user_money( id , cs_get_user_money( id ) + iMoney[ id ] )
AdminMenu[ id ][ 5 ] = true
CmdShowAdminMenu( id )
}
case 8: client_cmd( id , "amxmodmenu" )
}
return PLUGIN_CONTINUE
}
public MenuPlayerRespawn(id, iPage)
{
new szPlayers[ 32 ] , iNum , iLen , menu[ MAX_CHAR ] , iKey, iItem, name[ 32 ]
get_players( szPlayers , iNum );
szPlayersMenu[ id ] = szPlayers
new iStart = iPage * 8;
new iEnd = iStart + 8;
iLen = format(menu[ iLen ] , charsmax( menu ) - iLen , "\yВоскресить Друга^n^n" )
for( new i = iStart; i < iEnd; i++ )
{
if( i < iNum )
{
get_user_name( szPlayers[ i ] , name , charsmax( name ) )
if( id == szPlayers[ i ] )
{
iKey &= ~( 1<<iItem )
iLen += format( menu[ iLen ] , charsmax( menu ) - iLen , "\r%d. \d%s \y(\rЭто вы\y)^n" , ++iItem , name )
}
else if( get_user_flags( szPlayers[ i ] ) & ADMIN_IMMUNITY )
{
iKey &= ~( 1<<iItem )
iLen += format( menu[ iLen ] , charsmax( menu ) - iLen , "\r%d. \d%s \r*^n" , ++iItem , name )
}
else if( is_user_alive( szPlayers[ i ] ) )
{
iKey &= ~( 1<<iItem )
iLen += format( menu[ iLen ] , charsmax( menu ) - iLen , "\r%d. \d%s^n" , ++iItem , name )
}
else
{
iKey |= ( 1<<iItem )
iLen += format( menu[ iLen ] , charsmax( menu ) - iLen , "\r%d. \w%s^n" , ++iItem , name )
}
}
}
iKey |= ( 1<<9 )
if(iEnd < iNum)
{
iKey |= ( 1<<8 )
iLen += format( menu[ iLen ] , charsmax( menu ) - iLen , "^n\r9. \wДальше^n\r0. \w%s" , iPage ? "Назад" : "Выход" )
}
else
iLen += format( menu[ iLen ] , charsmax( menu ) - iLen , "^n\r0. \w%s" , iPage ? "Назад" : "Выход" )
return show_menu( id , iKey , menu , -1 , "MenuPlayersRespawn" )
}
public MenuPlayerKeysRespawn( id , iKey )
{
switch( iKey )
{
case 8: MenuPlayerRespawn( id , ++g_iPlayerPage[ id ] )
case 9: MenuPlayerRespawn( id , --g_iPlayerPage[ id ] )
default:
{
new pPlayer = szPlayersMenu[ id ][ ( g_iPlayerPage[ id ] * 8 ) + iKey ]
if( !is_user_connected( pPlayer ) )
return PLUGIN_CONTINUE
new szName[ 32 ] , szNameVictim[ 32 ]
get_user_name( id , szName , charsmax( szName ) )
get_user_name( pPlayer , szNameVictim , charsmax( szNameVictim ) )
ExecuteHam( Ham_CS_RoundRespawn , pPlayer )
client_print( 0 , print_chat , "[АдминКа] Админ %s воскресил %s" , szName , szNameVictim )
--iNumberSpawn[ id ]
}
}
return PLUGIN_HANDLED
}
stock NumberCT( )
{
new CountCT, i
for(i = 1; i <= get_maxplayers(); i++)
if(is_user_alive(i) && is_user_connected(i) && get_user_team(i) == 2)
CountCT++
return CountCT
}
public client_PreThink(id)
{
new Mode[ 128 ]
get_cvar_string( "deathrun_mode" , Mode , sizeof( Mode )-1 )
if( equali ( Mode , "DUEL" ) )
return PLUGIN_CONTINUE
if( !FastSpeed[ id ] )
return PLUGIN_CONTINUE
entity_set_float(id, EV_FL_fuser2, 0.0)
if(entity_get_int(id, EV_INT_button) & 2)
{
new flags = entity_get_int(id, EV_INT_flags)
if(flags & FL_WATERJUMP)
return PLUGIN_CONTINUE
if(entity_get_int(id, EV_INT_waterlevel) >= 2)
return PLUGIN_CONTINUE
if(!(flags & FL_ONGROUND))
return PLUGIN_CONTINUE
new Float:vecVelocity[3]
entity_get_vector(id, EV_VEC_velocity, vecVelocity)
vecVelocity[0] *= 1.20
vecVelocity[1] *= 1.20
entity_set_vector(id, EV_VEC_velocity, vecVelocity);
entity_set_int(id, EV_INT_gaitsequence, 6) // Play the Jump Animation
}
return PLUGIN_CONTINUE
}
Последнее редактирование модератором: