Raised This Month: $32 Target: $400
 8% 

fattal error pf_message_begin


Post New Thread Reply   
 
Thread Tools Display Modes
tolpecek
Member
Join Date: Dec 2018
Old 12-31-2018 , 04:40   Re: fattal error pf_message_begin
Reply With Quote #11

guys i still need help
defines:
Code:
new gmsgStatusText, gmsgSayText, gmsgScreenFade, gmsgScreenShake, g_iMsgSayText
plugin_init
Code:
register_event("ScreenFade","ev_Flash","b","4=255","5=255","6=255","7>199")
	gmsgSayText = get_user_msgid("SayText")
	gmsgStatusText = get_user_msgid("StatusText");
	gmsgScreenFade = get_user_msgid("ScreenFade");
	gmsgScreenShake = get_user_msgid ("ScreenShake")
	gmsgShake = get_user_msgid("ScreenShake")
	g_iMsgSayText 	= get_user_msgid("SayText")
all functions with mesage_begin..

Code:
print_color(target, const message[], any:...)
{
	static buffer[512], i, argscount
	argscount = numargs()
	
	// Send to everyone
	if (!target)
	{
		static player
		for (player = 1; player <= g_MaxPlayers; player++)
		{
			if (!g_isconnected[player])
				continue;

			static changed[5], changedcount
			changedcount = 0

			for (i = 2; i < argscount; i++)
			{
				if (getarg(i) == LANG_PLAYER)
				{
					setarg(i, 0, player)
					changed[changedcount] = i
					changedcount++
				}
			}
			vformat(buffer, charsmax(buffer), message, 3)

			message_begin(MSG_ONE_UNRELIABLE, gmsgSayText, _, player)
			write_byte(player)
			write_string(buffer)
			message_end();
			
			for (i = 0; i < changedcount; i++)
				setarg(changed[i], 0, LANG_PLAYER)
		}
	}
	// Send to specific target
	else
	{
		vformat(buffer, charsmax(buffer), message, 3)

		message_begin(MSG_ONE, gmsgSayText, _, target)
		write_byte(target)
		write_string(buffer)
		message_end();
	}
}
Code:
public ScreenFade_Item(id)
{
	new players[32], num
	get_players(players, num);
	
	for(--num; num>=0; num--)
	{
		//message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, id);
		message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("ScreenFade"), {0,0,0}, players[num]);
		write_short(4096*10);    // Duration
		write_short(4);    // Hold time 4096*2
		write_short(4096);    // Fade type
		write_byte(0);        // Red
		write_byte(0);        // Green
		write_byte(255);        // Blue
		write_byte(80);    // Alpha
		message_end();
	}	
	return PLUGIN_HANDLED
}
Code:
public ScreenFade_Stat(id)
{
	new players[32], num
	get_players(players, num);
	
	for(--num; num>=0; num--)
	{
		//message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, id);
		message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("ScreenFade"), {0,0,0}, players[num]);
		write_short(4096*10);    // Duration
		write_short(4);    // Hold time 4096*2
		write_short(4096);    // Fade type
		write_byte(255);        // Red
		write_byte(255);        // Green
		write_byte(0);        // Blue
		write_byte(80);    // Alpha
		message_end();
	}	
	return PLUGIN_HANDLED
}
Code:
public ScreenFade_Zariche(id)
{
	new players[32], num
	//get_players(players, num, "ace", "CT")
	get_players(players, num);

	new shakeAmplitude = __FixedUnsigned16(SHAKE_AMPLITUDE, 1<<12)
	new shakeDuration  = __FixedUnsigned16(SHAKE_DURATION, 1<<12)
	new shakeFrequency = __FixedUnsigned16(SHAKE_FREQUENCY, 1<<9)

	for(--num; num>=0; num--)
	{
		message_begin(MSG_ONE, gmsgShake, .player = players[num])
		write_short( shakeAmplitude )  // shake amount.
		write_short( shakeDuration )   // shake lasts this long.
		write_short( shakeFrequency )  // shake noise frequency.
		message_end();


		message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, players[num]);
		write_short(4096*10);    // Duration
		write_short(4);    // Hold time 4096*2
		write_short(4096);    // Fade type
		write_byte(0);        // Red
		write_byte(0);        // Green
		write_byte(0);        // Blue
		write_byte(255);    // Alpha
		message_end();
		}	
	return PLUGIN_HANDLED
}
Code:
public ScreenFade_Apokalypsa(id)
{
	new players[32], num
	get_players(players, num);
	
	new shakeAmplitude = __FixedUnsigned16(SHAKE_AMPLITUDE, 1<<12)
	new shakeDuration  = __FixedUnsigned16(SHAKE_DURATION, 1<<12)
	new shakeFrequency = __FixedUnsigned16(SHAKE_FREQUENCY, 1<<8)
	
	for(--num; num>=0; num--)
	{
		message_begin(MSG_ONE_UNRELIABLE, gmsgShake, .player = players[num])
		write_short( shakeAmplitude ); // shake amount.
		write_short( shakeDuration );   // shake lasts this long.
		write_short( shakeFrequency ); // shake noise frequency.
		message_end();
		
		message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("ScreenFade"), {0,0,0}, players[num]);
		write_short(4096*10);    // Duration
		write_short(4);    // Hold time 4096*2
		write_short(4096);    // Fade type
		write_byte(0);        // Red
		write_byte(0);        // Green
		write_byte(0);        // Blue
		write_byte(255);    // Alpha
		message_end();
	}
	return PLUGIN_HANDLED;
}
Code:
stock ChatColor(const id, const input[], any:...)
{
	new count = 1, players[32]
	static msg[191]
	vformat(msg, 190, input, 3)
	
	replace_all(msg, 190, "!g", "^4") // Green Color
	replace_all(msg, 190, "!y", "^1") // Default Color
	replace_all(msg, 190, "!team", "^3") // Team Color


	if (id) players[0] = id; else get_players(players, count, "ch")
	{
		for (new i = 0; i < count; i++)
		{
			if (is_user_connected(players[i]))
			{
				message_begin(MSG_ONE_UNRELIABLE, g_iMsgSayText, _, players[i])  
				write_byte(players[i]);
				write_string(msg);
				message_end();
			}
		}
	}
}
Code:
stock color_chat( const id, const szStr[], any:... ) 
{
	new szMsg[ 191 ], iPlayers[ 32 ], iCount = 1;
	
	vformat( szMsg, sizeof szMsg - 1, szStr,  3)
	
	replace_all( szMsg, 190, "!g", "^4" )
	replace_all( szMsg, 190, "!y", "^1" )
	replace_all( szMsg, 190, "!t", "^3" )
	
	if( id )
		iPlayers[ 0 ] = id;
	else get_players( iPlayers, iCount, "ch" )
		
	for( new i = 0 ; i < iCount ; i++ )
	{
		if( is_user_connected( iPlayers[ i ] ) )
		{
			message_begin( MSG_ONE_UNRELIABLE, get_user_msgid( "SayText" ), _, iPlayers[ i ] )
			write_byte( iPlayers[ i ] )
			write_string( szMsg )
			message_end();
		}
	}
}
Code:
public effects(id) {
	set_hudmessage(255,150,50, -1.0, 0.65, 0, 6.0, 1.5,0.1,0.7) // HUDMESSAGE
	show_hudmessage(id,"Bol si odseknuty") // HUDMESSAGE
	message_begin(MSG_ONE_UNRELIABLE,105,{0,0,0},id )      
	write_short(1<<10)   // fade lasts this long duration
	write_short(1<<10)   // fade lasts this long hold time
	write_short(1<<1)   // fade type (in / out)
	write_byte(20)            // fade red
	write_byte(255)    // fade green
	write_byte(255)        // fade blue
	write_byte(255)    // fade alpha
	message_end();
	client_cmd(id,"spk fvox/blip.wav")
}
Code:
public ev_Flash(id)
{
	if (!g_iszombie[id])
	{
		message_begin(MSG_ONE, gmsgScreenFade, {0,0,0}, id)
		write_short(1)
		write_short(1)
		write_short(1)
		write_byte(0)
		write_byte(0)
		write_byte(0)
		write_byte(255)
		message_end();
	}
	else if (g_iszombie[id])
	{	
		client_cmd(id, "mp3 play sound/%s", g_Concussion)
		
		new Float:fadetime = 5.0, fade
		fade = clamp(floatround(fadetime * float(1<<12)), 0, 0xFFFF);
		
		g_isconcussioned[id] = true
		set_task(fadetime, "Remove_Conc_Effects", CONCUSSION_TASK+id)
		
		message_begin(MSG_ONE,gmsgScreenFade,{0,0,0},id) 
		write_short( fade ) 
		write_short( 1<<10 )
		write_short( 1<<12 )
		write_byte( 255 ) 
		write_byte( 255 ) 
		write_byte( 255 ) 
		write_byte( 200 ) 
		message_end();
		
		new Float:fVec[3];
		fVec[0] = random_float(PA_LOW , PA_HIGH);
		fVec[1] = random_float(PA_LOW , PA_HIGH);
		fVec[2] = random_float(PA_LOW , PA_HIGH);
		entity_set_vector(id , EV_VEC_punchangle , fVec);
		message_begin(MSG_ONE , gmsgScreenShake , {0,0,0} ,id)
		write_short( 1<<14 );
		write_short( fade );
		write_short( 1<<14 );
		message_end();
	}
}
tolpecek is offline
tolpecek
Member
Join Date: Dec 2018
Old 12-31-2018 , 21:29   Re: fattal error pf_message_begin
Reply With Quote #12

