Raised This Month: $ Target: $400
 0% 

[ZP] Extra item: Thunder Knife


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Vechta
Veteran Member
Join Date: Jun 2010
Old 09-11-2010 , 10:56   Re: [HELP] [ZP] Extra item: Thunder Knife
Reply With Quote #1

Try this:

PHP Code:
#include <amxmodx>
#include <engine>
#include <zombieplague>

new havetk[33
new 
g_lightningg_smoke
new g_tknife

public plugin_init()
{
    
register_plugin"[ZP] Thunder Knife""0.1""fiendshard" );
    
register_event("Damage" "event_Damage" "b" "2>0");
    
    
g_tknife zp_register_extra_item("Thunder Knife (Once)"15ZP_TEAM_HUMAN
}
public 
plugin_precache()
{
    
g_lightning precache_model"sprites/lgtning.spr" );
    
g_smoke precache_model"sprites/steam1.spr" );
}

public 
zp_extra_item_selected(iditemid)
{
    if (
itemid == g_tknife)
    {
        
havetk[id] = true
        client_print
(idprint_chat"[ZP] You got Thunder Knife! Slash a Zombie to kill him with thunder")
    }
}

public 
client_putinserver(id)
    
havetk[id] = false

public event_Damage(id)
{
    new 
weapon ,attacker get_user_attacker(id weapon);
        
    if ( !
is_user_alive(attacker) ||zp_get_user_zombie(attacker) || zp_get_user_nemesis(attacker) ||  zp_get_user_survivor(attacker)) return;
    
    if(
weapon == CSW_KNIFE)
    {
        new 
vorigin], pos];
        
get_user_originidvorigin );
        
vorigin] -= 26;
        
pos] = vorigin] + 150;
        
pos] = vorigin] + 150;
        
pos] = vorigin] + 800;
        
        
user_kill(id);
        
Thunderposvorigin );
        
Smokevorigin1010 );
        
        
havetk[id] = false
    
}
}
Thunderstart], end] )
{
    
message_beginMSG_BROADCASTSVC_TEMPENTITY ); 
    
write_byteTE_BEAMPOINTS ); 
    
write_coordstart] ); 
    
write_coordstart] ); 
    
write_coordstart] ); 
    
write_coordend] ); 
    
write_coordend] ); 
    
write_coordend] ); 
    
write_shortg_lightning ); 
    
write_byte);
    
write_byte);
    
write_byte);
    
write_byte20 );
    
write_byte30 );
    
write_byte200 ); 
    
write_byte200 );
    
write_byte200 );
    
write_byte200 );
    
write_byte200 );
    
message_end();
    
    
message_beginMSG_PVSSVC_TEMPENTITYend );
    
write_byteTE_SPARKS );
    
write_coordend]  );
    
write_coordend]);
    
write_coordend] );
    
message_end();
}

Smokeiorigin], scaleframerate )
{
    
message_beginMSG_BROADCASTSVC_TEMPENTITY );
    
write_byteTE_SMOKE );
    
write_coordiorigin] );
    
write_coordiorigin] );
    
write_coordiorigin] );
    
write_shortg_smoke );
    
write_bytescale );
    
write_byteframerate );
    
message_end();
}

public 
event_round_start()
{
    for(new 
032i++)
        
havetk[i] = false

Vechta is offline
fiendshard
Senior Member
Join Date: Dec 2009
Location: In Water
Old 09-11-2010 , 11:37   Re: [HELP] [ZP] Extra item: Thunder Knife
Reply With Quote #2

Nope, doesn't work
__________________
fiendshard 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 16:26.


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