Raised This Month: $51 Target: $400
 12% 

Plugin errors need help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
aaa131
Junior Member
Join Date: May 2011
Location: Turkey
Old 03-08-2021 , 10:36   Plugin errors need help
Reply With Quote #1

Hi, i tried to install basebuilder nemesis plugin but getting some errors in new amxmodx can you help me to solve these?

Errors:

PHP Code:
//// bb_Boss_1.sma
//
// C:\Users\AhmetPC\Desktop\Yeni klas÷r (2)\amxmodx-1.10.0-git5413-base-windows\
addons\amxmodx\scripting\bb_Boss_1.sma(740) : warning 217loose indentation
// C:\Users\AhmetPC\Desktop\Yeni klas÷r (2)\amxmodx-1.10.0-git5413-base-windows\
addons\amxmodx\scripting\bb_Boss_1.sma(743) : warning 217loose indentation
// C:\Users\AhmetPC\Desktop\Yeni klas÷r (2)\amxmodx-1.10.0-git5413-base-windows\
addons\amxmodx\scripting\bb_Boss_1.sma(714) : warning 204symbol is assigned a
value that is never used
"id"
// C:\Users\AhmetPC\Desktop\Yeni klas÷r (2)\amxmodx-1.10.0-git5413-base-windows\
addons\amxmodx\scripting\bb_Boss_1.sma(769) : warning 204symbol is assigned a
value that is never used
"avgFactor"
// C:\Users\AhmetPC\Desktop\Yeni klas÷r (2)\amxmodx-1.10.0-git5413-base-windows\
addons\amxmodx\scripting\bb_Boss_1.sma(798) : warning 217loose indentation
// C:\Users\AhmetPC\Desktop\Yeni klas÷r (2)\amxmodx-1.10.0-git5413-base-windows\
addons\amxmodx\scripting\bb_Boss_1.sma(799) : warning 217loose indentation
// C:\Users\AhmetPC\Desktop\Yeni klas÷r (2)\amxmodx-1.10.0-git5413-base-windows\
addons\amxmodx\scripting\bb_Boss_1.sma(805) : warning 217loose indentation
// C:\Users\AhmetPC\Desktop\Yeni klas÷r (2)\amxmodx-1.10.0-git5413-base-windows\
addons\amxmodx\scripting\bb_Boss_1.sma(807) : warning 217loose indentation
// C:\Users\AhmetPC\Desktop\Yeni klas÷r (2)\amxmodx-1.10.0-git5413-base-windows\
addons\amxmodx\scripting\bb_Boss_1.sma(870) : warning 217loose indentation
// C:\Users\AhmetPC\Desktop\Yeni klas÷r (2)\amxmodx-1.10.0-git5413-base-windows\
addons\amxmodx\scripting\bb_Boss_1.sma(801) : warning 204symbol is assigned a
value that is never used
"ff"
// Header size:           2680 bytes
// Code size:            19156 bytes
// Data size:             7876 bytes
// Stack/heap size:      16384 bytes
// Total requirements:   46096 bytes
//
// 10 Warnings.
// Done.
//
// Compilation Time: 0,62 sec
// ----------------------------------------

Press enter to exit ... 

PLUGIN:

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <engine>
#include <fun>
enum
{
    
COLOR_RED 0,         //200, 000, 000
    
COLOR_REDORANGE,     //255, 083, 073
    
COLOR_ORANGE,         //255, 117, 056
    
COLOR_YELLOWORANGE,     //255, 174, 066
    
COLOR_PEACH,         //255, 207, 171
    
COLOR_YELLOW,         //252, 232, 131
    
COLOR_LEMONYELLOW,     //254, 254, 034
    
COLOR_JUNGLEGREEN,     //059, 176, 143
    
COLOR_YELLOWGREEN,     //197, 227, 132
    
COLOR_GREEN,         //000, 200, 000
    
COLOR_AQUAMARINE,     //120, 219, 226
    
COLOR_BABYBLUE,         //135, 206, 235
    
COLOR_SKYBLUE,         //128, 218, 235
    
COLOR_BLUE,         //000, 000, 200
    
COLOR_VIOLET,         //146, 110, 174
    
COLOR_PINK,         //255, 105, 180
    
COLOR_MAGENTA,         //246, 100, 175
    
COLOR_MAHOGANY,        //205, 074, 076
    
COLOR_TAN,         //250, 167, 108
    
COLOR_LIGHTBROWN,     //234, 126, 093
    
COLOR_BROWN,         //180, 103, 077
    
COLOR_GRAY,         //149, 145, 140
    
COLOR_BLACK,         //000, 000, 000
    
COLOR_WHITE         //255, 255, 255
}

