Raised This Month: $ Target: $400
 0% 

Play during freeze time


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
JocAnis
Veteran Member
Join Date: Jun 2010
Old 09-20-2019 , 11:47   Re: Play during freeze time
Reply With Quote #1

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 )
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)
JocAnis 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 17:23.


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