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

Don_t understand ...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Miew
Member
Join Date: Jan 2014
Old 05-09-2014 , 09:20   Don_t understand ...
Reply With Quote #1

i don't understand why does not work ; i dont have any error message ...
PHP Code:
HookEnt()
{
    new 
EntIndex = -1;
    
    do{
        
HookSingleEntityOutput(EntIndex"OnTouching"OnEntityOutPutfalse);
    }
    while((
EntIndex FindEntityByClassname(EntIndex "func_rotating")) != -&& Isinzone(EntIndex));
}

public 
OnEntityOutPut(const String:output[], calleractivatorFloat:delay)
{
    
PrintToChat(activator,"Close!");


Last edited by Miew; 05-09-2014 at 09:22.
Miew is offline
GsiX
gee, six eggs
Join Date: Aug 2012
Location: Land Below The Wind
Old 05-09-2014 , 15:36   Re: Don_t understand ...
Reply With Quote #2

Quote:
Isinzone(EntIndex)
is outzone?

More code maybe..
__________________
If i happen to insulted you unintentionally,
it was me and Google Translate who did it.
GsiX is offline
Miew
Member
Join Date: Jan 2014
Old 05-09-2014 , 16:46   Re: Don_t understand ...
Reply With Quote #3

The event not fire --" isinzone is correct
Miew is offline
Miew
Member
Join Date: Jan 2014
Old 05-09-2014 , 17:20   Re: Don_t understand ...
Reply With Quote #4

PHP Code:
#pragma semicolon 1 
  
#include <sourcemod> 
#include <sdktools> 
#include <morecolors> 

new String:Map_Name[55];

public 
Plugin:myinfo = { 
    
name "tesla"
    
author "Skuzy"
    
description ""
    
url "" 
};

public 
OnPluginStart()
{
    
HookEvent("round_start"OnRoundStart_CB);
}

public 
OnMapStart() 
{
    
GetCurrentMap(Map_Namesizeof(Map_Name));


public 
Action:OnRoundStart_CB(Handle:event, const String:name[], bool:dontBroadcast)
{    
    if(
StrEqual("surf_pyramidduel2",Map_Name,false))
    {
        
DELETE();
        
HookEnt();
    }
}

DELETE()
{
    
decl String:SortiePyra[64];
    for(new 
i=GetMaxClients();i<=GetMaxEntities();i++)
    {
        if(
IsValidEdict(i) && IsValidEntity(i))
        {
            
GetEdictClassname(iSortiePyrasizeof(SortiePyra));
            if(
StrContains(SortiePyra,"trigger_teleport")!=-&& Isinzone(i))
            {
                
AcceptEntityInput(i,"kill");
                
CPrintToChatAll("{blue}l'accès à la zone de gravité a été bloqué !");
            }
        }
    }
}

HookEnt()
{
    new 
EntIndex = -1;
    
    do{
        
HookSingleEntityOutput(EntIndex"OnTouching"OnEntityOutPutfalse);
        
HookSingleEntityOutput(EntIndex"OnTouchedByEntity"OnEntityOutPutfalse);
    }
    while((
EntIndex FindEntityByClassname(EntIndex "func_rotating")) != -&& Isinzone(EntIndex));
}

public 
OnEntityOutPut(const String:output[], calleractivatorFloat:delay)
{
    
PrintToChat(activator,"Close!");
}  

stock bool:Isinzone(i)
{
    new 
Float:v[3];
    
GetEntPropVector(iProp_Send"m_vecOrigin"v);
    if (
v[0] >= -12920.491211
        
&& v[0] <= -9156.031250 
        
&& v[1] >= -769.758667 
        
&& v[1] <= 1775.133057 
        
&& v[2] >= 14405.568359
        
&& v[2] <= 15675.418945)return true;
    else
        return 
false;

Miew is offline
KissLick
Veteran Member
Join Date: Nov 2012
Location: void
Old 05-09-2014 , 19:16   Re: Don_t understand ...
Reply With Quote #5

func_rotating doesn't have output OnTouching or OnTouchedByEntity (Source SDK)
KissLick is offline
rodrigo286
Veteran Member
Join Date: Sep 2010
Location: Brazil, São Paulo
Old 05-09-2014 , 21:17   Re: Don_t understand ...
Reply With Quote #6

Create a trigger and let it run to the door and use it to open.

Regards.
__________________
My Plugins | VIEW HERE | I accept private requests, send me a PM.
Buy respawn | Uber Recall | Grenade drop | Damage Supperssor
Meet the Medic | Disguise Expert | Crazy Jet

CZSBrasil TEAM
rodrigo286 is offline
Reply


Thread Tools
Display Modes

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 06:49.


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