AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   zombie glow (https://forums.alliedmods.net/showthread.php?t=87520)

kazuki 03-13-2009 04:33

zombie glow
 
how do i add green glow on this zombie ????

here my scripting

PHP Code:

/*
    [ZP] Ultimate Big Zombie
             (special ability for Big Zombie)
     by Fry!
 
 Description :
   You all know original Big Zombie but this time Big Zombie have special ability (pain shock free).
 
 Credits : 
   Simon Logic - for his Pain shock free plugin
   Mercylezz - I borrowed some pain shock free code from his zombie plague mod.
   Exolent - for fixing lil mistake
 
 Changelog :
   16/10/2008 - v1.0 - First Test
   16/10/2008 - v1.1 - fixed pain shock not working
   19/10/2008 - v1.2 - forgat to add if player was zombie. ^^
   07/02/2009 - v1.2.2 - Rewrited plugin, completely fixed pain shock free.
*/
#include <amxmodx>
#include <fakemeta>
#include <zombieplague>
/* -------------------------------------------------------------- */
/*          */ 
/* -------------------------------------------------------------- */
#define PLUGIN "[ZP] Class : Ultimate Big Zombie"
#define VERSION "1.2.2"
#define AUTHOR "Fry!"
new g_zclass_painfree
new bool:g_restorevel[33]
new 
Float:g_velocity[33][3]
new const 
zclass_name[] = "Ultimate Tank Zombie"
new const zclass_info[] = "H:5000 S:200 G:1.0 K:0.0"
new const zclass_model[] = "zombie_source"
new const zclass_clawmodel[] = "v_knife_zombie_drowned.mdl"
const zclass_health 5000
const zclass_speed 200
const Float:zclass_gravity 1.0
const Float:zclass_knockback 0.0
public plugin_precache()
{
 
register_cvar("zp_zclass_pain_free",VERSION,FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_UNLOGGED|FCVAR_SPONLY)
 
 
register_forward(FM_PlayerPreThink"fw_PlayerPreThink")
 
register_forward(FM_PlayerPreThink"fw_PlayerPreThink_Post"1)
 
 
g_zclass_painfree zp_register_zombie_class(zclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockback)
}
public 
zp_user_infected_post(playerinfector)
{
 if (
zp_get_user_zombie_class(player) == g_zclass_painfree)
 {
  
pev(playerpev_velocityg_velocity[player])
 }
}
public 
fw_PlayerPreThink(id)

 if ( !
is_user_alive(id) || !is_user_bot(id) || !zp_get_user_zombie(id) )
  return 
FMRES_IGNORED
 
 
if (zp_get_user_zombie_class(id) != g_zclass_painfree)
  return 
FMRES_IGNORED
 
 
if (pev(idpev_flags) & FL_ONGROUND)
 {
  
pev(idpev_velocityg_velocity[id])
 
  
g_restorevel[id] = true
 
}
 return 
FMRES_IGNORED
}
public 
fw_PlayerPreThink_Post(id)
{
 if (
zp_get_user_zombie_class(id) != g_zclass_painfree)
  return 
FMRES_IGNORED
 
 
if (g_restorevel[id])
 {
  
g_restorevel[id] = false
  
if (!(pev(idpev_flags) & FL_ONTRAIN))
  {
   new 
groundent pev(idpev_groundentity)
 
   if (
pev_valid(groundent) && (pev(groundentpev_flags) & FL_CONVEYOR))
   { 
    static 
Float:vecTemp[3]
 
    
pev(idpev_basevelocityvecTemp)
 
    
g_velocity[id][0] += vecTemp[0]
    
g_velocity[id][1] += vecTemp[1]
    
g_velocity[id][2] += vecTemp[2]
   }                
   
set_pev(idpev_velocityg_velocity[id])
 
   return 
FMRES_HANDLED
  
}
 }
 return 
FMRES_IGNORED


PLease HELP

anakin_cstrike 03-13-2009 04:36

Re: Help Please
 
Read the rules - descriptive topic title ; and search, it has been asked a lot of times before

PS:
fm_set_rendering from fakemeta util.

kazuki 03-13-2009 10:10

Re: Help Please
 
hmm... i did a search all is non - fix... i need it really pls Teach me could u teach abit more clear??

fysiks 03-13-2009 10:26

Re: Help Please
 
The best way to learn is find a plugin that does something similar to what you want and then use that code to learn.

YamiKaitou 03-13-2009 10:28

Re: Help Please
 
As per the Global Forum Rules, you need to have a descriptive topic title. If you wish for this topic to stay open, please correct the topic title before you post again.

kazuki 03-14-2009 03:06

Re: zombie glow
 
i cannot understand it i try to copy and paste doenst work.... PLS help pls to put a green glow in it

Zombie Lurker 03-15-2009 05:42

Re: zombie glow
 
Try adding this to the script file. (NOTE : It is most probably not going to work because I have never tested it before)

Quote:

fm_set_rendering(id, kRenderFxGlowShell, 0, 200, 0, kRenderNormal, 16);

kazuki 03-15-2009 07:06

Re: zombie glow
 
Doesn't work , error comilping

fysiks 03-15-2009 07:09

Re: zombie glow
 
What error? We can't help you without knowing the error.

Did you include fakemeta_util.inc?

SnoW 03-15-2009 07:12

Re: zombie glow
 
Quote:

Originally Posted by kazuki (Post 780998)
Doesn't work , error comilping

You probably understood that the entity is the id? So this in your code:
Code:

fm_set_rendering(id, kRenderFxGlowShell, 0, 200, 0, kRenderNormal, 16);


All times are GMT -4. The time now is 08:55.

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