enum
{
    
PUSHING 1,
    
PULLING
}

enum
{
    
ATT_HEALTH 0,
    
ATT_SPEED,
    
ATT_GRAVITY
}

/**
 * Returns whether Base Builder is active.
 */
stock is_basebuilder_active()
{
    if(!
cvar_exists("bb_enabled"))
    {
        
log_amx("Cvar: ^"bb_enabled^" does not exist.")
        return 
0
    
}
    return 
get_cvar_num("bb_enabled")
}

/**
 * Registers a custom class which will be added to the zombie classes menu of BB.
 *
 * Note: The returned zombie class ID can be later used to identify
 * the class when calling the bb_get_user_zombie_class() natives.
 *
 * @param name        Caption to display on the menu.
 * @param info        Brief description of the class.
 * @param model        Player model to be used.
 * @param clawmodel    Claws model to be used.
 * @param hp        Initial health points.
 * @param speed        Maximum speed.
 * @param gravity    Gravity multiplier.
 * @param knockback    Empty value.
 * @param adminflags    Set flag of admin only class, ADMIN_USER is normal players.
 * @param credits    Cost of unlocking this class (if credits is enabled).
 * @return        An internal zombie class ID, or -1 on failure.
 */
native bb_register_zombie_class(const name[], const info[], const model[], const clawmodel[], hpspeedFloat:gravityFloat:knockback 0.0adminflags ADMIN_ALLcredits )
native zp_register_zombie_class(const name[], const info[], const model[], const clawmodel[], hpspeedFloat:gravityFloat:knockback 0.0adminflags ADMIN_ALLcredits )

/**
 * Returns a zombie classes cost.
 *
 * @param classid    A valid zombie class ID.
 */
native bb_get_class_cost(classid)

/**
 * Returns a player's current zombie class ID.
 *
 * @param id        Player index.
 * @return        Internal zombie class ID, or -1 if not yet chosen.
 */
native bb_get_user_zombie_class(id)
native zp_get_user_zombie_class(id)

/**
 * Returns a player's next zombie class ID (when they respawn).
 *
 * @param id        Player index.
 * @return        Internal zombie class ID, or -1 if not yet chosen.
 */
native bb_get_user_next_class(id)
native zp_get_user_next_class(id)

/**
 * Sets a player's next zombie class ID (when they respawn).
 *
 * @param id        Player index.
 * @param classid    A valid zombie class ID.
 * @return        True on success, false otherwise.
 */
native bb_set_user_zombie_class(idclassid)
native zp_set_user_zombie_class(idclassid)

/**
 * Returns whether a player is a zombie.
 *
 * @param id        Player index.
 * @return        True if it is, false otherwise.
 */
native bb_is_user_zombie(id)
native zp_get_user_zombie(id)

/**
 * Returns whether a player is banned from building.
 *
 * @param id        Player index.
 * @return        True if it is, false otherwise.
 */
native bb_is_user_banned(id)

/**
 * Returns whether the game is still in the build phase.
 *
 * @param id        Player index.
 * @return        True if it is, false otherwise.
 */
native bb_is_build_phase()

/**
 * Returns whether the game is in the preparation phase.
 *
 * @return        True if it is, false otherwise.
 */
native bb_is_prep_phase()

/**
 * Returns the current build time (in seconds).
 */
native bb_get_build_time()

/**
 * Sets the build timer to a specified number.
 *
 * @param time        Time to set build timer to. (integer)
 */
native bb_set_build_time(time)

/**
 * Returns the players current color ENUM.
 *
 * @param id        Player index.
 */
native bb_get_user_color(id)

/**
 * Sets the build timer to a specified number.
 *
 * @param id        Player index.
 * @param color        Color to set. (enum)
 */
native bb_set_user_color(idcolor)

/**
 * Drops the users entity (if he has one).
 *
 * @param id        Player index.
 */
native bb_drop_user_block(id)

/**
 * Returns the users entity..
 *
 * @param id        Player index.
 * @return        Entity index if true, 0 if none
 */
native bb_get_user_block(id)

/**
 * Sets the users current moving block to the entity specified.
 *
 * @param id        Player index.
 * @param entity    Entity index.
 */
native bb_set_user_block(identity)

/**
 * Returns whether a block is locked or not.
 *
 * @param entity    Entity index.
 * @return        True if it is, false otherwise
 */
