Raised This Month: $ Target: $400
 0% 

SetFOV and kick


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Tonda
Senior Member
Join Date: Aug 2009
Old 11-22-2010 , 11:24   SetFOV and kick
Reply With Quote #1

hi all, i have script

Code:
if (cs_get_user_team(id) == CS_TEAM_CT)
		{
		new gmsg_SetFOV 	= get_user_msgid("SetFOV");
		if(is_user_alive(id))
		{
		message_begin( MSG_ONE, gmsg_SetFOV, { 0, 0, 0 }, id );
		write_byte( 0 );
		message_end( );
		}
		}
		return PLUGIN_HANDLED;
this code remove this script

Code:
if (cs_get_user_team(id) == CS_TEAM_CT)
		{
		new gmsg_SetFOV 	= get_user_msgid("SetFOV");
		if(is_user_alive(id))
		{
		message_begin( MSG_ONE, gmsg_SetFOV, { 0, 0, 0 }, id );
		write_byte( 180 );
		message_end( );
		}
		}
		return PLUGIN_HANDLED;
But sometimes players are kicked with : Reliable channel overflowed. Why?
Tonda is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 11-22-2010 , 12:42   Re: SetFOV and kick
Reply With Quote #2

MSG_ONE -> MSG_ONE_UNRELIABLE
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Tonda
Senior Member
Join Date: Aug 2009
Old 11-23-2010 , 08:11   Re: SetFOV and kick
Reply With Quote #3

Quote:
Originally Posted by Exolent[jNr] View Post
MSG_ONE -> MSG_ONE_UNRELIABLE
Ok i try it but still kicked
Tonda is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 11-23-2010 , 08:38   Re: SetFOV and kick
Reply With Quote #4

You are sending too many messages to the player. Show your full code.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 11-23-2010 , 08:53   Re: SetFOV and kick
Reply With Quote #5

Code:
        message_begin( MSG_ONE, gmsg_SetFOV, { 0, 0, 0 }, id );         write_byte( 0 );         message_end( );
You sure that setting the player's FOV to 0 isnt the cause for reliable channel over flowed /
__________________

My Plugins For ZP

Inactive due to College and Studies
abdul-rehman is offline
Send a message via Yahoo to abdul-rehman Send a message via Skype™ to abdul-rehman
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-23-2010 , 08:57   Re: SetFOV and kick
Reply With Quote #6

Should set pdata m_iFOV instead of sending the message

Code:
#define XO_PLAYER       5 #define m_iFOV          363 SetUserFov(id, iFOV) {     set_pdata_int(id, m_iFOV, iFOV, XO_PLAYER)     set_pev(id, pev_fov, iFOV) }
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Tonda
Senior Member
Join Date: Aug 2009
Old 11-24-2010 , 09:35   Re: SetFOV and kick
Reply With Quote #7

Quote:
Originally Posted by ConnorMcLeod View Post
Should set pdata m_iFOV instead of sending the message


Code:
#define XO_PLAYER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;5</p><p>#define m_iFOV&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;363</p><p>&nbsp;</p><p>SetUserFov(id, iFOV)</p><p>{</p><p>&nbsp;&nbsp;&nbsp;&nbsp;set_pdata_int(id, m_iFOV, iFOV, XO_PLAYER)</p><p>&nbsp;&nbsp;&nbsp;&nbsp;set_pev(id, pev_fov, iFOV)</p><p>}
So, what you say, this is the same with better way ?

Code:
if (cs_get_user_team(id) == CS_TEAM_CT)
        {
        new gmsg_SetFOV     = get_user_msgid("SetFOV");
        if(is_user_alive(id))
        {
        message_begin( MSG_ONE, gmsg_SetFOV, { 0, 0, 0 }, id );
        write_byte( 0 );
        message_end( );
        }
        }
        return PLUGIN_HANDLED;
Tonda is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 11-24-2010 , 13:46   Re: SetFOV and kick
Reply With Quote #8

Quote:
Originally Posted by ConnorMcLeod View Post
Should set pdata m_iFOV instead of sending the message

Code:
#define XO_PLAYER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;5 #define m_iFOV&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;363 SetUserFov(id, iFOV) { &nbsp;&nbsp;&nbsp;&nbsp;set_pdata_int(id, m_iFOV, iFOV, XO_PLAYER) &nbsp;&nbsp;&nbsp;&nbsp;set_pev(id, pev_fov, iFOV) }
Connor, how to use that, I am trieing it like that, but it doesn't work:

PHP Code:
SetUserFov(victimget_pcvar_num(cvar)) 
bibu 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:18.


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