AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Play during freeze time (https://forums.alliedmods.net/showthread.php?t=318784)

MihailoZ 09-20-2019 10:21

Play during freeze time
 
Hello,

can I somehow make round start at 0:0 even freeze time is 30 seconds? I want players to be able to move even freeze time is counting.

JocAnis 09-20-2019 10:58

Re: Play during freeze time
 
Set freezetime to 0 and use FL_FROZEN for 30 secs?

MihailoZ 09-20-2019 11:39

Re: Play during freeze time
 
Quote:

Originally Posted by JocAnis (Post 2667693)
Set freezetime to 0 and use FL_FROZEN for 30 secs?

Elaborate please.

JocAnis 09-20-2019 11:47

Re: Play during freeze time
 
Something like this:
Code:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>

#define PLUGIN "Frozen"
#define VERSION "1.0"
#define AUTHOR "ronaldinho"


public plugin_init()
{
        register_plugin( PLUGIN, VERSION, AUTHOR )
       
        register_event( "HLTV", "event_new_round", "a", "1=0", "2=0" )
}
public event_new_round()
{
        set_task( 0.1, "froze_them" )
}
public froze_them()
{
        for( new id = 1; id <= get_maxplayers(); id++ )
        {
                if( !is_user_connected( id ) )
                        continue
               
                remove_task( id + 333 )
               
                set_pev( id, pev_flags, pev( id, pev_flags) | FL_FROZEN )
               
                set_task( 30.0, "unfreeze", id + 333 )
        }
}
public unfreeze( task )
{
        new id = task - 333
        set_pev( id, pev_flags, pev( id, pev_flags ) & ~FL_FROZEN )
}
public client_disconnect( id )
{
        remove_task( id + 333 )
}

if you are using 1.8.3 / 1.9.0 use client_disconnected( id )

EFFx 09-20-2019 20:09

Re: Play during freeze time
 
http://www.amxmod.net/forum/showthread.php?tid=246

JocAnis 09-20-2019 20:57

Re: Play during freeze time
 
Then i totally missunderstood the request lol


All times are GMT -4. The time now is 17:23.

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