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::Touch( edict_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.x = 0;
pOther->v.rendercolor.y = 130;
pOther->v.rendercolor.z = 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.x = 0;
pOther->v.rendercolor.y = 0;
pOther->v.rendercolor.z = 0;
pOther->v.rendermode = kRenderNormal;
pOther->v.renderamt = 0;
}
}