Raised This Month: $ Target: $400
 0% 

NoClip Help, If Stuck In wall After Time You Will Die


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
cikjam
Senior Member
Join Date: Feb 2009
Location: Australia
Old 06-26-2009 , 02:13   NoClip Help, If Stuck In wall After Time You Will Die
Reply With Quote #1

I need help with My noclip block for blockmaker, everything works but I want to make it so if you are stuck in a wall when the noclip time runs out you die.

Code:
actionNoclip(id, bool:OverrideTimer)
{
    new Float:fTime = halflife_time();
    
    if (fTime >= gfNoclipNextUse[id] || OverrideTimer)
    {
        new Float:fTimeout = get_cvar_float("bm_nocliptime");
        
        set_user_noclip(id, 1);
        set_task(fTimeout, "taskNoclipRemove", TASK_NOCLIP + id, "", 0, "a", 1);
        
        //only make player glow blue for noclip if player isn't already stealth
        if (fTime >= gfStealthTimeOut[id])
        {
            set_user_rendering(id, kRenderFxGlowShell, 0, 0, 255, kRenderNormal, 16);
        }
        
        //play invincibility sound
        emit_sound(id, CHAN_STATIC, gszInvincibleSound, 1.0, ATTN_NORM, 0, PITCH_NORM);
        
        gfNoclipTimeOut[id] = fTime + fTimeout;
        gfNoclipNextUse[id] = fTime + fTimeout + get_cvar_float("bm_noclipcooldown");
    }
    else
    {
        set_hudmessage(gHudRed, gHudGreen, gHudBlue, gfTextX, gfTextY, gHudEffects, gfHudFxTime, gfHudHoldTime, gfHudFadeInTime, gfHudFadeOutTime, gHudChannel);
        show_hudmessage(id, "Wait Time: %.1f", gfNoclipNextUse[id] - fTime);
    }
}
cikjam 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 15:40.


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