AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Player contact (https://forums.alliedmods.net/showthread.php?t=206514)

GuskiS 01-23-2013 11:47

Player contact
 
How can I get if player has contact(hits with body) other player?

Torge 01-23-2013 12:41

Re: Player contact
 
Quote:

Originally Posted by GuskiS (Post 1878703)
How can I get if player has contact(hits with body) other player?

You mean touching?

GuskiS 01-23-2013 15:23

Re: Player contact
 
Yea, but not with knife or anything like that.

Podarok 01-23-2013 15:53

Re: Player contact
 
Uzraksti @ skype : leoalex777

EDIT : Izmanto pfn_touch vai register_touch

Torge 01-23-2013 15:58

Re: Player contact
 
This?

PHP Code:

#include <amxmodx>
#include <fakemeta>

public plugin_init()
{
    
register_forward(FM_Touch"fw_Touch");
}

public 
fw_Touch(enttouched)
{
    new 
szClassname[32];
    
pev(entpev_classnameszClassnamecharsmax(szClassname));
    
    if (
equal(szClassname"player"))
    {
        
// do something
    
}



GuskiS 01-23-2013 17:29

Re: Player contact
 
Thanks guys, the thing I have been looking :)
Paldies.


All times are GMT -4. The time now is 20:30.

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