AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to *check* if player is touched something? (https://forums.alliedmods.net/showthread.php?t=221224)

vip-colgate 07-19-2013 12:24

How to *check* if player is touched something?
 
Is it possible to check if player is touched something?
Just like this. . .
Code:

IsTouched( player, touched )
But I can not find a similar function.

Does anyone know ways to check?

Thanks in advance.

avril-lavigne 07-19-2013 15:20

Re: How to *check* if player is touched something?
 
entity to entity = pfn_touch

if just player use this my small plugin for admins


PHP Code:

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_touch("player","player","function")
}

public function(
player1,player2) {
           if(
cs_get_user_team(player1) != cs_get_user_team(player2)) return
           if(
get_user_flags(player1) & ADMIN_RESERVATION)
           
user_slap(player2,1)



if player is touching an admin, he is slapping with 1 dmg.


All times are GMT -4. The time now is 06:21.

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