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

blind in blockmaker


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
itaymitay
Member
Join Date: Sep 2009
Old 11-27-2009 , 15:46   blind in blockmaker
Reply With Quote #1

what is wrong with this perm blind
Code:
actionBlind(id, bool:OverrideTimer)
{
	new Float:fTime = halflife_time();
	
	//check if player is outside of cooldown time to use the boots of speed
	if (fTime >= gfBlindNextUse[id] || OverrideTimer)
	{
		new Float:fTimeout = get_cvar_float("bm_blindtime");
		
		//set a task to remove the boots of speed after time out amount
		set_task(fTimeout, "taskBlindRemove", TASK_BLIND + id, "", 0, "a", 1);
		
		//iterate through all players
		for (new i = id; i <= id; ++i)
		{
			//make sure player is connected
			if (is_user_connected(i))
			{
				//make the screen flash for a nuke effect
				message_begin(MSG_ONE, gMsgScreenFade, {0, 0, 0}, i);
				write_short(20000);	//duration
				write_short(30000);	//hold time
				write_short(4096);	//type (in / out)
				write_byte(0);	//red
				write_byte(0);	//green
				write_byte(0);	//blue
				write_byte(0);	//alpha
				message_end();
			}
		}
		
		gfBlindTimeOut[id] = fTime + fTimeout;
		gfBlindNextUse[id] = fTime + fTimeout + get_cvar_float("bm_blindcooldown");
	}
	else
	{
		set_hudmessage(gHudRed, gHudGreen, gHudBlue, gfTextX, gfTextY, gHudEffects, gfHudFxTime, gfHudHoldTime, gfHudFadeInTime, gfHudFadeOutTime, gHudChannel);
		show_hudmessage(id, "Blind next use: %.1f", gfBlindNextUse[id] - fTime);
	}
}
and this delay blind
Code:
actionBlindDelay(id, bool:OverrideTimer)
{
	new Float:fTime = halflife_time();
	
	//check if player is outside of cooldown time to use the boots of speed
	if (fTime >= gfBlindNextUse[id] || OverrideTimer)
	{
		new Float:fTimeout = get_cvar_float("bm_blindnotime");
		
		//set a task to remove the boots of speed after time out amount
		set_task(fTimeout, "taskBlindRemove", TASK_BLIND + id, "", 0, "a", 1);
		
		//iterate through all players
		for (new i = id; i <= id; ++i)
		{
			//make sure player is connected
			if (is_user_connected(i))
			{
				//make the screen flash for a nuke effect
				message_begin(MSG_ONE, gMsgScreenFade, {0, 0, 0}, i);
				write_short(20000);	//duration
				write_short(32000);	//hold time
				write_short(4096);	//type (in / out)
				write_byte(0);	//red
				write_byte(0);	//green
				write_byte(0);	//blue
				write_byte(0);	//alpha
				message_end();
			}
		}
		
		gfBlindTimeOut[id] = fTime + fTimeout;
		gfBlindNextUse[id] = fTime + fTimeout + get_cvar_float("bm_blindnocooldown");
	}
	else
	{
		set_hudmessage(gHudRed, gHudGreen, gHudBlue, gfTextX, gfTextY, gHudEffects, gfHudFxTime, gfHudHoldTime, gfHudFadeInTime, gfHudFadeOutTime, gHudChannel);
		show_hudmessage(id, "Blind next use: %.1f", gfBlindNextUse[id] - fTime);
	}
}
itaymitay is offline
Old 11-28-2009, 16:57
kikifrh
This message has been deleted by kikifrh.
DeMoN
Junior Member
Join Date: Jul 2008
Old 12-11-2009 , 18:01   Re: blind in blockmaker
Reply With Quote #2

Code:
write_byte(0);    //alpha
Change To
Code:
write_byte(255);    //alpha

Last edited by DeMoN; 12-11-2009 at 18:16.
DeMoN 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 16:03.


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