Raised This Month: $ Target: $400
 0% 

Plugin Help Request - Adv. Train


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
tsilenzio
Junior Member
Join Date: Jul 2005
Old 07-05-2006 , 17:30   Plugin Help Request - Adv. Train
Reply With Quote #1

Hello, I had a few questions that i need help with before I actally release my plugin. Anyone who can / will help me, it will be very much appricaited! (This is all for Counter-strike, and CS only)

I need to determine if a player was hurt by falling, or anything else (as in like being on fire), but not by being hurt from another player

this is how i determine most of my things right now:
Code:
new weapon, bodypart, attacker = get_user_attacker(id,weapon,bodypart)

	if (attacker == 0)
		return PLUGIN_CONTINUE
	
	if (attacker == id && weapon == 0)
		return PLUGIN_CONTINUE
I thought that possibly one of those would be it. Can someone help me to dertmine if the client got hurt from falling



Problem number 2 is would anyone know a command or way to throw a body backwards when trying to "fake" ones death, but it sohuld have been a headshot? For example, i shot you in the head, and i faked your death because you still lived, however it didn't throw you back a few meters like it would if it was a real headshot, is there a way to throw a players head back? And have their leg twitch for half a second. (If you dont understand this part just say so please)


And for the last problem, how could i determine if someone joined a team (and is alive) in the middle of the round, after it started?)

Thank you once again, if you reply you dont have to answer all the ?'s just one would make me happy! (also if my grammer or explantion of anything confuses you please post back and I will make it alot more clear!)
tsilenzio is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 07-06-2006 , 09:28   Re: Plugin Help Request - Adv. Train
Reply With Quote #2

For the first one, you want to check

Code:
if(attacker)    return PLUGIN_CONTINUE

because the attacker will always be worldspawn if they fell (index 0)

Also, for the headshot thing, you can get the origins of both players and then subtract the attacker's origin from the victim's origin, multiply the vector by -1, add a few units to the z axis, then set the victim's velocity to that.

For the "make his head fall back" part, there's probably a sequence somewhere for that. You'll have to load up HL model viewer because I don't know any of the sequences off the top of my head. But to actually implement it,

Code:
entity_set_int(id,EV_INT_sequence,num)
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
tsilenzio
Junior Member
Join Date: Jul 2005
Old 07-06-2006 , 11:12   Re: Plugin Help Request - Adv. Train
Reply With Quote #3

Ah thank you so much!
tsilenzio 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 08:06.


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