AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [SOLVED] func_escapezone (https://forums.alliedmods.net/showthread.php?t=237659)

wTf. 03-28-2014 05:05

[SOLVED] func_escapezone
 
PHP Code:

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
RegisterHam(Ham_Touch"func_escapezone""FwdTouchEscapezone")
}
public 
FwdTouchEscapezone(entid) {
    if(
is_user_alive(id) && g_vip[id]) {
        new 
players[32], inumtempid
        get_players
(players,inum,"aeh","TERRORIST")
        for(new 
i;i<inum;i++) {
            
tempid players[i]
            
            
user_kill(tempid1)
        }
    }
    return 
HAM_IGNORED


When it comes to vip escape zone team get killed all the terrorists.

minato 03-28-2014 13:31

Re: func_escapezone
 
you can be more specific

what's the problem?

does not work?

wTf. 03-29-2014 05:45

Re: func_escapezone
 
Yes, does not work.

T team doesn't die, vip player is coming to in the escape zone

minato 03-29-2014 15:24

Re: func_escapezone
 
PHP Code:

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_forward(FM_Touch"clientTouch");
}

public 
clientTouchpd pi
{
    new class[
64];
    
pev(pd,pev_classname, class, charsmax(class));
    
    if( 
is_user_alive(pi)  && g_vip[pi] )
    {
        if( 
equal(class, "func_escapezone")  || equal(class,"func_vip_safetyzone") )
        {
                new 
players[32], inumtempid
                get_players
(players,inum,"aeh","TERRORIST")
                
                for (new 
0inumi++)
                {
                        
// this not be executed if not there terrorists is online
                        
tempid players[i]
                        
user_silentkill(tempid);
                         
                }
        }
    }
    return 
FMRES_IGNORED;



wTf. 03-29-2014 16:12

Re: func_escapezone
 
Thnx :)

simanovich 03-30-2014 04:25

Re: func_escapezone
 
Quote:

Originally Posted by minato (Post 2117575)
PHP Code:

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_forward(FM_Touch"clientTouch");
}

public 
clientTouchpd pi
{
    new class[
64];
    
pev(pd,pev_classname, class, charsmax(class));
    
    if( 
is_user_alive(pi)  && g_vip[pi] )
    {
        if( 
equal(class, "func_escapezone")  || equal(class,"func_vip_safetyzone") )
        {
                new 
players[32], inumtempid
                get_players
(players,inum,"aeh","TERRORIST")
                
                for (new 
0inumi++)
                {
                        
// this not be executed if not there terrorists is online
                        
tempid players[i]
                        
user_silentkill(tempid);
                         
                }
        }
    }
    return 
FMRES_IGNORED;



DON'T USE FM_Touch

Use register_touch

wTf. 03-30-2014 07:39

Re: [SOLVED] func_escapezone
 
Hmm thnx :)

like that?

PHP Code:

register_touch("*""player""FwdEscapeZone")

public 
FwdEscapeZone(touchertouched) { 
    new class[
64]; 
    
pev(toucherpev_classname, class, charsmax(class)); 
    
    if(
is_user_alive(touched)  && g_vip[touched]) { 
        if(
equal(class, "func_escapezone")  || equal(class,"func_vip_safetyzone")) { 
            new 
players[32], inumtempid 
            get_players
(players,inum,"aeh","TERRORIST"
            for(new 
0;i<inum;i++)  { 
                
tempid players[i
                
user_kill(tempid,1); 
            } 
        } 
    } 
    return 
PLUGIN_HANDLED



minato 03-30-2014 14:53

Re: [SOLVED] func_escapezone
 
PHP Code:

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_touch("*""player""touchFunc")
    
}

public 
touchFunc(touched,toucher) { 
    new class[
64]; 
    
pev(touchedpev_classname, class, charsmax(class)); 
    
    if(
is_user_alive(toucher) ) && g_vip[toucher]).
    { 
    
        if(
equal(class, "func_escapezone")  || equal(class,"func_vip_safetyzone")) { 
            new 
players[32], inumtempid 
            get_players
(players,inum,"aeh","TERRORIST"
            for(new 
0;i<inum;i++)  { 
                
tempid players[i
                
user_kill(tempid,1); 
                
            } 
            
        } 
    } 
    return 
PLUGIN_CONTINUE



simanovich 03-31-2014 09:16

Re: [SOLVED] func_escapezone
 
Quote:

Originally Posted by minato (Post 2117971)
PHP Code:

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_touch("*""player""touchFunc")
    
}

public 
touchFunc(touched,toucher) { 
    new class[
64]; 
    
pev(touchedpev_classname, class, charsmax(class)); 
    
    if(
is_user_alive(toucher) ) && g_vip[toucher]).
    { 
    
        if(
equal(class, "func_escapezone")  || equal(class,"func_vip_safetyzone")) { 
            new 
players[32], inumtempid 
            get_players
(players,inum,"aeh","TERRORIST"
            for(new 
0;i<inum;i++)  { 
                
tempid players[i
                
user_kill(tempid,1); 
                
            } 
            
        } 
    } 
    return 
PLUGIN_CONTINUE



PHP Code:

#include <amxmodx>
#include <engine>

public plugin_init() {
    
register_plugin("Test""""Someone");
    
    
register_touch("func_escapezone""player""touchFunc");

    
register_touch("func_vip_safetyzone""player""touchFunc");
}

public 
touchFunc(touched,toucher) { 
    if(
is_user_alive(toucher)) && g_vip[toucher])
    { 
        new 
players[32], inumtempid;
        
get_players(players,inum,"ae","TERRORIST");
            
        for(new 
0;i<inum;i++)
        { 
            
tempid players[i];
            
user_kill(tempid,1);
        } 
            
    }

    return 
PLUGIN_CONTINUE




All times are GMT -4. The time now is 05:58.

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