Raised This Month: $ Target: $400
 0% 

A question that is killing me =/


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Kraugh
Senior Member
Join Date: Jan 2006
Location: barrington, ri
Old 03-01-2006 , 16:57  
Reply With Quote #9

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.
__________________
"You can not restrain a fool from speaking, but nothing obliges you to listen."
Kraugh is offline
Send a message via AIM to Kraugh
 



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 20:17.


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