Raised This Month: $ Target: $400
 0% 

Spectator Bug


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
driger38
Senior Member
Join Date: Apr 2011
Old 02-09-2016 , 09:11   Spectator Bug
Reply With Quote #1

Player is alive in either CT or T. He chooses to GO SPECTATOR, player gets to be joined spectator team. BUT he stays alive as in spec team (can kill CT/T, can be killed also).
the line that should kill him in plugin is :

Code:
		case 4:
		{
			if( is_user_alive( id ) )
			{
				client_cmd( id, "kill" )
				cs_set_user_deaths( id, cs_get_user_deaths( id ) - 1 )
				fm_set_user_frags( id, get_user_frags( id ) + 1 )
			}
			cs_set_user_team( id, CS_TEAM_SPECTATOR, CS_DONTCHANGE )
		}
	}
The part where he is supposed to DIE while going spec team wont function, Any help pls?
driger38 is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 02-09-2016 , 09:18   Re: Spectator Bug
Reply With Quote #2

replace client_cmd(id,"kill") with user_kill(id)

client cmd is considered as slowhacking and is being blocked by client guard.
siriusmd99 is offline
driger38
Senior Member
Join Date: Apr 2011
Old 02-09-2016 , 09:24   Re: Spectator Bug
Reply With Quote #3

it is not intentional, i swear. I try change now, Thanks.




THANK YOU VERY MUCH, IT WORKED


I appreciate for the fast response

Last edited by driger38; 02-09-2016 at 09:27. Reason: #TESTED the recommendation
driger38 is offline
driger38
Senior Member
Join Date: Apr 2011
Old 02-09-2016 , 09:32   Re: Spectator Bug
Reply With Quote #4

Code:
engclient_cmd(id, "joinclass", "5")
is that slowhacking also? the thing is that it should join the Team but plugin should put him in team without him getting to choose what class to join.
driger38 is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 02-09-2016 , 10:11   Re: Spectator Bug
Reply With Quote #5

No it's not
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
driger38
Senior Member
Join Date: Apr 2011
Old 02-09-2016 , 10:30   Re: Spectator Bug
Reply With Quote #6

but then it shoud automatically join class 5 right? right now i still must use what class i need to use, How to change that. It is in both sides if i am joining from SPEC team, not while connecting
driger38 is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 02-09-2016 , 10:33   Re: Spectator Bug
Reply With Quote #7

no, dont use engclient_cmd, use :
cs_set_user_team( id, CS_TEAM_SPECTATOR )
siriusmd99 is offline
driger38
Senior Member
Join Date: Apr 2011
Old 02-09-2016 , 12:22   Re: Spectator Bug
Reply With Quote #8

Code:
if (cs_get_user_team(id)==CS_TEAM_CT)
			{
				new iMsgBlock = get_msg_block(114);
				set_msg_block(114, BLOCK_SET);
				engclient_cmd(id, "jointeam", "1") 
				engclient_cmd(id, "joinclass", "5") 
				set_msg_block(114, iMsgBlock)
Which line needs to be edited so he joins CT without getting a chance to choose a ćlass, but gets decided randomly (server has one model for every class, so i dont need them to choose class)
driger38 is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 02-09-2016 , 14:27   Re: Spectator Bug
Reply With Quote #9

just use this :

PHP Code:
case 4//Case 'Go spectate'
        
{
            if( 
is_user_aliveid ) )
            {
                
user_kill(id)
                
cs_set_user_deathsidcs_get_user_deathsid ) - )
                
fm_set_user_fragsidget_user_fragsid ) + )
            }
            
cs_set_user_teamidCS_TEAM_SPECTATORCS_DONTCHANGE )
        } 
siriusmd99 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 22:27.


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