Raised This Month: $ Target: $400
 0% 

Subplugin Submission [ZP] Class : Noclip Zombie || Updated v1.2.8 [26/06/2009]


Post New Thread Reply   
 
Thread Tools Display Modes
Fry!
Veteran Member
Join Date: Apr 2008
Location: Latvia
Old 06-27-2009 , 15:34   Re: [ZP] Class : Noclip Zombie || Updated v1.2.8 [26/06/2009]
Reply With Quote #51

w00ps... I'm sorry I actually forget abut you... Please wait.
__________________
Quote:
Originally Posted by wisam187
why all the great scriptors..... always.... leave and let their works go into oblivion ???
i miss your way in making outstanding plugins...
this forum needs lots of the likes of you..... and less of the idiots that spread right now.
Fry! is offline
Fry!
Veteran Member
Join Date: Apr 2008
Location: Latvia
Old 06-27-2009 , 16:14   Re: [ZP] Class : Noclip Zombie || Updated v1.2.8 [26/06/2009]
Reply With Quote #52

Here try it. You don't need to bind anything you already will have noclip. But IF you want to walk again you will need to use bind again.

PHP Code:
/*
                [ZP] Class : Noclip Zombie
                 ( Powerful zombie class )
                       by Fry!


    Description :

            Another zombie class is made, but this zombie can walk through walls every time you want.
            How to use noclip? It's easy just bind [key] +noclip. There is small amount of time given to you before noclip will end, however you will lose hp like (50 hp in 1 second), 
            but this negative ability is limited. This means that while using noclip you will lose your health but maximum hp what will be wasted 750 hp and after loosing 750 hp this "negative" ability won't work on you anymore.
            Example if you have 1500 health and nobody is shooting at you and you start to use noclip about in 15 seconds you will lose 1500 - 750(lost health) = 750(remaining health). But these numbers you can easy change by cvars.

            Note :

                If You want to use this zombie class for admins only just uncomment //#define FOR_ADMINS
                Class only available for flag A admins.

    
    Cvars :

            zp_noclip_cooldown         "10.0"     - How long cooldown you will need to wait to use it again.
            zp_noclip_long             "15.0"    - How long you can use noclip before cooldown.
            zp_noclip_start_lose_hp        "1.0"    - After how much seconds you will start to lose hp.
            zp_noclip_lost_hp        "50"    - How much hp you will lose, in 1 second.
            zp_noclip_max_lost_hp        "750"    - Zombie will lose maximum health while using noclip from his total health.

            
    Credits :

            GHW_Chronic - for his Toggleable Noclip plugin


    Changelog :

            09/11/2008 - v1.0 - First release 
            09/11/2008 - v1.0.1 - added command to turn noclip off.
            09/11/2008 - v1.2 - fixed that noclip was working without pressing binded key, added cooldown, added how long you can walk through walls.
            01/01/2009 - v1.2.4 - removed fun module, added cvar, corrected code, added possibility if class want to use admins only.
            26/06/2009 - v1.2.8 - addded negative ability for noclip zombie when you will use noclip to long you will start to lose hp, added max lost hp (with cvar) cleaned code, optimized code.
*/

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <zombieplague>

#define PLUGIN "[ZP] Class : Noclip Zombie"
#define VERSION "1.2.8"
#define AUTHOR "Fry!"

//#define FOR_ADMINS

#if defined FOR_ADMINS
    #define ADMINACCESS ADMIN_LEVEL_A
#endif

new const zclass_name[] = { "Noclip Zombie" }
new const 
zclass_info[] = { "HP-- Speed+++ Knockback++" }
new const 
zclass_model[] = { "zombie_source" }
new const 
zclass_clawmodel[] = { "v_knife_zombie.mdl" }
const 
zclass_health 1500
const zclass_speed 270
const Float:zclass_gravity 1.0
const Float:zclass_knockback 1.50

new g_zclass_noclipg_noclip_start_lose_hpg_noclip_lost_hpg_noclip_cooldowng_noclip_longg_noclip_max_lost_hp
new Float:g_noclip_time[33]
new 
bool:g_hasNoclip[33]

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_cvar("zp_zclass_noclip_zombie",VERSION,FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_UNLOGGED|FCVAR_SPONLY)
    
    
g_noclip_cooldown register_cvar("zp_noclip_cooldown""10.0")
    
g_noclip_long register_cvar("zp_noclip_long""15.0")
    
g_noclip_start_lose_hp register_cvar("zp_noclip_start_lose_hp""1.0")
    
