Raised This Month: $ Target: $400
 0% 

[ZP] Zombie Class: Werewolf Zombie & Extra item: Silver Bullets v1.1


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xLeoNNN
Veteran Member
Join Date: Sep 2010
Location: de_dust2
Old 02-27-2011 , 11:02   Re: [ZP] Zombie Class: Werewolf Zombie & Extra item: Silver Bullets v1.0
Reply With Quote #1

Limit of that?
xLeoNNN is offline
Send a message via MSN to xLeoNNN
kbalor
BANNED
Join Date: Mar 2011
Location: Philippines
Old 03-24-2011 , 14:07   Re: [ZP] Zombie Class: Werewolf Zombie & Extra item: Silver Bullets v1.1
Reply With Quote #2

Problem here.

Whenever I play zombie plague with bots. when they are turning to werewolf class and I shoot them also with other bots, they still damaged with normal bullets. But when im the werewolf and bots shoot me no effect at all i just bumb to the wall.

Any suggestions?
kbalor is offline
Send a message via Yahoo to kbalor
krst
New Member
Join Date: May 2011
Old 05-07-2011 , 01:08   Re: [ZP] Zombie Class: Werewolf Zombie & Extra item: Silver Bullets v1.1
Reply With Quote #3

hi.
my problem =>

L 05/06/2011 - 20:51:21: [AMXX] Run time error 10 (plugin "zp_zclass_werewolf.amxx") (native "get_user_weapon") - debug not enabled!
L 05/06/2011 - 20:51:21: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 05/06/2011 - 20:51:54: Invalid player id 0

Why I get this error.
krst is offline
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 05-07-2011 , 04:43   Re: [ZP] Zombie Class: Werewolf Zombie & Extra item: Silver Bullets v1.1
Reply With Quote #4

Quote:
Originally Posted by krst View Post
hi.
my problem =>

L 05/06/2011 - 20:51:21: [AMXX] Run time error 10 (plugin "zp_zclass_werewolf.amxx") (native "get_user_weapon") - debug not enabled!
L 05/06/2011 - 20:51:21: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 05/06/2011 - 20:51:54: Invalid player id 0

Why I get this error.
there's probably a
PHP Code:
get_user_weapon(0
try replacing it with
PHP Code:
get_user_weapon(id
sorry but i'm too lazy to look in the code
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
5c0r-|3i0
Veteran Member
Join Date: Nov 2008
Location: Việt Nam
Old 02-28-2011 , 06:27   Re: [ZP] Zombie Class: Werewolf Zombie & Extra item: Silver Bullets v1.0
Reply With Quote #5

@xLeoNNN: He means limit the number of Zombies with WereWolf class , if more than cvar_limit, then set player to default zombie classes
5c0r-|3i0 is offline
darkbad945
Senior Member
Join Date: May 2008
Old 02-28-2011 , 09:16   Re: [ZP] Zombie Class: Werewolf Zombie & Extra item: Silver Bullets v1.0
Reply With Quote #6

Wouldnt it be easyer 4 ex. the silvers bullets are given to a random player "how many players by cvar" and when a player with silver bulets dies the silver bullets go to another player "HUMAN" so that way is a bit more realistic and dont have to buy it every round.
darkbad945 is offline
Se7ven
Senior Member
Join Date: Feb 2011
Location: Romania
Old 03-01-2011 , 09:30   Re: [ZP] Zombie Class: Werewolf Zombie & Extra item: Silver Bullets v1.0
Reply With Quote #7

It's not to hard to human to kill werewolf zombie?
Anyway very well done
__________________
WwW.HighCS.Ro From Romania For You
Se7ven is offline
Send a message via AIM to Se7ven Send a message via Yahoo to Se7ven
artos
Senior Member
Join Date: Mar 2010
Old 03-02-2011 , 16:41   Re: [ZP] Zombie Class: Werewolf Zombie & Extra item: Silver Bullets v1.0
Reply With Quote #8

I think it's too powerfull class so i edited it. If human doesn't have Silver Bullets he's doing only 50% of normal damage to werewolf (Edited by cvar)

Code:
zp_werewolf_damage 0.5      //50% of normal damage
PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <zombieplague>
#include <fakemeta>
/*             WereWolf Zombie
                by x[L]eoNNN
    
    #Description :
    
        this is a Zombie Class of Famous Game, "L4d" with the ability to throw rocks at enemies,
        either killing him, infecting taking life, etc. (controlled by a cvar)
        
        this is a Zombie Class that is Werewolf, alone which can be killed by silver bullets
        that are bought extra item
    
    #Cvars :
    
        zp_sb_oneround 1 // one round bullets
        zp_silver_bullets 30 // silver bullets
        zp_werewolf_killreward_enable 1 // 1 = enable ammo packs reward / 0 = disable
        zp_werewolf_killreward  4 // ammo packs reward for kill a werewolf
        zp_sb_effect 1 // silver bullets effect
        zp_werewolf_howling 1 // enable werewolf howling
        zp_werewolf_howling_time 5.0 // werewolf howling time
        zp_werewolf_howling_dontmove 1 // dont move in howling

    #Changelog :
    
        v1.0: public release

*/
new const zclass_name[] = { "WereWolf" // name
new const zclass_info[] = { "Only it can be killed by silver bullets" // description
new const zclass_model[] = { "zm_werewolf" // model
new const zclass_clawmodel[] = { "v_werewolf.mdl" // claw model
const zclass_health 800 // health
const zclass_speed 200 // speed
const Float:zclass_gravity 1.0 // gravity
const Float:zclass_knockback 0.6 // knockback

new const howling_sounds[][] = { "zm_werewolf/werewolf1.wav""zm_werewolf/werewolf2.wav" }
new const 
silver_bullets_sprite[] = "sprites/dot.spr" // silver bullets sprite

new cvar_oneroundcvar_sbcvar_rewardenablecvar_rewardcvar_sb_effectcvar_howlingcvar_dontmove,
cvar_howlingtimecvar_lasthowlingcvar_damage

new g_SBItemIDg_SBSprg_werewolf
new boolg_PlayerHaveSB[33], g_SilverBullets[33]
new 
Float:g_last_howling[33]
            
public 
plugin_init()
{
    
register_plugin("[ZP] Zombie Class: Werewolf Zombie""1.0""xLeoNNN"
    
register_event("CurWeapon""event_CurWeapon""be""1=1""3>0")
    
    
RegisterHam(Ham_Spawn"player""fw_PlayerSpawn_Post"1)
    
RegisterHam(Ham_Killed"player""fw_PlayerKilled")
    
RegisterHam(Ham_TakeDamage"player""fw_TakeDamage")
     
    
register_forward(FM_CmdStart"CmdStart" )
    
    
g_SBItemID zp_register_extra_item("Buy Silver Bullets"15ZP_TEAM_HUMAN)
    
    
cvar_oneround register_cvar("zp_sb_oneround""1")
    
cvar_sb register_cvar("zp_silver_bullets""30")
    
cvar_rewardenable register_cvar("zp_werewolf_killreward_enable""1")
    
cvar_reward register_cvar("zp_werewolf_killreward""4")
    
cvar_sb_effect register_cvar("zp_sb_effect""1")
    
cvar_howling register_cvar("zp_werewolf_howling""1")
    
cvar_howlingtime register_cvar("zp_werewolf_howling_time""5.0")
    
cvar_dontmove register_cvar("zp_werewolf_howling_dontmove""1")
    
cvar_lasthowling register_cvar"zp_werewolf_last_howling_time""20.0" )
    
cvar_damage register_cvar("zp_werewolf_damage","0.5")
}

public 
plugin_precache()
{
    
g_werewolf zp_register_zombie_class(zclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockback
    
g_SBSpr precache_model(silver_bullets_sprite)
    static 
i
    
for(0sizeof howling_soundsi++)
        
precache_sound(howling_sounds[i])
}


public 
zp_user_infected_post idinfector )
{
    if (
zp_get_user_zombie_class(id) == g_werewolf)
    {
        
print_chatColor(id"\g[ZP]\n You have choosen \gWereWolf\n, only you can be killed by silver bullets!!"
    }
    
g_PlayerHaveSB[id] = false
    g_SilverBullets
[id] = false
}  

public 
zp_user_humanized_post(id)
{
    
g_PlayerHaveSB[id] = false
    g_SilverBullets
[id] = false
}

public 
zp_extra_item_selected(iditemid)
{
    if (
itemid == g_SBItemID)
    {
        
print_chatColor(id"\g[ZP]\n You have bought silver bullets, now you can kill a \gwerewolf\n!!!")
        
g_PlayerHaveSB[id] = true
        g_SilverBullets
[id] = get_pcvar_num(cvar_sb)
    }
}

public 
fw_PlayerKilled(victimattackershouldgib)
{
    
g_PlayerHaveSB[victim] = false
    g_SilverBullets
[victim] = false
    
    
if(g_PlayerHaveSB[attacker] && zp_get_user_zombie_class(victim) == g_werewolf)
    {
        if(
get_pcvar_num(cvar_rewardenable))
        {
            
print_chatColor(attacker"\g[ZP]\n You Receive \t%d\n Ammo Packs To Kill a WereWolf!"get_pcvar_num(cvar_reward))
            
zp_set_user_ammo_packs(attackerzp_get_user_ammo_packs(attacker) + get_pcvar_num(cvar_reward))
        }
    }    
}

public 
client_connect(id)
{
    
g_PlayerHaveSB[id] = false
    g_SilverBullets
[id] = false
}

public 
client_disconnect(id)
{
    
g_PlayerHaveSB[id] = false
    g_SilverBullets
[id] = false
}

public 
fw_PlayerSpawn_Post(id)
{
    if (!
is_user_alive(id))
        return;
    
    if(
get_pcvar_num(cvar_oneround))
    {
        
g_PlayerHaveSB[id] = false
        g_SilverBullets
[id] = false
    
}
}

public 
fw_TakeDamage(victiminflictorattackerFloat:damagedamage_type)
{
    if(!
g_PlayerHaveSB[attacker] && zp_get_user_zombie_class(victim) == g_werewolf)
    {
        new 
Floatdmg;
        
        
dmg get_pcvar_float(cvar_damage)
        
        
SetHamParamFloat(4damage*dmg)
        return 
HAM_SUPERCEDE
    
}
    else
        if(
get_user_weapon(attacker) == CSW_KNIFE)
            if(
zp_get_user_zombie_class(victim) == g_werewolf)
                return 
HAM_SUPERCEDE
        
    
return HAM_IGNORED
}

public 
CmdStart( const id, const uc_handlerandom_seed )
{
    if(!
is_user_alive(id))
        return 
FMRES_IGNORED;
    
    if(!
zp_get_user_zombie(id) || zp_get_user_nemesis(id))
        return 
FMRES_IGNORED;
        
    new 
button pev(idpev_button)
    new 
oldbutton pev(idpev_oldbuttons)
    
    if (
zp_get_user_zombie(id) && zp_get_user_zombie_class(id) == g_werewolf)
    {
        if(
oldbutton IN_RELOAD && !(button IN_RELOAD))
        {
            if( 
get_gametime() - g_last_howling[id] < get_pcvar_float(cvar_lasthowling))
            {
                
print_chatColor(id"\g[ZP]\n You need to wait for %.f0 seconds to howling again!"get_pcvar_float(cvar_lasthowling) - (get_gametime() - g_last_howling[id]))
                return 
PLUGIN_HANDLED
            
}
            
            
g_last_howling[id] = get_gametime()
    
            if(
get_pcvar_num(cvar_howling))
            {
                
emit_sound(idCHAN_STREAMhowling_sounds[random_num(0sizeof howling_sounds 1)], 1.0ATTN_NORM0PITCH_HIGH )
                if(
get_pcvar_num(cvar_dontmove))
                {
                    
set_pev(id pev_velocity , { 0.0 0.0 0.0 } )
                    
set_pev(idpev_flagspev(idpev_flags) | FL_FROZEN
                    
set_task(get_pcvar_float(cvar_howlingtime), "set_vel"id)
                }
            }
        }
    }
    return 
FMRES_IGNORED
}

public 
set_vel(id)
    
set_pev(id pev_flags pev(id pev_flags) & ~FL_FROZEN)
    
public 
event_CurWeapon(id)
{
    new 
buttons pev(idpev_button)
    new 
oldbuttons pev(idpev_oldbuttons)
    
    if(
buttons IN_ATTACK || oldbuttons IN_ATTACK)
    {
        if (
g_SilverBullets[id] > && g_PlayerHaveSB[id] ) 
        {
            if(
get_pcvar_num(cvar_sb_effect))
            {
                static 
Origin[3], Origin2[3]
                
get_user_origin(idOrigin1
                
get_user_origin(idOrigin24
                    
                
message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
                
write_byte (0)     
                
write_coord(Origin[0])
                
write_coord(Origin[1])
                
write_coord(Origin[2])
                
write_coord(Origin2[0])
                
write_coord(Origin2[1])
                
write_coord(Origin2[2])
                
write_short(g_SBSpr)
                
write_byte(1
                
write_byte(5
                
write_byte(2
                
write_byte(10
                
write_byte(0
                
write_byte(132)     
                
write_byte(132)       
                
write_byte(132)
                
write_byte(200
                
write_byte(150
                
message_end()
            }
            
            
g_SilverBullets[id]--
        }
    }
    if(
g_SilverBullets[id] <= 0)
    {
        
g_PlayerHaveSB[id] = false
        g_SilverBullets
[id] = 0
    
}
}


stock print_chatColor(const id,const input[], any:...)
{
    new 
msg[191], players[32], count 1;
    
vformat(msg,190,input,3);
    
replace_all(msg,190,"\g","^4");// green
    
replace_all(msg,190,"\n","^1");// normal
    
replace_all(msg,190,"\t","^3");// team
    
    
if (idplayers[0] = id; else get_players(players,count,"ch");
    for (new 
i=0;i<count;i++)
    if (
is_user_connected(players[i]))
    {
        
message_begin(MSG_ONE_UNRELIABLE,get_user_msgid("SayText"),_,players[i]);
        
write_byte(players[i]);
        
write_string(msg);
        
message_end();
    }

__________________
artos is offline
Send a message via Skype™ to artos
albert123
Veteran Member
Join Date: Mar 2009
Location: VietNam, Hai Phong
Old 03-02-2011 , 19:56   Re: [ZP] Zombie Class: Werewolf Zombie & Extra item: Silver Bullets v1.0
Reply With Quote #9

Yeah, it's good edition.
__________________
albert123 is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 03-04-2011 , 11:26   Re: [ZP] Zombie Class: Werewolf Zombie & Extra item: Silver Bullets v1.0
Reply With Quote #10

PHP Code:
public fw_TakeDamage(victiminflictorattackerFloat:damage)
{
    if(!
g_PlayerHaveSB[attacker] && zp_get_user_zombie(victim) && zp_get_user_zombie_class(victim) == g_werewolf)
    {
        
damage /= 2
        SetHamParamFloat
(4damage)
        return 
HAM_SUPERCEDE
    

Don't use client connect and client disconnect too forwards... Use just client_disconnect...
__________________
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
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 16:27.


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