View Single Post
Store render and use timer / task
Old
  (#1)
Bend3R
Member
 
Status: Offline
Posts: 50
Join Date: Jun 2005
Default Store render and use timer / task - 10-06-2013

Really need help with this, using a glow plugin and it have to catch the player's current render and then set it back after a few milliseconds.
If he don't have a render, use "else" then.

Example:
PHP Code:
#include "meta_api.h"
void Class::Touchedict_t *pOther )
{
    
// Here it have to store the current rendering the player have
    // and add a task/timer to reset back to the previous render
    // the player had before this was set.
    
META_CONS("Set Render");
    
pOther->v.renderfx kRenderFxGlowShell;
    
pOther->v.rendercolor.0;
    
pOther->v.rendercolor.130;
    
pOther->v.rendercolor.255;
    
pOther->v.rendermode kRenderNormal;
    
pOther->v.renderamt 128;
}

void Class::ResetRender edict_t *pOther )
{
    
// Set render
    
if(player_had_render)
    {
        
META_CONS("Reset render to the previous");
        
// Set the render back
    
}
    else
    {
        
META_CONS("Reset render to default");
        
pOther->v.renderfx kRenderFxNone;
        
pOther->v.rendercolor.0;
        
pOther->v.rendercolor.0;
        
pOther->v.rendercolor.0;
        
pOther->v.rendermode kRenderNormal;
        
pOther->v.renderamt 0;
    }

  
Reply With Quote