so i made a command that runs all of the functions including message_begin except stocks, nothing drop :/

i think that it crashes because i have vip plugin with message_begin and main plugin with message_begin, and sometimes happened that i had written to the chat and and the same time function with message_begin had been called and server crashed :/ :/ any idea?

Code:
		if(equali(arg1, "/messagebegin"))
			{
					ev_Flash(id)
					ScreenFade_Apokalypsa(id)
					ScreenFade_Item(id)
					ScreenFade_Stat(id)
					ScreenFade_Zariche(id)
					effects(id)

			}
tolpecek is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 01-01-2019 , 07:10   Re: fattal error pf_message_begin
Reply With Quote #13

Simply rent a tech if you dont know what are you doing.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
marcelowzd
Senior Member
Join Date: Feb 2011
Location: São Paulo, Brazil
Old 01-01-2019 , 07:27   Re: fattal error pf_message_begin
Reply With Quote #14

First of all, i saw you also are getting IndexOfEdict, to fix this change in BaseBuilder core

PHP Code:
register_forwardFM_TraceLine"WhateverName" )
// To -->
register_forwardFM_TraceLine"WhateverName"); 
Maybe if you do this the rest gets fixed, this error is a pain. If not, do this and report back.
__________________

Last edited by marcelowzd; 01-01-2019 at 07:27.
marcelowzd is offline
tolpecek
Member
Join Date: Dec 2018
Old 01-01-2019 , 13:57   Re: fattal error pf_message_begin
Reply With Quote #15

