AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Death Glow (https://forums.alliedmods.net/showthread.php?t=17907)

joka69 09-11-2005 15:00

Death Glow
 
Hi a guy i know made this plugin it worked on his server ,i put it on my server and it dosent work.
someone please help :roll:
Code:

#include <amxmodx>
#include <fun>
#include <engine>

new bool:glow[33]

public plugin_init() {
  register_plugin("Death Glow","1.0","doubleM")

  register_logevent("kill_event",5,"1=killed")

  register_cvar("amx_deathglow_time","5")
  set_cvar_num("amx_deathglow_time",5)
}

public client_PreThink(id) {
  if(glow[id]) {
      new iR, iG, iB
      if(get_user_team(id)==1) {
        iR = 255
        iG = 0
        iB = 0
      } else if(get_user_team(id)==2) {
        iR = 0
        iG = 192
        iB = 255
      } else {
        iR = 255
        iG = 128
        iB = 0
      }

      set_user_rendering(id,kRenderFxGlowShell,iR,iG,iB,kRenderNormal,30)
server_print("asdf")
  }
}

public reset_glow(id)
{
  set_user_rendering(id)
  glow[id] = false
}

public kill_event()
{
  new sArg[256], sName[33], iUserId
  new killer_id, victim_id

  read_logargv(0, sArg, 255)
  parse_loguser(sArg, sName, 32, iUserId)
  killer_id = find_player("k", iUserId)

  read_logargv(2, sArg, 255)
  parse_loguser(sArg, sName, 32, iUserId)
  victim_id = find_player("k", iUserId)

  if(victim_id) {
      glow[victim_id] = true
      set_task(float(get_cvar_num("amx_deathglow_time")),"reset_glow",victim_id)
  }

   
  return PLUGIN_CONTINUE
}

http://forums.alliedmods.net/showthread.php?t=17886

pdoubleopdawg 09-11-2005 17:31

Do you have the engine module enabled?

joka69 09-12-2005 02:54

yep :cry:


All times are GMT -4. The time now is 14:20.

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