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

Suggestion / Subplugin Request [Help]Plugin Allien boss


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Lucky888
Senior Member
Join Date: Nov 2011
Location: Paradise
Old 11-27-2011 , 03:07   Re: [Help]Plugin Allien boss
#11

@diasi dau cung gap chu may ngang chan,bik la pdo roi,"this fuck" la cai j vay ta,lich su ty de,do vo van hoa.
@joker:thanks my friend,so can you make for me thjs plugin.(skill for boss,nemesis)
__________________
Lucky888 is offline
Send a message via Yahoo to Lucky888
tei1995
Senior Member
Join Date: Feb 2011
Location: VietNam
Old 11-28-2011 , 17:34   Re: [Help]Plugin Allien boss
#12

Plz dont say bad word plz.this is general forum
__________________

Hatsune Miku~
tei1995 is offline
dias
BANNED
Join Date: Jul 2009
Location: South Vietnam
Old 11-30-2011 , 09:44   Re: [Help]Plugin Allien boss
#13

- Here is my NPC Zombie without bot, who's want sma ?... You can do it by yourself lucky888=))
http://www.youtube.com/watch?v=EddpfjFEei8
- Make this boss alien is very easy in that map... Just a code
dias is offline
Send a message via Yahoo to dias Send a message via Skype™ to dias
JoKeR LauGh
Veteran Member
Join Date: May 2011
Location: Malaysia
Old 11-30-2011 , 09:54   Re: [Help]Plugin Allien boss
#14

ME ;)
__________________
Quote:
Originally Posted by addons_zz View Post
Also, just to not read `the article`, read all you find. Read and read, for ever and ever. Never stop reading.
Why? Because there is not one single universal truth which holds the meaning for everything.
JoKeR LauGh is offline
dias
BANNED
Join Date: Jul 2009
Location: South Vietnam
Old 11-30-2011 , 09:57   Re: [Help]Plugin Allien boss
#15

Easy man

- Find resource by yourself...
*USAGE:
- type: /set_spawn_point | To get your origin to make zombie appear in that origin
- type: /create_zombie | Make zombie (/set_spawn_point First)

PHP Code:
#include <amxmodx>
#include <engine>
#include <fakemeta>
#include <hamsandwich>

#define ZB_CLASSNAME "npc_zombie"
#define TASK_ATTACK 323423

new const zombie_model[] = "models/player/tank_zombi_host/tank_zombi_host.mdl"
new const zombie_hurt_sound[] = "biohazard/zombie_hurt_01.wav"
new const zombie_attack_sound[] = "biohazard/zombi_attack_1.wav"
new const zombie_die_sound[] = "biohazard/zombie_death_1.wav"

enum
{
    
ANIM_IDLE 1,
    
ANIM_WALK 3,
    
ANIM_ATTACK 76,
    
ANIM_DIE 104
}

new 
Float:g_spawn_point[3], Float:g_angles[3]
new 
pev_victim pev_enemy

new ent2

public plugin_init()
{
    
register_plugin("NPC Zombie""1.0""Dias")
    
    
register_think(ZB_CLASSNAME"fw_zb_think")
    
    
register_clcmd("say /set_spawn_point""get_spawn_point")
    
register_clcmd("say /create_zombie""create_zombie")
}

public 
client_PostThink(id)
{
    
//new Float:distance = entity_range(id, ent2)
    
    //client_print(id, print_chat, "%f", distance)
}

public 
plugin_precache()
{
    
engfunc(EngFunc_PrecacheModelzombie_model)
    
    
precache_sound(zombie_hurt_sound)
    
precache_sound(zombie_attack_sound)
    
precache_sound(zombie_die_sound)
}

public 
get_spawn_point(id)
{
    
entity_get_vector(idEV_VEC_origing_spawn_point)
    
entity_get_vector(idEV_VEC_anglesg_angles)
}

public 
create_zombie(id)
{    
    new 
ent create_entity("info_target")
    
ent2 ent
    
    entity_set_origin
(entg_spawn_point)
    
    
entity_set_float(entEV_FL_takedamage,1.0)
    
entity_set_float(entEV_FL_health100.0)
    
    
entity_set_string(entEV_SZ_classnameZB_CLASSNAME)
    
entity_set_model(entzombie_model)
    
entity_set_int(entEV_INT_solid2)
    
    
entity_set_int(entEV_INT_movetypeMOVETYPE_STEP)
    
    
set_pev(entpev_victim0)
    
    
entity_set_byte(entEV_BYTE_controller1125)
    
entity_set_byte(entEV_BYTE_controller2125)
    
entity_set_byte(entEV_BYTE_controller3125)
    
entity_set_byte(entEV_BYTE_controller4125)
    
    new 
Float:maxs[3] = {16.016.036.0}
    new 
Float:mins[3] = {-16.0, -16.0, -36.0}
    
entity_set_size(entminsmaxs)
    
    
play_anim(entANIM_IDLE1.0)
    
    
entity_set_float(ent,EV_FL_nextthinkhalflife_time() + 0.01)
    
drop_to_floor(ent)
    
    
RegisterHamFromEntity(Ham_TakeDamageent"fw_zb_takedmg")
    
RegisterHamFromEntity(Ham_Killedent"fw_zb_killed")
    
    return 
1
}

