Raised This Month: $ Target: $400
 0% 

How to detect when a T is standing on a CT


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 06-30-2010 , 06:32   How to detect when a T is standing on a CT
Reply With Quote #1

Hello,

can somebody tell me, how to detect ( if......) when a Terrorist is standing on the head of a CT?

I have to do this in the takedamage event, so you can use iVictim(T) and IAttacker(CT)

I want do kill the CT when he shots on the T when the T is standing on his head. U understand?
__________________
Quote:
#define true ((rand() % 2)? true: false) //Happy debugging suckers
mottzi is offline
Send a message via MSN to mottzi
Ryokin
Senior Member
Join Date: Jan 2010
Old 06-30-2010 , 08:25   Re: How to detect when a T is standing on a CT
Reply With Quote #2

get origin both player and you hook the distance between t and ct origin[2]
__________________
NH4CL + NaOH -> NH3 + H2O + NaCL
Ryokin is offline
minimiller
Veteran Member
Join Date: Aug 2007
Location: United Kingdom
Old 06-30-2010 , 09:10   Re: How to detect when a T is standing on a CT
Reply With Quote #3

you can use something like this
PHP Code:
new CsTeams:iTeamiStoodOn;

iTeam cs_get_user_team(id);
iStoodOn pev(idpev_groundentity);

if(
iStoodOn get_maxplayers)
{
    if(
iTeam != cs_get_user_team(iStoodOn))
    {
         
//id is stood on a player who is on the opposite team
    
}

untested
__________________
minimiller is offline
Send a message via MSN to minimiller
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 14:47.


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