Raised This Month: $ Target: $400
 0% 

Subplugin Submission [New Natives]ZP 4.3[v3.6] | ZPA 1.6.1[v3.6]


Post New Thread Reply   
 
Thread Tools Display Modes
sunx
Veteran Member
Join Date: Mar 2009
Location: Germany
Old 02-21-2010 , 17:06   Re: [New Natives] Zombie Plague 4.3 - v1.1 - 21/02/2010
Reply With Quote #21

Quote:
Originally Posted by meTaLiCroSS View Post
... or maybe is died o.O.
your `re macabre
__________________

sunx is offline
Excalibur.007
Veteran Member
Join Date: Sep 2009
Location: Singapore
Old 02-22-2010 , 02:38   Re: [New Natives] Zombie Plague 4.3 - v1.2 - 22/02/2010
Reply With Quote #22

@meTaLiCroSS
Yeah badly coded(zp_user_has_infect_nade(id)) You rockz!
I can never beat you in scripting. I failz

Added 2 new natives.
Thanks NiHiLaNTh

Fix zp_user_has_infect_nade working with other custom HE Grenade

Last edited by Excalibur.007; 02-22-2010 at 03:42.
Excalibur.007 is offline
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 02-22-2010 , 08:18   Re: [New Natives] Zombie Plague 4.3 - v1.1 - 21/02/2010
Reply With Quote #23

Quote:
Originally Posted by meTaLiCroSS View Post
And he told you that? Whatever, he will have his reasons, maybe he does not has internet, or maybe is died o.O.
I don't think he don't have Internet or something else....(IMHO)
__________________

NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 02-22-2010 , 08:31   Re: [New Natives] Zombie Plague 4.3 - v1.2 - 22/02/2010
Reply With Quote #24

can someone please make the frost zombie class so i can test if the natives work?
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 02-22-2010 , 08:44   Re: [New Natives] Zombie Plague 4.3 - v1.2 - 22/02/2010
Reply With Quote #25

Quote:
Originally Posted by georgik57 View Post
can someone please make the frost zombie class so i can test if the natives work?
You mean class that cannot be frozen ?
__________________

NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 02-22-2010 , 08:48   Re: [New Natives] Zombie Plague 4.3 - v1.2 - 22/02/2010
Reply With Quote #26

Quote:
Originally Posted by NiHiLaNTh View Post
You mean class that cannot be frozen ?
yep
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 02-22-2010 , 10:02   Re: [New Natives] Zombie Plague 4.3 - v1.2 - 22/02/2010
Reply With Quote #27

Something like this
Code:
#include < amxmodx >
#include < fakemeta >
#include < zombieplague >

// Zombie Attributes
new const zclass_name[] = { "Frozen Zombie" } // name
new const zclass_info[] = { "Cannot be frozen" } // description
new const zclass_model[] = { "zombie_source" } // model
new const zclass_clawmodel[] = { "v_knife_zombie.mdl" } // claw model
const zclass_health = 1800 // health
const zclass_speed = 235 // speed
const Float:zclass_gravity = 1.0 // gravity
const Float:zclass_knockback = 1.0 // knockback

// Class IDs
new g_frozenID

// Zombie Classes MUST be registered on plugin_precache
public plugin_precache()
{    
    // Register the new class and store ID for reference
    g_frozenID = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback)    
}

public plugin_init ( )
{
    register_plugin("[ZP] Frozen Zombie", "1.0", "NiHiLaNTh")
    
    register_forward ( FM_PlayerPreThink, "fw_PlayerPreThink" )
}

public zp_user_infected_post ( Player, Infector )
{
    if ( zp_get_user_zombie_class ( Player ) == g_frozenID )
    {
        client_print ( Player, print_chat, "[ZP] You cannot be frozen" )
    }
}

public fw_PlayerPreThink ( Player )
{
    if ( !is_user_alive ( Player ) || !zp_get_user_zombie ( Player ) || zp_get_user_zombie_class ( Player ) != g_frozenID )
        return
    
    if ( zp_get_user_frozen ( Player ) )
    {
        zp_set_user_frozen ( Player, 0 )
    }
}
__________________

NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
Russiaboy
BANNED
Join Date: May 2009
Location: ZombiePlague is my Home
Old 02-22-2010 , 10:08   Re: [New Natives] Zombie Plague 4.3 - v1.2 - 22/02/2010
Reply With Quote #28

Quote:
Originally Posted by NiHiLaNTh View Post
Something like this
Code:
#include < amxmodx >
#include < fakemeta >
#include < zombieplague >

// Zombie Attributes
new const zclass_name[] = { "Frozen Zombie" } // name
new const zclass_info[] = { "Cannot be frozen" } // description
new const zclass_model[] = { "zombie_source" } // model
new const zclass_clawmodel[] = { "v_knife_zombie.mdl" } // claw model
const zclass_health = 1800 // health
const zclass_speed = 235 // speed
const Float:zclass_gravity = 1.0 // gravity
const Float:zclass_knockback = 1.0 // knockback

// Class IDs
new g_frozenID

// Zombie Classes MUST be registered on plugin_precache
public plugin_precache()
{    
    // Register the new class and store ID for reference
    g_frozenID = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback)    
}

public plugin_init ( )
{
    register_plugin("[ZP] Frozen Zombie", "1.0", "NiHiLaNTh")
    
    register_forward ( FM_PlayerPreThink, "fw_PlayerPreThink" )
}

public zp_user_infected_post ( Player, Infector )
{
    if ( zp_get_user_zombie_class ( Player ) == g_frozenID )
    {
        client_print ( Player, print_chat, "[ZP] You cannot be frozen" )
    }
}

public fw_PlayerPreThink ( Player )
{
    if ( !is_user_alive ( Player ) || !zp_get_user_zombie ( Player ) || zp_get_user_zombie_class ( Player ) != g_frozenID )
        return
    
    if ( zp_get_user_frozen ( Player ) )
    {
        zp_set_user_frozen ( Player, 0 )
    }
}
Good Job NiHiLaNTh
Russiaboy is offline
Send a message via MSN to Russiaboy Send a message via Skype™ to Russiaboy
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 02-22-2010 , 10:57   Re: [New Natives] Zombie Plague 4.3 - v1.2 - 22/02/2010
Reply With Quote #29

Quote:
Originally Posted by NiHiLaNTh View Post
Something like this
yes...thank you
there is just a minor thing...it stops you a little bit
it can't be done like the nemesis immunity right?
i mean it won't stop the zombie at all
EDIT:
i'm updating my zp so i wanna be sure everything is perfect
in "native_set_user_frozen", at "set"(freeze user), haven't you forgot to add this?
PHP Code:
set_pev(idpev_velocityFloat:{0.0,0.0,0.0}) // stop motion
set_pev(idpev_maxspeed1.0// prevent from moving
return; // shouldn't leap while frozen 
i didn't test it but i really think a player that should be frozen using this native will be able to move
also i replaced "is_user_valid_alive" with "g_isalive" for the remove function, cause i wanted the code to be exactly like mercyllezz's
in the end it looks like this...tell me if anything needs corrected please
PHP Code:
// Native: zp_set_user_frozen
public native_set_user_frozen(idset)
{
    if (
set// Set = 1, froze player
    
{
        
// Player isn't alive
        
if (!is_user_valid_alive[id])
            return;
        
        
// User allready frozen
        
if (g_frozen[id])
            return;
        
        
g_frozen[id] = true
        
        
static sound[64]
        
ArrayGetString(grenade_frost_playerrandom_num(0ArraySize(grenade_frost_player) - 1), soundcharsmax(sound))
        
emit_sound(idCHAN_BODYsound1.0ATTN_NORM0PITCH_NORM)
        
        if (
get_pcvar_num(cvar_hudicons))
        {
            
message_begin(MSG_ONE_UNRELIABLEg_msgDamage_id)
            
write_byte(0// damage save
            
write_byte(0// damage take
            
write_long(DMG_DROWN// damage type - DMG_FREEZE
            
write_coord(0// x
            
write_coord(0// y
            
write_coord(0// z
            
message_end()
        }
        
        if (
g_handle_models_on_separate_ent)
            
fm_set_rendering(g_ent_playermodel[id], kRenderFxGlowShell0100200kRenderNormal25)
        else
            
fm_set_rendering(idkRenderFxGlowShell0100200kRenderNormal25)
        
        
message_begin(MSG_ONEg_msgScreenFade_id)
        
write_short(0// duration
        
write_short(0// hold time
        
write_short(FFADE_STAYOUT// fade type
        
write_byte(0// red
        
write_byte(50// green
        
write_byte(200// blue
        
write_byte(100// alpha
        
message_end()
        
        if (
pev(idpev_flags) & FL_ONGROUND)
            
set_pev(idpev_gravity999999.9// set really high
        
else
            
set_pev(idpev_gravity0.000001// no gravity
        
        
set_pev(idpev_velocityFloat:{0.0,0.0,0.0}) // stop motion
        
set_pev(idpev_maxspeed1.0// prevent from moving
        
return; // shouldn't leap while frozen
    
}
    else 
// Set = 0, unfroze player
    
{
        
// Player isn't alive
        
if (!g_isalive[id])
            return;
        
        
// User is not frozen
        
if (!g_frozen[id])
            return;
        
        
// Get Nemesis' and Humans' nvg colors info to use it later
        
new nredngreennbluehredhgreenhblue
        
        nred 
get_pcvar_num(cvar_nemnvgcolor[0])
        
ngreen get_pcvar_num(cvar_nemnvgcolor[1])
        
nblue get_pcvar_num(cvar_nemnvgcolor[2])
        
        
hred get_pcvar_num(cvar_humnvgcolor[0])
        
hgreen get_pcvar_num(cvar_humnvgcolor[1])
        
hblue get_pcvar_num(cvar_humnvgcolor[2])
        
        
g_frozen[id] = false
        
        
if (g_zombie[id])
        {
            if (
g_nemesis[id])
                
set_pev(idpev_gravityget_pcvar_float(cvar_nemgravity))
            else
                
set_pev(idpev_gravityFloat:ArrayGetCell(g_zclass_gravg_zombieclass[id]))
        }
        else
        {
            if (
g_survivor[id])
                
set_pev(idpev_gravityget_pcvar_float(cvar_survgravity))
            if (
g_sniper[id])
                
set_pev(idpev_gravityget_pcvar_float(cvar_snipergravity))
            if (!
g_survivor[id] && !g_sniper[id])
                
set_pev(idpev_gravityget_pcvar_float(cvar_humangravity))
        }
        
        
// Restore rendering
        
if (g_handle_models_on_separate_ent)
        {
            
// Nemesis, Survivor or Sniper glow / remove glow on player model entity
            
if (g_nemesis[id] && get_pcvar_num(cvar_nemglow))
                
fm_set_rendering(g_ent_playermodel[id], kRenderFxGlowShellnredngreennbluekRenderNormal25)
            else if (
g_survivor[id] && get_pcvar_num(cvar_survglow) || g_sniper[id] && get_pcvar_num(cvar_sniperglow))
                
fm_set_rendering(g_ent_playermodel[id], kRenderFxGlowShellhredhgreenhbluekRenderNormal25)
            else
                
fm_set_rendering(g_ent_playermodel[id])
        }
        else
        {
            
// Nemesis, Survivor or Sniper glow / remove glow
            
if (g_nemesis[id] && get_pcvar_num(cvar_nemglow))
                
fm_set_rendering(idkRenderFxGlowShellnredngreennbluekRenderNormal25)
            else if (
g_survivor[id] && get_pcvar_num(cvar_survglow) || g_sniper[id] && get_pcvar_num(cvar_sniperglow))
                
fm_set_rendering(idkRenderFxGlowShellhredhgreenhbluekRenderNormal25)
            else
                
fm_set_rendering(id)
        }
        
        
message_begin(MSG_ONEg_msgScreenFade_id)
        
write_short(UNIT_SECOND// duration
        
write_short(0// hold time
        
write_short(FFADE_IN// fade type
        
write_byte(0// red
        
write_byte(50// green
        
write_byte(200// blue
        
write_byte(100// alpha
        
message_end()
        
        static 
sound[64]
        
ArrayGetString(grenade_frost_breakrandom_num(0ArraySize(grenade_frost_break) - 1), soundcharsmax(sound))
        
emit_sound(idCHAN_BODYsound1.0ATTN_NORM0PITCH_NORM)
        
        static 
origin2[3]
        
get_user_origin(idorigin2)
        
        
message_begin(MSG_PVSSVC_TEMPENTITYorigin2)
        
write_byte(TE_BREAKMODEL// TE id
        
write_coord(origin2[0]) // x
        
write_coord(origin2[1]) // y
        
write_coord(origin2[2]+24// z
        
write_coord(16// size x
        
write_coord(16// size y
        
write_coord(16// size z
        
write_coord(random_num(-5050)) // velocity x
        
write_coord(random_num(-5050)) // velocity y
        
write_coord(25// velocity z
        
write_byte(10// random velocity
        
write_short(g_glassSpr// model
        
write_byte(10// count
        
write_byte(25// life
        
write_byte(BREAK_GLASS// flags
        
message_end()
        
        
ExecuteForward(g_fwUserUnfrozeng_fwDummyResultid)
    }

__________________

Last edited by georgik57; 02-22-2010 at 14:28. Reason: ASKING SOME QUESTIONS AND FOR SOME ADVICE
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
sunx
Veteran Member
Join Date: Mar 2009
Location: Germany
Old 02-22-2010 , 15:30   Re: [New Natives] Zombie Plague 4.3 - v1.2 - 22/02/2010
Reply With Quote #30

yea this is usefull
__________________

sunx is offline
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 03:21.


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