public 
fw_zb_takedmg(victiminflictorattackerFloat:damagedamagebits)
{
    
emit_sound(victimCHAN_BODYzombie_hurt_sound1.0ATTN_NORM0PITCH_NORM)
}

public 
fw_zb_killed(ent2)
{
    new 
ent create_entity("info_target")
    new 
Float:Origin[3], Float:Angles[3]
    
    
pev(ent2pev_originOrigin)
    
pev(ent2pev_anglesAngles)
    
    
entity_set_origin(entOrigin)
    
entity_set_vector(entEV_VEC_anglesAngles)
    
    
entity_set_string(entEV_SZ_classname"temp_zb")
    
entity_set_model(entzombie_model)
    
    new 
Float:maxs[3] = {16.016.036.0}
    new 
Float:mins[3] = {-16.0, -16.0, -36.0}
    
entity_set_size(entminsmaxs)
    
    
drop_to_floor(ent)
    
    
play_anim(entANIM_IDLE1.0)    
    
    
play_anim(entANIM_DIE1.0)
    
emit_sound(entCHAN_BODYzombie_die_sound1.0ATTN_NORM0PITCH_NORM)
    
    
set_task(5.0"remove_temp_zb"ent)
}

public 
remove_temp_zb(ent)
{
    
remove_entity(ent)
}

public 
fw_zb_think(ent)
{
    if(!
is_valid_ent(ent))
        return 
FMRES_IGNORED
        
    
new victim FindClosesEnemy(ent)
    new 
Float:Origin[3], Float:VicOrigin[3], Float:distance
    
    pev
(entpev_originOrigin)
    
pev(victimpev_originVicOrigin)
    
    
distance get_distance_f(OriginVicOrigin)
    
    if(
distance <= 60.0)
    {
        
zombie_attack(entvictim)
        
entity_set_float(entEV_FL_nextthinkget_gametime() + 2.5)
    } else {
        
        if(
get_anim(ent) != ANIM_WALK)
            
play_anim(entANIM_WALK1.0)
            
        new 
Float:Ent_Origin[3], Float:Vic_Origin[3]
        
        
pev(entpev_originEnt_Origin)
        
pev(victimpev_originVic_Origin)
        
        
npc_turntotarget(entEnt_OriginvictimVic_Origin)
        
hook_ent(entvictim)
        
        
entity_set_float(entEV_FL_nextthinkget_gametime() + 0.1)
    }
    
    return 
FMRES_HANDLED
}

public 
zombie_attack(entvictim)
{
    new 
Float:Ent_Origin[3], Float:Vic_Origin[3]
    
    
pev(entpev_originEnt_Origin)
    
pev(victimpev_originVic_Origin)
    
    
npc_turntotarget(entEnt_OriginvictimVic_Origin)
    
    
play_anim(entANIM_ATTACK1.0)
    
ExecuteHam(Ham_TakeDamagevictim0victimrandom_float(5.010.0), DMG_BULLET)  
    
emit_sound(victimCHAN_BODYzombie_attack_sound1.0ATTN_NORM0PITCH_NORM)
    
    
remove_task(ent+TASK_ATTACK)
    
set_task(1.5"stop_attack"ent+TASK_ATTACK)
}

public 
stop_attack(ent)
{
    
ent -= TASK_ATTACK
    
    play_anim
(entANIM_IDLE1.0)
    
remove_task(ent+TASK_ATTACK)
}

