Raised This Month: $ Target: $400
 0% 

[ZP] Addon: Survivor Tracers


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
eXacT
Veteran Member
Join Date: Apr 2009
Location: Buenos Aires
Old 12-03-2009 , 15:17   [ZP] Addon: Survivor Tracers
Reply With Quote #1

[ZP] Addon: Survivor Tracers
by eXacT


Description: It is a litte plugin who gives to the survivors, a little effect, yellow tracers emerging from the body.

Cvars:
"zp_survivor_tracers_enabled", "1" // Enable/disable the tracers in survivor
"zp_survivor_tracers_time", "0.1" // in this time the tracers apears on the survivor


Required:
amxmodx -- Module
fakemeta -- Module
zombie plague -- Main Plugin
zombieplague -- Include

Credits:
meTaLiCroSS - He helped me to fix some code
IneedHelp - I extracted some code from his SuperPlayer

SnapShot:

[IMG]http://img690.**************/img690/3254/dedust20000za.png[/IMG]

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

#define TASK_TRACER 27777

new PLUG[] = "[ZP] Addon: Survivor Tracers"
new VERS[] = "1.4"
new AUTH[] = "eXacT"

new gCvarEnabledgCvarTracersTime

public plugin_init() 
{
    
// Pugin Info
    
register_plugin(PLUGVERSAUTH)
    
    
// Cvars
    
gCvarEnabled register_cvar("zp_survivor_tracers_enabled""1")
    
gCvarTracersTime register_cvar("zp_survivor_tracers_time""0.1")
}

public 
zp_user_humanized_post(id)
{
    
// Cvar is disabled or isn't survivor round
    
if (!get_pcvar_num(gCvarEnabled) || !zp_is_survivor_round())
        return;
        
    if(
zp_get_user_survivor(id))
    {
        
set_task(get_pcvar_float(gCvarTracersTime), "GiveTracers"id+TASK_TRACER__"b")
    }
}  

public 
GiveTracers(id)
{
    
id -= TASK_TRACER
    
    
if(!is_user_alive(id) || !zp_get_user_survivor(id) || zp_get_user_zombie(id))
    {
        
remove_task(id+TASK_TRACER)
        return;
    }
    
    new 
Float:Origin[3]
    
pev(idpev_originOrigin)
    
    
engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYOrigin0)
    
write_byte(TE_IMPLOSION)
    
engfunc(EngFunc_WriteCoordOrigin[0]) 
    
engfunc(EngFunc_WriteCoordOrigin[1]) 
    
engfunc(EngFunc_WriteCoordOrigin[2]) 
    
write_byte(128
    
write_byte(20
    
write_byte(3
    
message_end()

Changelog:
Code:
v1.2 - Public Relase
v1.3 - Added Enable/disable Cvar
v1.4 - Tracers will be enabled in Survivor Mode Only
Attached Files
File Type: sma Get Plugin or Get Source (zp_addon_survivor_tracers.sma - 924 views - 1.4 KB)
__________________

"There is no knowledge, that is not power"

Last edited by eXacT; 01-28-2010 at 08:25. Reason: i forgot the plugin xD
eXacT is offline
Send a message via MSN to eXacT Send a message via Skype™ to eXacT
 


Thread Tools
Display Modes

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 01:23.


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