AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   A question that is killing me =/ (https://forums.alliedmods.net/showthread.php?t=24696)

TiToTal 03-01-2006 06:14

A question that is killing me =/
 
I came here to know how woul be a code for the following situation:
"when someone kills a person, the killer gets glowing some color"

I think its not hard.. but I DONT KNOW, lol... I think it is something like this:

public glowingkiller(id,killer)
{
get_user_authid(killer)
set_user_rendering(id,kRenderFxGlowShell,255, 0,0,kRenderNormal,16)
return PLUGIN_HANDLED
}


I dont know... please, I am waiting some help.. I truly need this... :cry:

TiToTal 03-01-2006 06:27

If it helps to know.. I am doing it for The specialists mod...

ahhh...

and in same situation... How could I make different glowings depending on the victims...
something that determines one victim different of another, and killing them will make you glow in different colors..

and you may ask: "what kind of differences does the victms has?"
Well..

In the begginig of the script there is this:
Code:

new difference[33]
And one has "difference[id] = 0" and the other "difference[id] = 1"

If you guys solve this "problem" for me, it will help me a looooot...
thx.. =)

MaximusBrood 03-01-2006 11:18

Quote:

Originally Posted by TiToTal
If it helps to know.. I am doing it for The specialists mod...

Then I don't know... sorry

The specialists mod has a totally different death event which, unfortunatly, I'm not familliar with :(

Sandurr 03-01-2006 12:40

Code:
#define RED 0 #define GREEN 0 #define BLUE 255 plugin_init() {     register_event("DeathMsg","death_event","a") } public death_event() {     //new victim = read_data(2)     new killer = read_data(1)     set_task(0.1,"glow",killer) } public glow(id) {     set_user_rendering(id,kRenderFxGlowShell,RED,GREEN,BLUE,kRenderNormal,16)     return; }

VEN 03-01-2006 13:49

Quote:

Originally Posted by MaximusBrood
The specialists mod has a totally different death event


Brad 03-01-2006 13:58

In TFC:
Code:
public  client_death ( killer, victim, wpnindex, hitplace, TK )
http://www.amxmodx.org/funcwiki.php?go=func&id=471

VEN 03-01-2006 14:04

Team Fortress Classic?
Quote:

Originally Posted by TiToTal
I am doing it for The specialists mod


v3x 03-01-2006 14:51

Quote:

Originally Posted by VEN
Team Fortress Classic?
Quote:

Originally Posted by TiToTal
I am doing it for The specialists mod


No, "Total Fucking Chaos". Yes it's Team Fortress Classic.

Kraugh 03-01-2006 16:57

The Specialists uses the DeathMsg event for death just like other mods. however, in my experience, TS resets a user's rendering properties every PreThink or so, so if you want to keep a user updated you have to reset it every PostThink. ie:

Code:
new shouldglow[33]; public plugin_init() {    register_event("DeathMsg","hook_death","a"); } public client_putinserver(id) {    shouldglow[id] = 0; } public hook_death() {    new killer = read_data(1), victim = read_data(2);    if(killer && killer != victim)       shouldglow[killer] = 1;    shouldglow[victim] = 0; } public client_PostThink(id) {    if(shouldglow[id] && is_user_alive(id))       set_user_rendering(id,...); }

the client_PostThink forward is from the engine module.

TiToTal 03-01-2006 18:22

Thankyou guys =D

and the second situation? when it depends on a victim value?


Thx a lot, you guys are very nice.. in another forum I got no reply...


(and sorry english mistakes, I am brazilian, not fully integrated with wnglish.. lol)


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

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