Quote:
Originally Posted by marcelowzd View Post
First of all, i saw you also are getting IndexOfEdict, to fix this change in BaseBuilder core

PHP Code:
register_forwardFM_TraceLine"WhateverName" )
// To -->
register_forwardFM_TraceLine"WhateverName"); 
Maybe if you do this the rest gets fixed, this error is a pain. If not, do this and report back.

i find out that if i delete from message_begin message end, it gives PF_MessageBegin_I: New message started when msg '98' has not been sent yet. so i think msg "99" and msg "66" are different errors.
tolpecek is offline
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 01-01-2019 , 14:17   Re: fattal error pf_message_begin
Reply With Quote #16

Quote:
Originally Posted by tolpecek View Post
i find out that if i delete from message_begin message end, it gives PF_MessageBegin_I: New message started when msg '98' has not been sent yet. so i think msg "99" and msg "66" are different errors.
THAT IS MESSAGE ID, Number of message which are you sending,

CS 1.6 MESSAGES
Spoiler
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM

Last edited by Ghosted; 01-01-2019 at 14:17.
Ghosted is offline
tolpecek
Member
Join Date: Dec 2018
Old 01-01-2019 , 14:34   Re: fattal error pf_message_begin
Reply With Quote #17

Quote:
Originally Posted by Ghosted View Post
THAT IS MESSAGE ID, Number of message which are you sending,

CS 1.6 MESSAGES
Spoiler
i am not sending any message with ammox or curweapon :/
only events:
Code:
register_event("CurWeapon" , "ev_CurWeapon" , "be" , "1=1");
register_event("AmmoX", "ev_AmmoX", "be", "1=1", "1=2", "1=3", "1=4", "1=5", "1=6", "1=7", "1=8", "1=9", "1=10")
Code:
public ev_CurWeapon(id) 
{     

	if(read_data(2) == CSW_KNIFE)
	{
		if(cs_get_user_team(id) == CS_TEAM_T)
		{
			set_pev(id, pev_viewmodel2, KNIFE2)
		} 
	}

	if (g_iszombie[id])
	{
		new Float:SPLevel = float(g_unSPLevel[id])
		SPLevel*=3
		set_user_maxspeed(id, 260.0+SPLevel)
	}
	else if (g_item_oma[id])
	{
		static wpnid, clip;
		wpnid = read_data(2);
		clip = read_data(3);

		if(wpnid==CSW_C4 || wpnid==CSW_KNIFE || wpnid==CSW_HEGRENADE || wpnid==CSW_SMOKEGRENADE || wpnid==CSW_FLASHBANG ) 
			return PLUGIN_HANDLED;
	
		if(!clip)
		{
			static weapname[33];
			get_weaponname(wpnid , weapname , 32);
	
			static wpn
			wpn = -1;
			while((wpn = find_ent_by_class(wpn , weapname)) != 0)
			{
				if(id == entity_get_edict(wpn , EV_ENT_owner))
				{
					cs_set_weapon_ammo(wpn , maxclip(wpnid))
					break;
				}
			}
		}
	}
	return PLUGIN_HANDLED
}
Code:
public ev_AmmoX(id)
{
	set_pdata_int(id, AMMO_SLOT + read_data(1), 200, 5)
}
tolpecek 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 23:09.


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