g_noclip_lost_hp register_cvar("zp_noclip_lost_hp""50")
    
g_noclip_max_lost_hp register_cvar("zp_noclip_max_lost_hp""750")
    
    
register_concmd("+noclip","cmd_noclip"ADMIN_USER"bind [key] +noclip")
    
    
register_clcmd("-noclip","cmd_off")
}

public 
plugin_precache() 
{
    
g_zclass_noclip zp_register_zombie_class(zclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockback)
}

public 
zp_user_infected_post(playerinfector)
{
    if (
zp_get_user_zombie_class(player) == g_zclass_noclip)
    {
        if (
cmd_noclip(player))
        {
            
lose_hp(player)
        }
        
        
g_hasNoclip[player] = true
        g_noclip_time
[player] = get_gametime()
        
client_print(playerprint_chat"[ZP] To use noclip (bind [key] +noclip)")    
    }
}

public 
cmd_noclip(id)
{
    if (!
is_user_alive(id) || !zp_get_user_zombie(id))
        return 
PLUGIN_HANDLED
        
    
if (zp_get_user_zombie_class(id) != g_zclass_noclip)
        return 
PLUGIN_CONTINUE
    
    
#if defined FOR_ADMINS
        
if (!( get_user_flags(id) & ADMINACCESS))
        {
            
client_print(idprint_chat"[ZP] Sorry, Noclip Zombie is only for admins available.")
            return 
PLUGIN_CONTINUE
        
}
    
#endif
    
    
g_hasNoclip[id] = true
    fm_set_user_noclip
(id1)
    
g_noclip_time[id] = get_gametime()
    
    
set_task(get_pcvar_float(g_noclip_start_lose_hp), "lose_hp"id)
    
    if (
get_gametime() - g_noclip_time[id] < get_pcvar_float(g_noclip_cooldown))
        return 
PLUGIN_HANDLED
    
    
return PLUGIN_CONTINUE
}

public 
cmd_off(id)
{
    if (!
is_user_alive(id) || !zp_get_user_zombie(id))
        return 
PLUGIN_HANDLED
        
    
if (zp_get_user_zombie_class(id) != g_zclass_noclip)
        return 
PLUGIN_CONTINUE
    
    
#if defined FOR_ADMINS
        
if (!( get_user_flags(id) & ADMINACCESS) )
        {
            
client_print(idprint_chat"[ZP] Sorry, Noclip Zombie is only for admins available.")
            return 
PLUGIN_CONTINUE
        
}
    
#endif
    
    
fm_set_user_noclip(id0)
    
set_task(get_pcvar_float(g_noclip_long), "cmd_off"id)
    
    if (
get_gametime() - g_noclip_time[id] < get_pcvar_float(g_noclip_cooldown))
        return 
PLUGIN_HANDLED
    
    
return PLUGIN_CONTINUE
}

public 
lose_hp(id)
{
    new 
lost_hp get_user_health(id)
    new 
max_hp zp_get_zombie_maxhealth(id) - lost_hp

    
if (max_hp <= get_pcvar_num(g_noclip_lost_hp))
    {
        
set_pev(idpev_healthlost_hp float(max_hp))
    }
    
    if (
max_hp == get_pcvar_float(g_noclip_max_lost_hp))
    {
        
remove_task(id)
        return 
PLUGIN_CONTINUE
    
}
    
    if (
cmd_noclip(id))
    {
        
set_pev(idpev_healthlost_hp get_pcvar_float(g_noclip_lost_hp))
    }
    
    if (
cmd_off(id))
    {
        
remove_task(id)
    }
    return 
PLUGIN_HANDLED
}