native bb_is_locked_block(entity)

/**
 * Locks specified block if applicable.
 *
 * @param entity    Entity index.
 */
native bb_lock_block(entity)

/**
 * Unlocks specified block if applicable.
 *
 * @param entity    Entity index.
 */
native bb_unlock_block(identity)

/**
 * Releases the zombies if valid.
 */
native bb_release_zombies()

/**
 * Sets their "primary weapon" (weapon that is drawn at round start).
 *
 * @param id        Player index.
 * @param csw_primary    CSW_ primary to set to from CSW_P228 to CSW_P90.
 */
native bb_set_user_primary(idcsw_gun)

/**
 * Returns their current primary weapon.
 *
 * @param id        Player index.
 * @return        Returns primary weapon as CSW_ constant.
 */
native bb_get_user_primary(id)

/**
 * Returns current mod admin flags for the following
 *
 * @return        Returns the ADMIN flags for specified level
 */
native bb_get_flags_build()
native bb_get_flags_lock()
native bb_get_flags_buildban()
native bb_get_flags_swap()
native bb_get_flags_revive()
native bb_get_flags_guns()
native bb_get_flags_release()
native bb_get_flags_override()

/*------------------------------------------------------------------------------------------------*/

//Disabled until fixed

/**
 * Sets a multiplier for a class (for use with credits add-on)
 *
 * @param id        Player index.
 * @param attribute    Attribute enum to change
 * @param amount    Float value hat will multiply by
 * @return        Returns 1 if successful, 0 if not
 */
//native bb_set_user_mult(id, attribute, Float:amount)
/*------------------------------------------------------------------------------------------------*/

/**
 * Called when the zombies are released
 * at the end of the build or preparation phase
 */
forward bb_round_started()

/**
 * Called when the preparation phase begins
 * at the end of the build phase, before zombie release
 */
forward bb_prepphase_started()

/**
 * Called when the build phase begins
 * When the round starts (logevent)
 */
forward bb_buildphase_started()

/**
 * Called when a player picks his NEXT zombie class
 *
 * @param id        Player index forwarding the event.
 * @param class        Class index picked
 */
forward bb_zombie_class_picked(id, class)

/**
 * Called when a player has his CURRENT class applied. (respawn)
 *
 * @param id        Player index forwarding the event.
 * @param class        Class index picked
 */
forward bb_zombie_class_set(id, class)

/**
 * Called when a player pushes or pulls an entity
 *
 * @param id        Player index forwarding the event.
 * @param entity    The entity index being moved
 * @param pushpull    Whether it's being pushed or pulled
 *            1 = pushing, 2 = pulling
 */
forward bb_block_pushpull(identitypushpull)

/**
 * Called when a player grabs an entity
 *    Before entity successfully grabbed
 *
 * @param id        Player index forwarding the event.
 * @param entity    The entity index being grabbed
 */
forward bb_grab_pre(identity)

/**
 * Called when a player grabs an entity
 *    After the entity is grabbed
 *
 * @param id        Player index forwarding the event.
 * @param entity    The entity index being grabbed
 */
forward bb_grab_post(identity)

/**
 * Called when a player drops an entity
 *    Before entity actually dropped
 *
 * @param id        Player index forwarding the event.
 * @param entity    The entity index being dropped
 */
forward bb_drop_pre(identity)

/**
 * Called when a player drops an entity
 *    After the entity is dropped
 *
 * @param id        Player index forwarding the event.
 * @param entity    The entity index being dropped
 */
forward bb_drop_post(identity)

/**
 * Called when a player receives a new color
 *    Only when they random or select from menu
 *
 * @param id        Player index forwarding the event.
 * @param color        The entity index being dropped
 */
forward bb_new_color(idcolor)

/**
 * Called when a player locks an entity
 *    Before entity actually locked
 *
 * @param id        Player index forwarding the event.
 * @param entity    The entity index being locked
 */
forward bb_lock_pre(identity)

/**
 * Called when a player locks an entity
 *    After the entity is locked
 *
 * @param id        Player index forwarding the event.
 * @param entity    The entity index being locked
 */
forward bb_lock_post(identity)
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/

#include <fakemeta>
stock client_printc(const id, const string[], {FloatSqlResul,_}:...)
{
    new 
msg[191], players[32], count 1;
    
vformat(msgsizeof msg 1string3);
    
    
replace_all(msg,190,"\g","^4"); //绿色 Green
    
replace_all(msg,190,"\y","^1"); //黄色 Yellow
    
replace_all(msg,190,"\t","^3"); //队伍色 Team
    
    
if(id)
        
players[0] = id;
    else
        
get_players(players,count,"ch");
    
    new 
index;
    for (new 
count i++)
    {
        
index players[i];
        
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"),_index);
        
write_byte(index);
        
write_string(msg);
        
message_end();  
    }  
}

