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

Hulk self immune


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
brN17
Junior Member
Join Date: Mar 2022
Old 05-04-2022 , 12:03   Hulk self immune
Reply With Quote #1

Hello, simple question, are there a way to make Hulk only stun and screen shake enemy players?

I assume there's something related with this part of the code:

Code:
		pev(id, pev_origin, userOrigin)

		new players[SH_MAXSLOTS]
		new playerCount, player
		get_players(players, playerCount, "ah")

		for ( new i = 0; i < playerCount; i++ ) {
			player = players[i]

			if ( player == id || idTeam != cs_get_user_team(player) ) {
				pev(player, pev_origin, victimOrigin)

				distanceBetween = get_distance_f(userOrigin, victimOrigin)

				if ( distanceBetween < hulkRadius ) {
					sh_set_stun(player, hulkStunTime, hulkStunSpeed)
					sh_screen_shake(player, 4.0, (hulkStunTime + 1.0), 8.0)
				}
			}
		}
brN17 is offline
mlje0308
New Member
Join Date: Nov 2010
Location: Denmark
Old 05-06-2022 , 16:53   Re: Hulk self immune
Reply With Quote #2

Code:
if ( player == id || idTeam != cs_get_user_team(player) )
should be

Code:
if ( idTeam != cs_get_user_team(player) )
mlje0308 is offline
brN17
Junior Member
Join Date: Mar 2022
Old 05-07-2022 , 00:48   Re: Hulk self immune
Reply With Quote #3

thanks that worked
brN17 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 10:51.


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