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

Block VIP player? (Assassination Mode)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SkumTomteN
Veteran Member
Join Date: Oct 2013
Location: Asgard
Old 07-27-2018 , 16:53   Block VIP player? (Assassination Mode)
Reply With Quote #1

Is it possible to block/override or change the vip player in assassination mode? (as_)

cs_set_user_vip does not change vip status internally, only visually.

I want to block vip for bots.
__________________
Contact: Steam
Videos: Youtube
SkumTomteN is offline
E1_531G
Senior Member
Join Date: Dec 2017
Old 07-27-2018 , 18:08   Re: Block VIP player? (Assassination Mode)
Reply With Quote #2

Take a look on Objective Reset by HamletEagle.
__________________
My English is A0
E1_531G is offline
SkumTomteN
Veteran Member
Join Date: Oct 2013
Location: Asgard
Old 07-27-2018 , 18:49   Re: Block VIP player? (Assassination Mode)
Reply With Quote #3

Quote:
Originally Posted by E1_531G View Post
Take a look on Objective Reset by HamletEagle.
Can it be done without orpheu?

HTML Code:
		case Obj_ResetVip:
		{
			new Players[32], Num
			get_players(Players, Num, "ae", "CT")
			
			if(Num > 1)
			{
				new OldVip = get_gamerules_data("m_pVIP")
				
				if(is_user_alive(OldVip) && !get_pdata_bool(OldVip, m_bEscaped))
				{
					//RemoveCurrentVIP does not fix the score attrib and armor
					message_begin(SendReliableMessages ? MSG_ALL : MSG_BROADCAST, gmsgScoreAttrib)
					{
						write_byte(OldVip)
						write_byte(0)
						message_end()
					}
					
					cs_set_user_armor(OldVip, 100, CS_ARMOR_KEVLAR)
					cs_set_user_bpammo(OldVip, CSW_USP, 24)
					cs_set_weapon_ammo(find_ent_by_owner(-1, "weapon_usp", OldVip), 12)
					
					/*
						|	The function will choose the next vip and reset the current one if this offset is above 2.
						|   We force that by altering the offset.
						|	I don't like much that, but there is no other way. Also, I believe it won't fuck up something
						|	The offset is immediately resetted to 0 and increased. This is default game behaviour.
					*/
					
					set_gamerules_data("m_iConsecutiveVip", 3)
					
					SendHookableCalls ?
						OrpheuCallSuper(HandleHooks[PickNextVip], g_pGameRules) : 
						OrpheuCall(HandleHooks[PickNextVip], g_pGameRules)
						
					set_gamerules_data("m_iConsecutiveVip", get_gamerules_data("m_iConsecutiveVip") + 1)
					
					new NewVip = get_gamerules_data("m_pVIP")
					
					if(1 <= NewVip <= MaxPlayers)
					{
						SendHookableCalls ?
							ExecuteHamB(Ham_CS_RoundRespawn, NewVip) :
							ExecuteHam(Ham_CS_RoundRespawn, NewVip)
						
						SuccesfullReset = true
					}
				}
			}
		}
__________________
Contact: Steam
Videos: Youtube

Last edited by SkumTomteN; 07-27-2018 at 18:54.
SkumTomteN 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 15:29.


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