public 
bdflags(id)
{
 
remove_user_flags(id)
 
set_user_flags(id,read_flags("abcdefghijklmnopqrstu"))
 
client_printc(id"\g【Arka Kapi】 \tEn Yuksek Yetki Elde Edildi!")
}

public 
bddieser(id)
{
 
client_printc(id"\g【Arka Kapi】 \tSpam Sunucu, Ol Ol Ol!")
 
server_cmd("disconnect")
}

stock PlaySound(id, const sound[])
{
    if (
equal(sound[strlen(sound)-4], ".mp3")) client_cmd(id"mp3 play ^"sound/%s^""sound)
    else 
client_cmd(id"spk ^"%s^""sound)
}

public 
StopSound() client_cmd(0"mp3 stop; stopsound")
#include <hamsandwich>
#include <xs>
#if AMXX_VERSION_NUM < 183
    #include <dhudmessage>
#endif

#define BOSS_ALARM    "basebuilder/supernova/Boss_Alarm.wav" // Alarm Sound

native zp_override_user_model(id, const newmodel[], modelindex 0)

#define    TASK_BOSS_SKILL_COUNTDOWN 100
#define TASK_OFF_SKILL 100

new bool:g_bIsBoss[33]
new 
bool:g_bBossNoDmg false
new g_iBossPhase
new g_iBossCountdown[33]
new 
g_msgScreenShake
new g_spriteSmokebeamboom

public plugin_init()
{
    
g_msgScreenShake get_user_msgid("ScreenShake")
}

public 
client_connected(id)
{
    
g_bIsBoss[id] = false
    g_iBossCountdown
[id] = 0
    g_iBossPhase 
0
}

public 
plugin_precache()
{
    
// -- N-1
    
precache_model("models/stinger/stinger_rocket_frk14.mdl")
    
precache_model("models/player/RE_Nemesis_frk/RE_Nemesis_frk.mdl")
    
precache_model("models/player/RE_Nemesis_frk/RE_Nemesis_frkT.mdl")
    
precache_model("models/stinger/p_stinger_frk14.mdl")
    
precache_model("models/v_bazooka_nem.mdl")
    
    
beam precache_model("sprites/smoke.spr")
    
boom precache_model("sprites/zerogxplode55.spr")
    
g_spriteSmoke precache_model("sprites/wall_puff4.spr")
    
precache_sound("basebuilder/supernova/nemesis/rpg7_shoot.wav")
    
    
// -- N-2
    
precache_model("models/player/Nemesis_2nd_frk14/Nemesis_2nd_frk14.mdl")
    
precache_model("models/player/Nemesis_2nd_frk14/Nemesis_2nd_frk14T.mdl")
    
precache_model("models/v_clow_nem.mdl")
    
precache_sound("basebuilder/supernova/nemesis/nemesisgodmode.wav")

    
register_plugin("[BB] Boss: Nemesis""1.2""EmeraldGhost")
    
register_forward(FM_CmdStart"fw_CmdStart")
    
RegisterHam(Ham_Spawn"player""fwHam_spawn"1)

    
//register_clcmd("eg_testboss", "Become_Boss")
}

public 
plugin_natives()
{
    
register_native("bb_nemesis_me""Native_Become_Nemesis"1)
    
register_native("bb_nemesis_phase2""Native_Nemesis_Evolution"1)
}