public 
npc_turntotarget(entFloat:Ent_Origin[3], targetFloat:Vic_Origin[3]) 
{
    if(
target
    {
        new 
Float:newAngle[3]
        
entity_get_vector(entEV_VEC_anglesnewAngle)
        new 
Float:Vic_Origin[0] - Ent_Origin[0]
        new 
Float:Vic_Origin[1] - Ent_Origin[1]

        new 
Float:radians floatatan(z/xradian)
        
newAngle[1] = radians * (180 3.14)
        if (
Vic_Origin[0] < Ent_Origin[0])
            
newAngle[1] -= 180.0
        
        entity_set_vector
(entEV_VEC_anglesnewAngle)
    }
}

public 
hook_ent(entvictim)
{
    new 
Float:fl_Velocity[3]
    new 
Float:VicOrigin[3], Float:EntOrigin[3]

    
pev(entpev_originEntOrigin)
    
pev(victimpev_originVicOrigin)
    
    new 
Float:distance_f get_distance_f(EntOriginVicOrigin)

    if (
distance_f 60.0)
    {
        new 
Float:fl_Time distance_f 100.0

        fl_Velocity
[0] = (VicOrigin[0] - EntOrigin[0]) / fl_Time
        fl_Velocity
[1] = (VicOrigin[1] - EntOrigin[1]) / fl_Time
        fl_Velocity
[2] = (VicOrigin[2] - EntOrigin[2]) / fl_Time
    
} else
    {
        
fl_Velocity[0] = 0.0
        fl_Velocity
[1] = 0.0
        fl_Velocity
[2] = 0.0
    
}

    
entity_set_vector(entEV_VEC_velocityfl_Velocity)
}

stock bool:IsValidTarget(iTarget)
{
    if (!
iTarget || !(1<= iTarget <= get_maxplayers()) || !is_user_connected(iTarget) || !is_user_alive(iTarget))
        return 
false
    
return true
}

public 
FindClosesEnemy(entid)
{
    new 
Float:Dist
    
new Float:maxdistance=4000.0
    
new indexid=0    
    
for(new i=1;i<=get_maxplayers();i++){
        if(
is_user_alive(i) && is_valid_ent(i) && can_see_fm(entidi))
        {
            
Dist entity_range(entidi)
            if(
Dist <= maxdistance)
            {
                
maxdistance=Dist
                indexid
=i
                
                
return indexid
            
}
        }    
    }    
    return 
0
}

public 
bool:can_see_fm(entindex1entindex2)
{
    if (!
entindex1 || !entindex2)
        return 
false

    
if (pev_valid(entindex1) && pev_valid(entindex1))
    {
        new 
flags pev(entindex1pev_flags)
        if (
flags EF_NODRAW || flags FL_NOTARGET)
        {
            return 
false
        
}

        new 
Float:lookerOrig[3]
        new 
Float:targetBaseOrig[3]
        new 
Float:targetOrig[3]
        new 
Float:temp[3]

        
pev(entindex1pev_originlookerOrig)
        
pev(entindex1pev_view_ofstemp)
        
lookerOrig[0] += temp[0]
        
lookerOrig[1] += temp[1]
        
lookerOrig[2] += temp[2]

        
pev(entindex2pev_origintargetBaseOrig)
        
pev(entindex2pev_view_ofstemp)
        
targetOrig[0] = targetBaseOrig [0] + temp[0]
        
targetOrig[1] = targetBaseOrig [1] + temp[1]
        
targetOrig[2] = targetBaseOrig [2] + temp[2]

        
engfunc(EngFunc_TraceLinelookerOrigtargetOrig0entindex10//  checks the had of seen player
        
if (get_tr2(0TraceResult:TR_InOpen) && get_tr2(0TraceResult:TR_InWater))
        {
            return 
false
        

        else 
        {
            new 
Float:flFraction
            get_tr2
(0TraceResult:TR_flFractionflFraction)
            if (
flFraction == 1.0 || (get_tr2(0TraceResult:TR_pHit) == entindex2))
            {
                return 
true
            
}
            else
            {
                
targetOrig[0] = targetBaseOrig [0]
                
targetOrig[1] = targetBaseOrig [1]
                
targetOrig[2] = targetBaseOrig [2]
                
engfunc(EngFunc_TraceLinelookerOrigtargetOrig0entindex10//  checks the body of seen player
                
get_tr2(0TraceResult:TR_flFractionflFraction)
                if (
flFraction == 1.0 || (get_tr2(0TraceResult:TR_pHit) == entindex2))
                {
                    return 
true
                
}
                else
                {
                    
targetOrig[0] = targetBaseOrig [0]
                    
targetOrig[1] = targetBaseOrig [1]
                    
targetOrig[2] = targetBaseOrig [2] - 17.0
                    engfunc
(EngFunc_TraceLinelookerOrigtargetOrig0entindex10//  checks the legs of seen player
                    
get_tr2(0TraceResult:TR_flFractionflFraction)
                    if (
flFraction == 1.0 || (get_tr2(0TraceResult:TR_pHit) == entindex2))
                    {
                        return 
true
                    
}
                }
            }
        }
    }
    return 
false
}

stock get_anim(id)
{
    return 
pev(idpev_sequence)
}

stock play_anim(indexsequenceFloat:framerate 1.0)
{
    
entity_set_float(indexEV_FL_animtimeget_gametime())
    
entity_set_float(indexEV_FL_framerate,  framerate)
    
entity_set_float(indexEV_FL_frame0.0)
    
entity_set_int(indexEV_INT_sequencesequence)
}  

stock DirectedVec(Float:start[3],Float:end[3],Float:reOri[3])
{
    new 
Float:v3[3]
    
v3[0]=start[0]-end[0]
    
v3[1]=start[1]-end[1]
    
v3[2]=start[2]-end[2]
    new 
Float:vl vector_length(v3)
    
reOri[0] = v3[0] / vl
    reOri
[1] = v3[1] / vl
    reOri
[2] = v3[2] / vl

dias is offline
Send a message via Yahoo to dias Send a message via Skype™ to dias
Excalibur.007
Veteran Member
Join Date: Sep 2009
Location: Singapore
Old 11-30-2011 , 20:05   Re: [Help]Plugin Allien boss
#16

Closed by author's permission
Excalibur.007 is offline
Closed Thread



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 13:03.


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