.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   Metamod and metamod plugins (http://forums.bots-united.com/forumdisplay.php?f=15)
-   -   Store render and use timer / task (http://forums.bots-united.com/showthread.php?t=9436)

Bend3R 10-06-2013 09:20

Store render and use timer / task
 
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;
    }




All times are GMT +2. The time now is 17:01.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.