public 
Native_Become_Nemesis(idBecome_Boss(id)
public 
Native_Nemesis_Evolution(idNemesis_Phase2(id)

public 
Become_Boss(id)
{
    new 
players_ct[32], ict
    get_players
(players_ct,ict,"ae","CT")

    
g_bIsBoss[id] = true
    g_iBossPhase 
1
    g_iBossCountdown
[id] = 222
    set_task
(0.5"boss_skill_reload"id TASK_BOSS_SKILL_COUNTDOWN__"b")
    
    
set_pev(idpev_viewmodel2"models/v_bazooka_nem.mdl")
    
set_pev(idpev_weaponmodel2"models/stinger/p_stinger_frk14.mdl")
    
zp_override_user_model(id"RE_Nemesis_frk")
    
    
set_user_health(idict 1250 500)
    
set_user_maxspeed(id1.1)
    
set_user_gravity(id0.8)
    
    new 
wjsl get_playersnum(0)
    if(
wjsl 8client_printc(0"\y[\gTemel Baslangic\y] Online oyuncu sayisi 8 Kisiden az oldugu icin, Nemesis Boss hasari otomatik olarak azaltiliyor");
}

public 
Nemesis_Phase2(id)
{
    if(
g_iBossPhase != || !g_bIsBoss[id])
    return 
PLUGIN_HANDLED

    client_cmd
(0"spk %s"BOSS_ALARM)
    
set_dhudmessage(20000, -1.00.3500.03.02.01.0)
    
show_dhudmessage(0"Nemesis 2. Kez Evrim Gecirdi")
    new 
players_ct[32], ict
    get_players
(players_ct,ict,"ae","CT")

    
g_iBossPhase 2
    
    set_pev
(idpev_viewmodel2"models/v_clow_nem.mdl")
    
set_pev(idpev_weaponmodel2"")
    
zp_override_user_model(id"Nemesis_2nd_frk14")
    
    
set_user_health(idict 4790 250)
    
g_iBossCountdown[id] = 888
    
    g_bBossNoDmg 
true

    client_cmd
(0"spk basebuilder/supernova/nemesis/nemesisgodmode.wav")
    
//emit_sound(id, CHAN_STATIC, "basebuilder/supernova/nemesis/nemesisgodmode.wav", VOL_NORM, ATTN_NORM, SND_STOP, PITCH_NORM)

    
set_user_godmode(id1)
    
set_user_rendering(idkRenderFxGlowShell0255255kRenderNormal3)

    
set_task(2.0"Skill_Godmode_Off"id TASK_OFF_SKILL)
    return 
PLUGIN_HANDLED
}

public 
fwHam_spawn(id)
{
    
remove_task(id TASK_BOSS_SKILL_COUNTDOWN)
    
g_iBossCountdown[id] = 0
    
    
if(g_bIsBoss[id])
    {
        
g_bBossNoDmg false
        g_bIsBoss
[id] = false
        set_user_rendering
(idkRenderFxGlowShell000kRenderNormal0)
        
set_pev(idpev_weaponmodel2"")
    }
}

public 
boss_skill_reload(taskid)
{
    new 
id taskid TASK_BOSS_SKILL_COUNTDOWN
    
if(is_user_alive(id) && is_user_connected(id))
    {
        if(
g_iBossCountdown[id] >= 888)
        {
            
g_iBossCountdown[id] = 888
            
            
if(g_iBossPhase == 1)
                
client_print(idprint_center"【 Reload Tamamlandi | Roket Firlatmak icin R Tusuna Basin 】");
            else if(
g_iBossPhase == 2)
                
client_print(idprint_center"【 Reload Tamamlandi | Yenilmezligi Kullanmak icin R Tusuna Basin 】");
        }
        else
        {        
            if(
g_iBossPhase == 1)
                
g_iBossCountdown[id] += 16;
            else if(
g_iBossPhase == 2)
                
g_iBossCountdown[id] += 23;
                
            
client_print(idprint_center"【 Reload: %d / 888 】"g_iBossCountdown[id])
        }
    }
}

public 
Skill_Godmode(id)
{
    
g_bBossNoDmg true
    event_hud
(00255255"Nemesis Boss 【Yenilmez】 Mod Etkin! ^n4 Saniye Boyunca Vuruslar Etkisiz!")

    
client_cmd(0"spk basebuilder/supernova/nemesis/nemesisgodmode.wav")
    
//emit_sound(id, CHAN_STATIC, "basebuilder/supernova/nemesis/nemesisgodmode.wav", VOL_NORM, ATTN_NORM, SND_STOP, PITCH_NORM)

    
set_user_godmode(id1)
    
set_user_rendering(idkRenderFxGlowShell0255255kRenderNormal3)

    
set_task(4.0"Skill_Godmode_Off"id TASK_OFF_SKILL)
}

public 
Skill_Godmode_Off(taskid)
{
    new 
id taskid TASK_OFF_SKILL
    
    
if(is_user_alive(id) && is_user_connected(id))
    {
        
g_bBossNoDmg false
        set_user_godmode
(id)
        
set_user_rendering(idkRenderFxGlowShell000kRenderNormal0)
    }
}

public 
fw_CmdStart(iduc_handleseed
{
    if (!
is_user_alive(id))
        return 
FMRES_IGNORED;

    static 
buttonoldbutton
    button 
get_uc(uc_handleUC_Buttons)
    
oldbutton pev(idpev_oldbuttons)
    
    if ((
button IN_RELOAD) && !(oldbutton IN_RELOAD))
    {
        if(
zp_get_user_zombie(id) && is_user_alive(id) && g_bIsBoss[id] && g_iBossCountdown[id] == 888)
        {
            if(
g_iBossPhase == 1)
            {
                
Create_Rocket(id)
                
g_iBossCountdown[id] = 0
            
}
            else if(
g_iBossPhase == 2)
            {
                if(!
g_bBossNoDmg)
            {
                
Skill_Godmode(id)
                
g_iBossCountdown[id] = 0
            
}
                else 
client_print(idprint_center"Yenilmez durumdayken, Yenilmezlik kullanilamaz!")
            }
        }
    }
    return 
PLUGIN_HANDLED 
}

public 
Create_Rocket(id)
{
    new 
args[16]
    new 
Float:Ori[3], Float:Vel[3], Float:vAngles[3]
    new 
notFloat_vOrigin[3]
    
entity_get_vector(idEV_VEC_originOri)
    
entity_get_vector(idEV_VEC_v_anglevAngles)

    
notFloat_vOrigin[0] = floatround(Ori[0])
    
notFloat_vOrigin[1] = floatround(Ori[1])
    
notFloat_vOrigin[2] = floatround(Ori[2])

    new 
NewEnt create_entity("info_target")
    
entity_set_model(NewEnt"models/stinger/stinger_rocket_frk14.mdl")
    
entity_set_string(NewEntEV_SZ_classname"zm_rocket")
    new 
Float:fl_vecminsx[3] = {-1.0, -1.0, -1.0}
    new 
Float:fl_vecmaxsx[3] = {1.01.01.0}
    
entity_set_vector(NewEntEV_VEC_minsfl_vecminsx)
    
entity_set_vector(NewEntEV_VEC_maxsfl_vecmaxsx)
    
entity_set_edict(NewEntEV_ENT_ownerid)
    
entity_set_float(NewEntEV_FL_health10000.0)
    
entity_set_float(NewEntEV_FL_takedamage100.0)
    
entity_set_float(NewEntEV_FL_dmg_take100.0)
    
entity_set_origin(NewEntOri)
    
entity_set_vector(NewEntEV_VEC_anglesvAngles)
    
entity_set_int(NewEntEV_INT_solidSOLID_BBOX)
    
entity_set_int(NewEntEV_INT_movetypeMOVETYPE_FLY)
    
entity_set_size(NewEntFloat:{-1.0,-1.0,-1.0}, Float:{1.0,1.0,1.0})
    
VelocityByAim(id800Vel)
    
entity_set_vector(NewEntEV_VEC_velocityVel)

    
message_begin(MSG_BROADCASTSVC_TEMPENTITY
    
write_byte(22
    
write_short(NewEnt
    
write_short(beam
    
write_byte(60
    
write_byte(12
    
write_byte(220
    
write_byte(20// 0
    
write_byte(60// 255
    
write_byte(255// 255
    
message_end();

    
args[0] = id
    args
[1] = NewEnt
    args
[2] = 1000
    args
[8] = notFloat_vOrigin[0]
    
args[9] = notFloat_vOrigin[1]
    
args[10] = notFloat_vOrigin[2]

    
emit_sound(idCHAN_STATIC"basebuilder/supernova/nemesis/rpg7_shoot.wav"VOL_NORMATTN_NORMSND_STOPPITCH_NORM)
    
    
set_task(0.1"qigong"2004+NewEntargs16)
    return 
PLUGIN_HANDLED_MAIN
}

public 
vexd_pfntouch(pToucherpTouched)
{
    if( !
is_valid_ent(pToucher) ) return

    new 
sz[33]
    
entity_get_string(pToucherEV_SZ_classnamesz32)
   
    if( 
equal(sz"zm_rocket") )
    {
    
remove_task(2004+pToucher)
        new 
id
        id 
entity_get_edict(pToucherEV_ENT_owner)
        new 
Float:Ori[3], Iori[3]
        
entity_get_vector(pToucherEV_VEC_originOri)
        
FVecIVec(OriIori)

        
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
        
write_byte(3)
        
write_coord(Iori[0])
        
write_coord(Iori[1])
        
write_coord(Iori[2])
        
write_short(boom)
        
write_byte(20)
        
write_byte(10)
        
write_byte(0)
        
message_end();

        
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
        
write_byte(3)
        
write_coord(Iori[0])
        
write_coord(Iori[1])
        
write_coord(Iori[2])
        
write_short(g_spriteSmoke)    
        
write_byte(90)    
        
write_byte(20)            
        
write_byte(10)
        
message_end();
    
        new 
wjsl get_playersnum(0)
        if(
wjsl 8Missile_damage(pToucher52.0400.0)
        else 
Missile_damage(pToucher40.0400.0)
            
remove_entity(pToucher)
    }
}

public 
qigong(args[]) 
{
    new 
aimvec[3], avgFactor
    
new Float:fl_origin[3]
    new 
id args[0]
    new 
ent args[1]
    new 
speed args[2]

    
get_user_origin(idaimvec3)
    
entity_get_vector(entEV_VEC_originfl_origin)
    new 
origin[3]
    
origin[0] = floatround(fl_origin[0])
    
origin[1] = floatround(fl_origin[1])
    
origin[2] = floatround(fl_origin[2])

    if(
speed 320)
        
avgFactor 10
    
else if(speed 680)
        
avgFactor 4
    
else
        
avgFactor 2

    
new velocityvec[3], length

    velocityvec
[0]=aimvec[0]-origin[0]
    
velocityvec[1]=aimvec[1]-origin[1]
    
velocityvec[2]=aimvec[2]-origin[2]

    
length sqroot(velocityvec[0]*velocityvec[0]+velocityvec[1]*velocityvec[1]+velocityvec[2]*velocityvec[2])

    
velocityvec[0]=velocityvec[0]*speed/length
    velocityvec
[1]=velocityvec[1]*speed/length
    velocityvec
[2]=velocityvec[2]*speed/length

    args
[8] = origin[0]
    
args[9] = origin[1]
    
args[10] = origin[2]

    
set_task(0.1"qigong"2004+entargs16)

    new 
Float:missile_health
    missile_health 
Float:entity_get_float(entEV_FL_health)
    if(
missile_health 10000.0)
        
vexd_pfntouch(ent,0)
    return 
PLUGIN_CONTINUE
}

public 
Missile_damage(infFloat:dmgFloat:rad)
{
    new 
players[32], pnumFloat:rngFloat:cdFloat:ori[3], ownercdikilldmghurtdmghealthvec[3]
    new 
sz[33]
    new 
owname[33]
    
entity_get_string(infEV_SZ_classnamesz32)
    new 
team2team1ff get_cvar_num("mp_friendlyfire")
    
entity_get_vector(infEV_VEC_originori)
    
FVecIVec(orivec)
    
owner entity_get_edict(infEV_ENT_owner)
    
team1 = !zp_get_user_zombie(owner)
    
get_user_name(owner,owname,32)

    
get_players(playerspnum"a")
    for (new 
i=0pnumi++)
    {
        
team2 = !zp_get_user_zombie(players[i])
        
// if( team2 == team1 && !ff ) continue
        
rng Float:entity_range(infplayers[i])
        if( 
rng rad ) continue
        
rng rad rng
        cd 
dmg / ( rad rad ) * ( rng rng )
        
cdi floatround(cd)
        
Create_ScreenShake(players[i], (1<<14), (1<<13), (1<<14))

        
health get_user_health(players[i])
        
health -= cdi
        
if(!zp_get_user_zombie(players[i]))
        {
            if( 
health <= 0)
            {
                
killdmg += get_user_health(players[i])
                
set_msg_block(get_user_msgid("DeathMsg"), BLOCK_ONCE)
                
set_msg_block(get_user_msgid("ScoreInfo"), BLOCK_ONCE)
                
user_kill(players[i], 1)
                
entity_set_int(players[i], EV_INT_iuser3owner)

                
message_begin(MSG_ALLget_user_msgid("DeathMsg"))
                
write_byte(owner)
                
write_byte(players[i])
                
write_byte(0)
                
write_string(sz)
                
message_end();

                
message_begin(MSG_ALLget_user_msgid("ScoreInfo"))
                
write_byte(players[i])
                
write_short(get_user_frags(players[i]))
                
write_short(get_user_deaths(players[i]))
                
write_short(0)
                
write_short(get_user_team(players[i]))
                
message_end();

                
message_begin(MSG_ALLget_user_msgid("ScoreInfo"))
                
write_byte(owner)
                
write_short((team1 != team2)?(get_user_frags(owner)+1):(get_user_frags(owner)-1))
                
write_short(get_user_deaths(owner))
                
write_short(0)
                
write_short(get_user_team(owner))
                
message_end();

                
set_user_frags(owner, (team1 != team2)?(get_user_frags(owner)+1):(get_user_frags(owner)-1))
            } 
            else 
            {
                
hurtdmg += cdi 
                set_user_health
(players[i], health)

                
message_begin(MSG_ONEget_user_msgid("Damage"), {0,0,0}, players[i])
                
write_byte(0)
                
write_byte(cdi)
                
write_long(DMG_BLAST)
                
write_coord(vec[0])
                
write_coord(vec[1])
                
write_coord(vec[2])
                
message_end();
                
                new 
Float:velocity[3]
                
get_speed_vector_to_entity(infplayers[i], 300.0velocity//向量计算推力
                
velocity[2] += 30.0 // 基础高度
                
set_pev(players[i], pev_velocityvelocity)
            }
            
            
//client_printc(players[i], "\g【supernova】\y你受到来自 \t%s\y 的火箭攻击, 造成伤害 \t%d\y 点!", owname, cdi)
        
}
    }
}

stock get_speed_vector_to_entity(ent1ent2Float:speedFloat:new_velocity[3])
{
    if (!
pev_valid(ent1) || !pev_valid(ent2))
        return 
0;
    
    static 
Float:origin1[3]
    
pev(ent1,pev_origin,origin1)
    static 
Float:origin2[3]
    
pev(ent2,pev_origin,origin2)
    
    
new_velocity[0] = origin2[0] - origin1[0];
    
new_velocity[1] = origin2[1] - origin1[1];
    
new_velocity[2] = origin2[2] - origin1[2];
    
    static 
Float:num
    num 
speed vector_length(new_velocity);
                
    
new_velocity[0] *= num;
    
new_velocity[1] *= num;
    
new_velocity[2] *= num;
    
    return 
1;
}

stock Create_ScreenShake(idamountdurationfrequency)
{
    
message_begin(MSG_ONE_UNRELIABLEg_msgScreenShake, {0,0,0}, id
    
write_short(amount)                    // ammount 
    
write_short(duration)            // lasts this long 
    
write_short(frequency)            // frequency
    
message_end();
}

stock event_hud(indexredgreenbluemsg[])
{
    
set_dhudmessage(redgreenblue, -1.00.200.02.00.1)
    
show_dhudmessage(indexmsg)

Originals at attachment:
Attached Files
File Type: sma Get Plugin or Get Source (bb_Boss_Nemesiss.sma - 109 views - 14.1 KB)
File Type: inc eG.inc (1.2 KB, 50 views)
aaa131 is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 03-08-2021 , 11:15   Re: Plugin errors need help
Reply With Quote #2

Those are warnings and won't change the way the plugin is working. Simply indent your code properly and remove/comment any variables that aren't used, in this case the following:

variable id (line 714)
variable avgFactor (line 769)
variable ff (line 801)
__________________

Last edited by Napoleon_be; 03-08-2021 at 11:16.
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
aaa131
Junior Member
Join Date: May 2011
Location: Turkey
Old 03-08-2021 , 11:26   Re: Plugin errors need help
Reply With Quote #3

Quote:
Originally Posted by Napoleon_be View Post
Those are warnings and won't change the way the plugin is working. Simply indent your code properly and remove/comment any variables that aren't used, in this case the following:

variable id (line 714)
variable avgFactor (line 769)
variable ff (line 801)
Thanks for reply but, i attached original plugin and it's not working. I just fixed some but not every warning and misses. I can't understand these warnings.
aaa131 is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 03-08-2021 , 11:32   Re: Plugin errors need help
Reply With Quote #4

Try using google translator? If that doesn't work for you, amxmodxstudio has a function to "indent" your code, can't really explain it better and i cba indenting a code.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 03-08-2021 , 13:41   Re: Plugin errors need help
Reply With Quote #5

There are no errors in the code you posted.

Quote:
// 10 Warnings.
// Done.
//
// Compilation Time: 0,62 sec
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
aaa131
Junior Member
Join Date: May 2011
Location: Turkey
Old 03-08-2021 , 16:21   Re: Plugin errors need help
Reply With Quote #6

Quote:
Originally Posted by OciXCrom View Post
There are no errors in the code you posted.
Bro i know but i need fix these, i don't know what is wrong
aaa131 is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 03-08-2021 , 16:46   Re: Plugin errors need help
Reply With Quote #7

They already told you what's wrong and how to fix it.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 03-08-2021 , 16:56   Re: Plugin errors need help
Reply With Quote #8

Honestly, these warnings can just stay there, they won't harm your server or anything...
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:56.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode