Raised This Month: $ Target: $400
 0% 

Subplugin Submission [ZP] Extra Item : Crucio Spell


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 07-29-2013 , 13:17   [ZP] Extra Item : Crucio Spell
Reply With Quote #1



.: Description :.

Crucio Spell is an Zombie Plague Mod Item which gives you a temporary shield and reflect the enemies damage.

Default Team : Humans
Default Price : 15 Ammo Packs

.: CVars :.
  • zp_cs_time (Default : 5.0) - Amount of time the shield lasts.
  • zp_cs_payback (Default : 2.0) - Factor with which the damage gets back.
  • zp_cs_r_color (Default : 255) - Red amount in shield color.
  • zp_cs_g_color (Default : 255) - Green amount in shield color.
  • zp_cs_b_color (Default : 255) - Blue amount in shield color.
Attached Files
File Type: sma Get Plugin or Get Source (zp_extra_crucio_spell.sma - 733 views - 1.9 KB)
__________________

Last edited by Kia; 07-29-2013 at 15:23.
Kia is offline
Just4Games
Senior Member
Join Date: Jan 2013
Location: Romania
Old 07-29-2013 , 14:30   Re: [ZP] Extra Item : Crucio Spell
Reply With Quote #2

This is for all versions of zombie plague or just 5.0?
Just4Games is offline
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 07-29-2013 , 14:33   Re: [ZP] Extra Item : Crucio Spell
Reply With Quote #3

I've used 5.0, don't know if it's working for older versions. I assumed that everyone uses the newest version.
__________________
Kia is offline
Just4Games
Senior Member
Join Date: Jan 2013
Location: Romania
Old 07-29-2013 , 14:34   Re: [ZP] Extra Item : Crucio Spell
Reply With Quote #4

i'm not using 5.0 ... so i can't compile it bec i don't have the include text file
Just4Games is offline
wicho
Veteran Member
Join Date: Feb 2012
Location: GuateAmala
Old 07-29-2013 , 14:41   Re: [ZP] Extra Item : Crucio Spell
Reply With Quote #5

Try this:

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <hamsandwich>
#include <zombieplague>


#define PLUGIN "[ZP] Extra : Crucio Spell"
#define VERSION "1.0.0"
#define AUTHOR "Kia"

/* Integer */

new g_iItemID

/* Boolean */

new bool:g_bIsOnCrucio[33]

/* CVars */

new cvar_timecvar_payback
new cvar_rcvar_gcvar_b

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
/* Registering Item */
    
    
g_iItemID zp_register_extra_item("Crucio Spell"15ZP_TEAM_HUMAN)
    
    
/* Hamsandwich */
    
    
RegisterHam(Ham_TakeDamage"player""func_HamTakeDamage")
    
    
/* CVars */
    
    
cvar_time     register_cvar("zp_cs_time",    "5.0")
    
cvar_payback     register_cvar("zp_cs_payback","2.0")
    
    
cvar_r        register_cvar("zp_cs_r_color","255")
    
cvar_g        register_cvar("zp_cs_g_color","255")
    
cvar_b        register_cvar("zp_cs_b_color","255")
}

public 
client_putinserver(id)
{
    
g_bIsOnCrucio[id] = false
}

public 
client_disconnect(id)
{
    
g_bIsOnCrucio[id] = false
}

public 
zp_extra_item_selected(idItemID)
{
    if(
ItemID == g_iItemID )
    {
        
g_bIsOnCrucio[id] = true
        set_task
(get_pcvar_float(cvar_time), "func_DisableCrucio"id)
        
        
set_user_rendering(id,kRenderFxGlowShell,get_pcvar_num(cvar_r),get_pcvar_num(cvar_g),get_pcvar_num(cvar_b),kRenderNormal,16
    }
}

public 
func_DisableCrucio(id)
{
    
g_bIsOnCrucio[id] = false
    set_user_rendering
(id)
}

public 
func_HamTakeDamage(victiminflictorattackerFloat:damagedamage_type)
{
    if(
inflictor == attacker && g_bIsOnCrucio[victim])
        
set_user_health(attackerfloatround(get_user_health(attacker) - damage get_pcvar_float(cvar_payback), floatround_floor))
    
    if(
inflictor == attacker && zp_get_user_zombie(attacker) && !zp_get_user_zombie(victim) && g_bIsOnCrucio[victim])
        return 
HAM_IGNORED
        
    
return PLUGIN_CONTINUE

btw nice plugin..
wicho is offline
Old 07-29-2013, 14:48
Just4Games
This message has been deleted by Just4Games.
Just4Games
Senior Member
Join Date: Jan 2013
Location: Romania
Old 07-29-2013 , 14:54   Re: [ZP] Extra Item : Crucio Spell
Reply With Quote #6

It works now! Thanks wicho! And sure thanks for Kia who made this plugin!

Sry for comment above.. but i forgot to edit it bec i use zombie VIP and forgot edit a line and it gives an error on compiling but i fixed it....

Last edited by Just4Games; 07-29-2013 at 14:54.
Just4Games is offline
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 07-29-2013 , 15:05   Re: [ZP] Extra Item : Crucio Spell
Reply With Quote #7

You're welcome. I'll add your version wicho If you don't mind.
__________________
Kia is offline
tempito
Senior Member
Join Date: Feb 2009
Location: Peru
Old 08-22-2013 , 16:41   Re: [ZP] Extra Item : Crucio Spell
Reply With Quote #8

your plugins are awesome, I really want to try them, but most of them only work for 5.0, thanks for sharing anyways
__________________
My very first zp server movie.
http://www.youtube.com/watch?v=yvTmlFr_Y-4 <- now with translation in english

tempito 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 15:04.


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