Raised This Month: $51 Target: $400
 12% 

Is touching trigger?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Snaggle
AlliedModders Donor
Join Date: Jul 2010
Location: England
Old 11-04-2015 , 11:30   Is touching trigger?
Reply With Quote #1

How can I confirm if a player is touching a trigger when they use a command? I basically want to allow certain commands to be used only in certain areas. I have a trigger in each area that I want the plugin to check a player is touching, before it allows them to use a command.
Snaggle is offline
Phil25
AlliedModders Donor
Join Date: Feb 2015
Old 11-04-2015 , 15:42   Re: Is touching trigger?
Reply With Quote #2

PHP Code:
new ent_zone = -1;
while((
ent_zone FindEntityByClassname(ent_zone"trigger_multiple")) != INVALID_ENT_REFERENCE){

    
decl String:zone_name[32];
    
GetEntPropString(ent_zoneProp_Data"m_iName"zone_namesizeof(zone_name));
    
    if(
StrEqual(zone_name"[The Name]")){
        
HookSingleEntityOutput(ent_zone"OnStartTouch"ZoneOnStartTouch);
        
HookSingleEntityOutput(ent_zone"OnEndTouch"ZoneOnEndTouch);
    }


Just be mindful of this.
Phil25 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 22:05.


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