Raised This Month: $ Target: $400
 0% 

set_godmode or block fall dmg?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 03-03-2010 , 07:32   set_godmode or block fall dmg?
Reply With Quote #1

hi

http://forums.alliedmods.net/showthread.php?t=120286

definded 2 teams ( catchers & fleers )
the fleers have only 30 sec. to hide. after 30 sec. i changed the maxspeed = 0.1 & user gravity on *10.0

problem : when a user is @ jumping and the countdown is over, he get *10.0 of standard gravity and he falls down and he is dead.
when i set godmode on user for example for 1 sec., player can jump out of map & try to hide under map.
when i block fall dmg it's the same.

do you have any ideas what i can do to block it?
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
Dr.G
Senior Member
Join Date: Nov 2008
Old 03-03-2010 , 07:52   Re: set_godmode or block fall dmg?
Reply With Quote #2

Ham_TakeDamage... If(dmgBits & DMG_FALL) return HAM_SUPERCEDE
__________________
Dr.G is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 03-03-2010 , 08:10   Re: set_godmode or block fall dmg?
Reply With Quote #3

but imaging you fall out of the map.
you know for sure as_oilrig. whats when you fall out of the map? the damage which you get from falling, will be ignored
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
Dr.G
Senior Member
Join Date: Nov 2008
Old 03-03-2010 , 08:29   Re: set_godmode or block fall dmg?
Reply With Quote #4

then you gotta findout how far he is above ground and if greater then X dont block fall damage maybe...
__________________
Dr.G is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 03-03-2010 , 08:34   Re: set_godmode or block fall dmg?
Reply With Quote #5

oh goo0o0o0o0o0o0o0ood idea

i'll try it
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 03-03-2010 , 08:38   Re: set_godmode or block fall dmg?
Reply With Quote #6

Maybe kill-zones in out of map zones?
__________________
xPaw is offline
fezh
Veteran Member
Join Date: Dec 2008
Location: BANNED
Old 03-03-2010 , 08:39   Re: set_godmode or block fall dmg?
Reply With Quote #7

What about DMG_GENERIC ?
__________________
"There is no knowledge, that is not power"
fezh is offline
Dr.G
Senior Member
Join Date: Nov 2008
Old 03-03-2010 , 08:51   Re: set_godmode or block fall dmg?
Reply With Quote #8

Or check if he is crushed maybe ( DMG_CRUSH ) ...

If((dmgBits & DMG_FALL) && !(dmgBits & DMG_CRUSH)) return HAM_SUPERCEDE

Should be fast to test...
__________________
Dr.G is offline
gladius
Veteran Member
Join Date: Jul 2008
Location: Santiago, Chile
Old 03-03-2010 , 12:21   Re: set_godmode or block fall dmg?
Reply With Quote #9

you can use FL_FROZEN

try this ( This code I think it has everything you need )

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

new MaxplayersScreenfade
new bool:FreezePlayer
new Counter

public plugin_init() {
    
register_plugin("A""B""C")
    
    
register_event"HLTV""NewRound""a""1=0""2=0" );
    
    
//by Connor
    
const Ham:Ham_Player_ResetMaxSpeed Ham_Item_PreFrame
    RegisterHam
(Ham_Player_ResetMaxSpeed"player""FwResetMaxSpeed"1)
    
    
Maxplayers get_maxplayers()
    
Screenfade get_user_msgid("ScreenFade")
    
    
Counter 30
}

public 
NewRound() {
    
FreezePlayer true
    
for(new i<= Maxplayersi++) {
        switch(
get_user_team(i)) {
            case 
1// Fleers TT
                
client_print(iprint_chat"Run!... you have 30 seconds to hide")
            case 
2: {
                
client_print(iprint_chat"You must wait 30 seconds")
                
Freeze(i)
                
CatchersFade(i)
                
set_task(1.0"CatcherCounter"i)
            }    
        }        
    }
    
set_task(30.0"FunctionHide")
}

public 
CatcherCounter(index) {
    --
Counter
    
    
if(is_user_alive(index))
    {
        if(
Counter >= 1) {
            
client_print(indexprint_center"%d Seconds Remaining"Counter)
            
set_task(1.0"CatcherCounter"index)
        }
        else
            
client_print(indexprint_center"Go Go Go")
    }
}

public 
FunctionHide() {
    for(new 
i<= Maxplayersi++) {
        switch(
get_user_team(i)) {
            case 
1: {
                
client_print(iprint_chat"I hope you are hiding, because you dont move more")
                
Freeze(i)
            }
            case 
2: {
                
client_print(iprint_chat"Now you have to find to the Fleers... Go Go!")
                
Unfreeze(i)
            }    
        }
    }
    
FreezePlayer false
}

public 
Player_ResetMaxSpeed_Post(index) {
    if( 
is_user_alive(index)) {
        new 
Float:flMaxSpeed
        pev
(indexpev_maxspeedflMaxSpeed)
        if( 
flMaxSpeed == 1.0 ) {
            
// Freezetime
        
}
        
        else {
            if(
FreezePlayer && get_user_team(index) == && is_user_alive(index))
                
Freeze(index)
            
            else if(!
FreezePlayer && get_user_team(index) == && is_user_alive(index)) {
                
Unfreeze(index)
                
set_pev(indexpev_maxspeed400.0)
            }
        }
    }
    else 
// user is dead/spectator
        
return HAM_HANDLED
    
    
return HAM_HANDLED
}

Freeze(index) {
    
set_pev(indexpev_velocity0.0)        
    
set_pev(indexpev_flagspev(indexpev_flags) | FL_FROZEN);
}

Unfreeze(index) {
    
set_pev(indexpev_flagspev(indexpev_flags) & ~FL_FROZEN);
}

CatchersFade(i) {
    static 
RedGreenBlue
    Red 
0
    Green 
50
    Blue 
255
    
    message_begin
(MSG_ONEScreenfade_i);
    
write_short(~0); // duration
    
write_short(~0); // hold time
    
write_short(0x0004); // flags: FFADE_STAYOUT
    
write_byte(Red);        // r
    
write_byte(Green);        // g
    
write_byte(Blue);
    
write_byte(200); // alpha
    
message_end();

__________________
Proyects
Kreedz Chile Mod [100%] (Fixing some details).


Last edited by gladius; 03-03-2010 at 12:29.
gladius is offline
Send a message via MSN to gladius Send a message via Skype™ to gladius
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 03-03-2010 , 14:42   Re: set_godmode or block fall dmg?
Reply With Quote #10

Quote:
Originally Posted by gladius View Post
you can use FL_FROZEN

try this ( This code I think it has everything you need )

Da fuck?

Hes talking about fall damage not freezing unfreezing.
Doc-Holiday is offline
Reply



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 08:41.


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