Raised This Month: $ Target: $400
 0% 

Protection code help..


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
iBrazilian
Senior Member
Join Date: May 2011
Old 04-29-2012 , 20:16   Protection code help..
Reply With Quote #1

I'm learning still, I just want to know why this is taking the user render too quickly.. about 2 seconds even if i set it to 10 seconds.

PHP Code:
#include <amxmodx>
#include <fun>
#include <hamsandwich>


new shellthick,glow,protect_time;

public 
plugin_init()
    { 
    
register_plugin("Spawn Protection""1.0""iBrazilian")
    
    
RegisterHam(Ham_Spawn"player""protect"1);
    
    
protect_time register_cvar("Protection_time""10")
    
shellthick register_cvar("Shell_thickness""25"
    
glow register_cvar("Allow_glow""1"
}

public 
protect(iPlayer)
    {
    new 
Shell get_pcvar_num(shellthick)
    new 
Float:time get_pcvar_float(protect_time)
    
set_user_godmode(iPlayer1)
    
    if(
get_pcvar_num(glow)) { 
        
        if(
get_user_team(iPlayer) == CS_TEAM_CT)
            {
            
set_user_rendering(iPlayerkRenderFxGlowShell25500kRenderNormalShell)
        }
        
        if(
get_user_team(iPlayer) == CS_TEAM_T)
            {
            
set_user_rendering(iPlayerkRenderFxGlowShell00255kRenderNormalShell)
        }
    }
    
    
set_task(time"StopProtection")
    return 
PLUGIN_HANDLED;
}

public 
StopProtection(iPlayer)
    {
    
set_user_godmode(iPlayer0)     
    
set_user_rendering(iPlayerkRenderFxGlowShell00,0kRenderNormal0)
    
    return 
PLUGIN_HANDLED;

__________________
Pokemod Season 5 [ |||||||||| Complete]

Last edited by iBrazilian; 04-29-2012 at 20:32.
iBrazilian is offline
 


Thread Tools
Display Modes

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 07:48.


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