stock fm_set_user_noclip(indexnoclip 0
{
    
set_pev(indexpev_movetypenoclip == MOVETYPE_NOCLIP MOVETYPE_WALK)

    return 
1

__________________
Quote:
Originally Posted by wisam187
why all the great scriptors..... always.... leave and let their works go into oblivion ???
i miss your way in making outstanding plugins...
this forum needs lots of the likes of you..... and less of the idiots that spread right now.
Fry! is offline
Old 06-27-2009, 19:12
tempito
This message has been deleted by tempito. Reason: ...
tempito
Senior Member
Join Date: Feb 2009
Location: Peru
Old 06-27-2009 , 19:15   Re: [ZP] Class : Noclip Zombie || Updated v1.2.8 [26/06/2009]
Reply With Quote #53

thnx, I will try this now
__________________
My very first zp server movie.
http://www.youtube.com/watch?v=yvTmlFr_Y-4 <- now with translation in english

tempito is offline
DarkAlucard87
Member
Join Date: Feb 2009
Old 06-29-2009 , 20:21   Re: [ZP] Class : Noclip Zombie || Updated v1.2.8 [26/06/2009]
Reply With Quote #54

I got some(!) Problems,
- Using time isnt correct (first it uses more time, than less than one sec (i think i dont messed it )
- cooldown isnt correct (its about 1 sec or just works everytime i use "noclip"-button)
- it counts minus health (and dont kill)
- if u stuck in wall it dont kills the zombie
- my amxx.cfg:
Code:
zp_noclip_cooldown "30.0" // How long cooldown you will need to wait to use it again.
zp_noclip_long "1.0" // How long you can use noclip before cooldown.
zp_noclip_start_lose_hp "1.0" // After how much seconds you will start to lose hp.
zp_noclip_lost_hp "1000" // How much hp you will lose, in 1 second.
zp_noclip_max_lost_hp "9999" // Zombie will lose maximum health while using noclip from his total
The IMPORTANT things are killing when stuck and timer, the "minus" health isnt that important, i can set it lower than max hp of the zombie.

Last edited by DarkAlucard87; 06-29-2009 at 20:24.
DarkAlucard87 is offline
Fry!
Veteran Member
Join Date: Apr 2008
Location: Latvia
Old 06-30-2009 , 01:22   Re: [ZP] Class : Noclip Zombie || Updated v1.2.8 [26/06/2009]
Reply With Quote #55

Thanks for telling, yea I thought that something was working wrong that was a time. But about 'negative' health ( I didn't even knew that could happen ) but then again I didn't set it to kill it... um, maybe this 'max_lost_hp' was a bad idea.

OK... I will think something to fix it or change it... ( you can suggest too )
__________________
Quote:
Originally Posted by wisam187
why all the great scriptors..... always.... leave and let their works go into oblivion ???
i miss your way in making outstanding plugins...
this forum needs lots of the likes of you..... and less of the idiots that spread right now.

Last edited by Fry!; 06-30-2009 at 01:24.
Fry! is offline
DarkAlucard87
Member
Join Date: Feb 2009
Old 06-30-2009 , 07:57   Re: [ZP] Class : Noclip Zombie || Updated v1.2.8 [26/06/2009]
Reply With Quote #56

Im Bad im AMX-Coding and have just a good and full Server where i cant do much experiments but ill look for it
DarkAlucard87 is offline
gladius
Veteran Member
Join Date: Jul 2008
Location: Santiago, Chile
Old 07-16-2009 , 16:32   Re: [ZP] Class : Noclip Zombie || Updated v1.2.8 [26/06/2009]
Reply With Quote #57

Fry, if I create a command to set the minimum health to use noclip, can you tell me if this right?

PHP Code:
new g_noclip_min_hp

public plugin_init() {

/*....code....
....code....*/

g_noclip_min_hp register_cvar("zp_noclip_min_hp""201")

}

public 
lose_hp(id) {

/*....code....
....code....*/

     
if (zclass4_health <= get_pcvar_num(g_noclip_min_hp))
    {
        
remove_task(id)
        
client_print(idprint_chat"[ZP] you can't use Noclip or death")
    }

/*....code....
....code....*/ 
gladius is offline
Send a message via MSN to gladius Send a message via Skype™ to gladius
Fry!
Veteran Member
Join Date: Apr 2008
Location: Latvia
Old 07-16-2009 , 16:39   Re: [ZP] Class : Noclip Zombie || Updated v1.2.8 [26/06/2009]
Reply With Quote #58

Did you checked newest version?
__________________
Quote:
Originally Posted by wisam187
why all the great scriptors..... always.... leave and let their works go into oblivion ???
i miss your way in making outstanding plugins...
this forum needs lots of the likes of you..... and less of the idiots that spread right now.
Fry! is offline
DangerSpirit
Member
Join Date: Nov 2009
Location: Slovakia
Old 11-11-2009 , 11:54   Re: [ZP] Class : Noclip Zombie || Updated v1.2.8 [26/06/2009]
Reply With Quote #59

This Zombie has a pass through walls but I do not work as I set?
DangerSpirit is offline
Ciio
Veteran Member
Join Date: Oct 2009
Location: Arica, Chile
Old 11-12-2009 , 18:57   Re: [ZP] Class : Noclip Zombie || Updated v1.2.8 [26/06/2009]
Reply With Quote #60

I do not like ... is most unfair as humans
__________________
Ciio is offline
Send a message via MSN to Ciio
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 08:39.


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