AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [SOLVED]How to use this native (https://forums.alliedmods.net/showthread.php?t=171119)

Snaker beatter 11-02-2011 01:43

[SOLVED]How to use this native
 
how to get the id of the attacker on this native get_user_attacker.

example: get_user_team(victim) == attacker

fysiks 11-02-2011 02:33

Re: How to use this native
 
What do you mean? get_user_attacker() returns the id of the attacker.

Check the funcwiki before posting any question about a native or other function.

http://www.amxmodx.org/funcwiki.php?..._att&go=search

Snaker beatter 11-02-2011 03:00

Re: How to use this native
 
Quote:

Originally Posted by fysiks (Post 1588229)
What do you mean? get_user_attacker() returns the id of the attacker.

Check the funcwiki before posting any question about a native or other function.

http://www.amxmodx.org/funcwiki.php?..._att&go=search

I din't understand this native so i go here

JoKeR LauGh 11-02-2011 03:10

Re: How to use this native
 
http://www.amxmodx.org/funcwiki.php?go=func&id=159

get_user_team - Returns the id of a team.

get_user_attacker - Returns the index of an attacking player.

Doc-Holiday 11-02-2011 03:56

Re: How to use this native
 
In your example
PHP Code:

if(get_user_team(iVictim) == get_user_team(iAttacker)
{
     
//Both on same team.



Snaker beatter 11-02-2011 07:30

Re: How to use this native
 
Quote:

Originally Posted by JoKeR LauGh (Post 1588240)
http://www.amxmodx.org/funcwiki.php?go=func&id=159

get_user_team - Returns the id of a team.

get_user_attacker - Returns the index of an attacking player.

Quote:

Originally Posted by Doc-Holiday (Post 1588251)
In your example
PHP Code:

if(get_user_team(iVictim) == get_user_team(iAttacker)
{
     
//Both on same team.



should be like this? get_user_attacker(victim) == attacker???

Dark Style 11-02-2011 07:57

Re: How to use this native
 
Code:

if(get_user_attacker(idvictim) == idattacker)
{
}


Snaker beatter 11-02-2011 11:01

Re: How to use this native
 
Thanks :)

__________

The zp plugin advaced antidote gun uses:

PHP Code:

get_user_attacker(victimweapid)

if (
weapid == csw_scout)
{
        
zp_disinfect_user(id)




All times are GMT -4. The time now is 14:18.

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