Raised This Month: $32 Target: $400
 8% 

Infect Effect Mod [BB]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
forumm
Senior Member
Join Date: Nov 2013
Old 11-18-2014 , 05:40   Infect Effect Mod [BB]
Reply With Quote #1

this plugin Basebuilder mode I want to use

Basebuilder adapt mode


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

#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <zombieplague>
#include <xs>

#define PLUGIN "[ZP] Addon: Infect-Effect"
#define VERSION "1.0"
#define AUTHOR "Dias"

new g_effect_id[33], g_had_effect[33]
new const 
effect_model[] = "sprites/infect-effect.spr"

new cvar_scalecvar_showtimecvar_lightlevel

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
RegisterHam(Ham_Spawn"player""fw_spawn_post"1)
    
register_forward(FM_AddToFullPack"fw_WhatTheFuck_Post"1)
    
    
cvar_scale register_cvar("zp_in-ef_scale""0.035")
    
cvar_showtime register_cvar("zp_in-ef_showtime""2.0")
    
cvar_lightlevel register_cvar("zp_in-ef_lightlevel""100.0")
}

public 
plugin_precache()
{
    
precache_model(effect_model)
}

public 
fw_spawn_post(id)
{
    if(
g_had_effect[id])
        
remove_effect(id)
}

public 
zp_user_infected_post(idattacker)
{
    if(
is_user_alive(attacker))
    {
        
show_effect(id)
    }
}

public 
show_effect(id)
{
    
g_effect_id[id] = engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"env_sprite"))
    
    if (!
pev_valid(g_effect_id[id]))
        return
    
    
g_had_effect[id] = 1
    
    set_pev
(g_effect_id[id], pev_solidSOLID_NOT)
    
set_pev(g_effect_id[id], pev_movetypeMOVETYPE_NONE)

    
engfunc(EngFunc_SetModelg_effect_id[id], effect_model)
    
    
set_pev(g_effect_id[id], pev_rendermodekRenderTransAlpha)
    
set_pev(g_effect_id[id], pev_renderamt0.0)
    
set_pev(g_effect_id[id], pev_ownerid)
    
set_pev(g_effect_id[id], pev_scaleget_pcvar_float(cvar_scale))
    
set_pev(g_effect_id[id], pev_light_levelget_pcvar_float(cvar_lightlevel))
    
    
set_task(get_pcvar_float(cvar_showtime), "remove_effect"g_effect_id[id])
}

public 
fw_WhatTheFuck_Post(eseenthosthost_flagsplayerp_set)
{
    if(!(
host 33))
        return 
FMRES_IGNORED
        
    
if(ent != g_effect_id[host] || !pev_valid(ent))
        return 
FMRES_IGNORED
        
    
if(pev(entpev_owner) != host)
        return 
FMRES_IGNORED
        
    
if(!is_user_alive(host))
        return 
FMRES_IGNORED
        
    
static Float:origin[3], Float:forvec[3], Float:voffsets[3], Float:Angles[3]
    
    
pev(hostpev_originorigin)
    
pev(hostpev_view_ofsvoffsets)
    
pev(hostpev_anglesAngles)
    
    
xs_vec_add(originvoffsetsorigin)
    
    
// Get a forward vector in the direction of player's aim
    
velocity_by_aim(host10forvec)
    
    
// Set the sprite on the new origin
    
xs_vec_add(originforvecorigin)
    
    
engfunc(EngFunc_SetOriginentorigin)
    
set_es(esES_Originorigin)
    
set_es(esES_AnglesAngles)
    
    
// Make the sprite visible
    
set_es(esES_RenderModekRenderTransAdd)
    
set_es(esES_RenderAmt200)
        
    return 
FMRES_HANDLED
}

public 
remove_effect(ent)
{
    
g_had_effect[pev(entpev_owner)] = 0
    
    
if(pev_valid(ent))
        
engfunc(EngFunc_RemoveEntityent)

forumm is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 11-18-2014 , 07:14   Re: Infect Effect Mod [BB]
Reply With Quote #2

What is your question?
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
forumm
Senior Member
Join Date: Nov 2013
Old 11-18-2014 , 07:38   Re: Infect Effect Mod [BB]
Reply With Quote #3

Quote:
Originally Posted by wickedd View Post
What is your question?
plugin basebuilder mode, I'll use basebuilder adapt mode
forumm is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 11-18-2014 , 07:47   Re: Infect Effect Mod [BB]
Reply With Quote #4

Quote:
Originally Posted by wickedd View Post
What is your question?
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
forumm
Senior Member
Join Date: Nov 2013
Old 11-18-2014 , 08:17   Re: Infect Effect Mod [BB]
Reply With Quote #5

the problem is that this plugin basebuilder mode does not work
forumm is offline
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Old 11-18-2014 , 11:10   Re: Infect Effect Mod [BB]
Reply With Quote #6

Quote:
#include <zombieplague>
.... not for basebuilder..
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Location: Siiiiiiiiuu
Old 11-18-2014 , 11:20   Re: Infect Effect Mod [BB]
Reply With Quote #7

It's simple edit. Remove zombie include, then replace all zp_(blablabla)_human and check if user is ct.
__________________
Jhob94 is offline
Eagle07
Veteran Member
Join Date: May 2014
Location: Morocco :D
Old 11-18-2014 , 14:33   Re: Infect Effect Mod [BB]
Reply With Quote #8

he want to change this plugin from zombie plague to basebuilder
__________________
Eagle07 is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 11-18-2014 , 18:37   Re: Infect Effect Mod [BB]
Reply With Quote #9

Just need to edit this part:
PHP Code:
public zp_user_infected_post(idattacker)
{
    if(
is_user_alive(attacker))
    {
        
show_effect(id)
    }


Last edited by zmd94; 11-18-2014 at 18:38.
zmd94 is offline
forumm
Senior Member
Join Date: Nov 2013
Old 11-19-2014 , 05:19   Re: Infect Effect Mod [BB]
Reply With Quote #10

Quote:
Originally Posted by zmd94 View Post
Just need to edit this part:
PHP Code:
public zp_user_infected_post(idattacker)
{
    if(
is_user_alive(attacker))
    {
        
show_effect(id)
    }

for me edit
forumm 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 12:02.


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