Raised This Month: $51 Target: $400
 12% 

freeze in air CS 1.6


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
InteX01
Senior Member
Join Date: Jan 2017
Old 06-21-2017 , 08:22   freeze in air CS 1.6
Reply With Quote #1

PHP Code:
Freezeid 

    if( 
is_user_alive(id) ) 
    { 
        new 
iFlags pev(idpev_flags
        if( ~
iFlags FL_FROZEN 
        { 
            
set_pev(idpev_flagsiFlags FL_FROZEN
        } 
    } 


UnFreezeid 

    if( 
is_user_alive(id) ) 
    { 
        new 
iFlags pev(idpev_flags
        if( 
iFlags FL_FROZEN 
        { 
            
set_pev(idpev_flagsiFlags & ~FL_FROZEN
        } 
    } 

I was searching for many freeze plugins and stuff and none of them work...
I found this but, this plugin freezes player if he is in the Air.. i dont want that... how could i make that so it freezes when it touches the ground ?
InteX01 is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 06-21-2017 , 09:39   Re: freeze in air CS 1.6
Reply With Quote #2

Quote:
Originally Posted by InteX01 View Post
PHP Code:
Freezeid 

    if( 
is_user_alive(id) ) 
    { 
        new 
iFlags pev(idpev_flags
        if( ~
iFlags FL_FROZEN 
        { 
            
set_pev(idpev_flagsiFlags FL_FROZEN
        } 
    } 


UnFreezeid 

    if( 
is_user_alive(id) ) 
    { 
        new 
iFlags pev(idpev_flags
        if( 
iFlags FL_FROZEN 
        { 
            
set_pev(idpev_flagsiFlags & ~FL_FROZEN
        } 
    } 

I was searching for many freeze plugins and stuff and none of them work...
I found this but, this plugin freezes player if he is in the Air.. i dont want that... how could i make that so it freezes when it touches the ground ?
There's nothing related to air here. Post the full code.
__________________
edon1337 is offline
InteX01
Senior Member
Join Date: Jan 2017
Old 06-21-2017 , 09:56   Re: freeze in air CS 1.6
Reply With Quote #3

PHP Code:
public cmd_zmurka(id) {
    if (
g_Simon == 0) return PLUGIN_HANDLED
    
if (g_used == 0) {
        
jail_open()
        
set_lights("c")
        
g_used 0
        g_nogamerounds 
0
        g_GameMode 
17
        g_BoxStarted 
0
        set_cvar_num
("mp_flashlight"1)
        
set_cvar_num("mp_friendlyfire"0)
        
g_iTimeZmurka get_pcvar_num(pCvarSecondss)
        
set_task(46.0"zmurka_t_freeze"TASK_T_FREEZE)
        
set_task(1.0"zmurka_cuvari"TASK_ZMURKACT, .flags "a", .repeat g_iTimeZmurka)
        
entity_set_int(g_SimonEV_INT_body3)
        
g_Simon 0
        
new i
        server_cmd
("jb_block_weapons")
        
get_user_name(idnick63)
        
set_dhudmessage(2552552550.030.5501.03.00.20.2false)
        
show_dhudmessage(0"%s je dao Zmurku."nick)
        
client_cmd(0,"mp3 play sound/jbextreme/astronomija.mp3")
        
Color_Print(0"!g[MILF-JB] !team%s !yje startovao !teamZmurku!y. Uzivajte u igri."nick)
        for(
1<= g_MaxClientsi++) 
        {
            if((
is_user_alive(i) && cs_get_user_team(i) == CS_TEAM_CT))
            {
                
strip_user_weapons(i)
                
set_user_health(i100)
                
set_user_armor(i0)
                
set_user_godmode(i1)
                
set_user_maxspeed(i330.0)
                
set_user_gravity(i0.1)
            }
            else if(
is_user_alive(i) && cs_get_user_team(i) == CS_TEAM_T)
            {
                
strip_user_weapons(i)
                
set_user_health(i100)
                
set_user_armor(i0)
                
set_user_maxspeed(i330.0)
                
set_user_gravity(i0.5)
            }
        }
    }
    return 
PLUGIN_HANDLED
}
//===========================================================================================
// Zmurka
//===========================================================================================
public zmurka_cuvari(id)
{    
    
set_dhudmessage(25500, -1.00.2820.021.00.010.1);
    
show_dhudmessage(0">> Zatvorenici imaju jos %d sekundi da se sakriju <<"g_iTimeZmurka--, (g_iTimeZmurka 1) ? "s" "")
}
public 
zmurka_t_freeze()
{
    
g_iTime get_pcvar_num(pCvarSeconds)
    
set_lights("a")
    
set_task(1.0"zmurka_trazi"TASK_ZMURKATRAZI, .flags "a", .repeat g_iTime)
    
set_task(180.0"tagdayslayy"TASK_SLAYZMURKA)
    
ColorChat(0TEAM_COLOR"^4[MILF-JB]^1 Vreme za sakrivanje je isteklo, svi ^3zatvorenici ^1su zaledjeni.")
    
ColorChat(0TEAM_COLOR"^4[MILF-JB]^1 Cuvari, imate^3 180 sekundi ^1da pronadjete sve zatvorenike.")
    
    
    new 
i
    
for(1<= g_MaxClientsi++)     
        {
            if((
is_user_alive(i) && cs_get_user_team(i) == CS_TEAM_T))
            {
                
strip_user_weapons(i)
                
set_user_gravity(i0.8)
                
Freeze(i)
            }
            else if(
is_user_alive(i) && cs_get_user_team(i) == CS_TEAM_CT)
            {
                
strip_user_weapons(i)
                
give_item(i"weapon_knife")
                
give_item(i"weapon_m4a1")
                
cs_set_user_bpammo(iCSW_M4A1700)
            }
        }
}
public 
zmurka_trazi(id)
{    
    
set_dhudmessage(0235255, -1.00.2820.021.00.010.1);
    
show_dhudmessage(0">> Cuvari imaju jos %d sekundi da pronadju sve zatvorenike <<"g_iTime--, (g_iTime 1) ? "s" "")
}
public 
tagdayslayy(id)
{
    
ColorChat(0TEAM_COLOR"^4[MILF-JB]^1 Cuvari su ^3izgubili ^1u igri jer nisu pronasli sve ^3zatvorenike ^1na vreme.")
    
    new 
Players32 ], PlayersNumiPlayer
    get_players
PlayersPlayersNum"h" //do not include HLTV Proxies
    
for( new iPlayersNumi++ )
         {
            
iPlayer Players]
            
            if(
get_user_teamiPlayer ) == && is_user_aliveiPlayer ) )
            {
                
user_silentkilliPlayer )
            }
        }
}
//======================================================================
Freezeid 

    if( 
is_user_alive(id) ) 
    { 
        new 
iFlags pev(idpev_flags
        if( ~
iFlags FL_FROZEN 
        { 
            
set_pev(idpev_flagsiFlags FL_FROZEN
        } 
    } 


UnFreezeid 

    if( 
is_user_alive(id) ) 
    { 
        new 
iFlags pev(idpev_flags
        if( 
iFlags FL_FROZEN 
        { 
            
set_pev(idpev_flagsiFlags & ~FL_FROZEN
        } 
    } 

EVERYTHING about that....
everything works great except that i dont want players to freeze in midair.
This is for HideNSeek Jailbreak gameday..
When the time expires, and if player is in the air... player freezes in the air.. And i dont want that.

Last edited by InteX01; 06-21-2017 at 09:58.
InteX01 is offline
baneado
Veteran Member
Join Date: Dec 2012
Location: amxmodx-es.com
Old 06-21-2017 , 13:26   Re: freeze in air CS 1.6
Reply With Quote #4

He is talking about: the player jumps, it's in the air and then freezes.

Use drop_to_floor before freeze the player

Last edited by baneado; 06-21-2017 at 13:27.
baneado is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 06-22-2017 , 02:07   Re: freeze in air CS 1.6
Reply With Quote #5

Quote:
When the time expires, and if player is in the air... player freezes in the air.. And i dont want that.
Quote:
Use drop_to_floor before freeze the player
??
__________________








CrazY. is offline
baneado
Veteran Member
Join Date: Dec 2012
Location: amxmodx-es.com
Old 06-22-2017 , 06:07   Re: freeze in air CS 1.6
Reply With Quote #6

Quote:
Originally Posted by CrazY. View Post
??
https://www.amxmodx.org/api/engine/drop_to_floor

he said:
Quote:
Originally Posted by InteX01 View Post
how could i make that so it freezes when it touches the ground ?

Last edited by baneado; 06-22-2017 at 06:09.
baneado is offline
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 06-22-2017 , 06:28   Re: freeze in air CS 1.6
Reply With Quote #7

There is really not a great way of detecting that the player landed.
I posted a solution to this problem some time ago in this thread https://forums.alliedmods.net/showthread.php?t=233136
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.
hornet 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 11:43.


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