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

Como obtener Origins


  
 
 
Thread Tools Display Modes
Author Message
nike!
Senior Member
Join Date: May 2009
Location: Melmac
Old 06-29-2011 , 14:36   Como obtener Origins
#1

Bueno como dice el titulo como hacia para obtener el origins de un mapa ej de_dust2, base Ct.
Saludos
__________________
nike"
nike! is offline
Send a message via MSN to nike!
rubee
Senior Member
Join Date: Oct 2009
Location: party rocking
Old 06-29-2011 , 19:07   Re: Como obtener Origins
#2

sirve buscar para la proxima

http://www.amxmodx.org/funcwiki.php?go=func&id=162

pd: no es la unica forma
__________________


rubee is offline
!Morte
Veteran Member
Join Date: May 2010
Old 06-29-2011 , 20:56   Re: Como obtener Origins
#3

Obtenes el origin y lo guardas .
__________________
First Zombie Class
[ZP] Zombie Class: Houndeye Zombie
Quote:
Originally Posted by lucas_7_94 View Post
tenes que saber pawn antes de intentar hacer algo digno.

Last edited by !Morte; 06-30-2011 at 13:28.
!Morte is offline
Send a message via MSN to !Morte Send a message via Skype™ to !Morte
fearAR
Veteran Member
Join Date: Oct 2010
Old 06-30-2011 , 09:27   Re: Como obtener Origins
#4

Responden mal kpos, el pibe dice obtener origenes de un mapa y le dicen get_user_origin...

Te recomiendo usar el BSP viewer viene en el SDK de HL, aunque si quieres obtener origenes de diferentes entidades:

Buscas la entidad por ejemplo tu caso un info_player_deathmatch que es la entidad donde revive el TT:

PHP Code:
new Float:entOrigin[3];

new 
ent find_ent_by_class(-1"info_player_deathmatch");

if(
ent) {
          
pev(entpev_originentOrigin);

Saludos

Last edited by fearAR; 06-30-2011 at 09:30.
fearAR is offline
Send a message via MSN to fearAR
rubee
Senior Member
Join Date: Oct 2009
Location: party rocking
Old 06-30-2011 , 11:42   Re: Como obtener Origins
#5

si yo entendi eso, pero si aparte quiere otros origenes especificos del mapa? coloca eso en un plugin se va caminando y guarda las localizaciones
__________________


rubee is offline
YakumoHiratsuhi
Veteran Member
Join Date: Dec 2010
Location: Dreαmlαnd.
Old 07-03-2011 , 18:52   Re: Como obtener Origins
#6

Quote:
Originally Posted by rubee View Post
si yo entendi eso, pero si aparte quiere otros origenes especificos del mapa? coloca eso en un plugin se va caminando y guarda las localizaciones

Yo hize esto en un enfasis al Modo Zombie 2 de CSO, lo que hago es capturar el origen del jugador haciendo un loop entre todos estos, cuando se este moviendo mucho y no este atorado lo guardo en una variable, despues cuando quiero aparecer la caja de suministros solo le asigno ese origen con set_pev(); usando un task.

no se si te sirva esto pero yo asi le hago para obtener origenes al azar del mapa xD

Quote:
Originally Posted by fearAR View Post
Responden mal kpos, el pibe dice obtener origenes de un mapa y le dicen get_user_origin...

Te recomiendo usar el BSP viewer viene en el SDK de HL, aunque si quieres obtener origenes de diferentes entidades:

Buscas la entidad por ejemplo tu caso un info_player_deathmatch que es la entidad donde revive el TT:

PHP Code:
new Float:entOrigin[3];

new 
ent find_ent_by_class(-1"info_player_deathmatch");

if(
ent) {
          
pev(entpev_originentOrigin);

Saludos
Ehm.. no tenia un nombre la entidad del Terrorist Spawn Zone? ya no me acuerdo podrias intentar buscando su classname o.0
__________________
"Podra parecer ridiculo o imposible, pero este es el camino que seguimos los verdaderos hombres, si hay un muro en el camino, lo derribamos, si no hay camino, haremos uno, con nuestras propias manos, porque el magma de nuestro corazón arde en llamas."

Last edited by YakumoHiratsuhi; 07-03-2011 at 18:56.
YakumoHiratsuhi is offline
Send a message via MSN to YakumoHiratsuhi
nike!
Senior Member
Join Date: May 2009
Location: Melmac
Old 07-03-2011 , 21:12   Re: Como obtener Origins
#7

Yo queria obtener X partes de 1 mapa y blokear el kill como hace este plug que encontre.
PHP Code:

#include < amxmodx >
#include < engine >
#include < hamsandwich >

#define IsPlayer(%1) ( 1 <= %1 <= g_iMaxPlayers )

new const g_szClassname[ ] = "trigger_rules_watch";

enum _:RoomTypes {
    
JAIL,
    
GUNROOM,
    
MARIOROOM
};

enum _:CVARS {
    
CV_JAIL_NOKILL,
    
CV_JAIL_TIME,
    
    
CV_GUNROOM_NOKILL,
    
CV_GUNROOM_TIME,
    
    
CV_MARIOROOM_NOKILL,
    
CV_MARIOROOM_TIME
};

new const 
g_szZonesRoomTypes ][ ] = {
    
"Jail",
    
"Gun room",
    
"Mario room"
};

new const 
Float:g_flOrigins[ ][ ] = {
    { -
405.02900.0720.0 },
    { -
486.0, -1000.0, -275.0 },
    { -
405.02949.02422.0 }
};

new const 
Float:g_flAngles[ ][ ] = {
    { 
0.0270.00.0 },
    { 
0.0270.00.0 },
    { 
0.0270.00.0 }
};

new 
g_iMaxPlayers;
new 
g_iCounter33 ];
new 
bool:g_bNoKill33 ];
new 
Float:g_flLastTouch33 ];
new 
g_pCvarsCVARS ], g_iCvarsCVARS ];

public 
plugin_init( ) {
    
register_plugin"-""1.0""-" );
    
    
register_cvar"ss2_rules_watcher""1.1"FCVAR_SERVER FCVAR_SPONLY );
    
    
g_iMaxPlayers get_maxplayers( );
    
    
g_pCvarsCV_JAIL_NOKILL ]      = register_cvar"rw_ss2_jail_nokill",      "0" );
    
g_pCvarsCV_JAIL_TIME ]        = register_cvar"rw_ss2_jail_time",        "0" );
    
    
g_pCvarsCV_GUNROOM_NOKILL ]   = register_cvar"rw_ss2_gunroom_nokill",   "1" );
    
g_pCvarsCV_GUNROOM_TIME ]     = register_cvar"rw_ss2_gunroom_time",     "0" );
    
    
g_pCvarsCV_MARIOROOM_NOKILL ] = register_cvar"rw_ss2_marioroom_nokill""1" );
    
g_pCvarsCV_MARIOROOM_TIME ]   = register_cvar"rw_ss2_marioroom_time",   "0" );
    
    new 
szMap12 ];
    
get_mapnameszMap11 );
    
    if( 
equaliszMap"surf_ski_2" ) ) {
        
CreateTriggerJAILFloat:{ -579.02983.0586.0 }, Float:{ -309.03288.0796.0 } );
        
CreateTriggerGUNROOMFloat:{ -713.0, -990.0, -157.0 }, Float:{ -295.0, -651.026.0 } );
        
CreateTriggerMARIOROOMFloat:{ 2735.0193.0, -2361.0 }, Float:{ 3654.01118.0, -2083.0 } );
        
        
register_touchg_szClassname"player""FwdTriggerTouch" );
        
RegisterHamHam_Spawn,        "player""FwdHamPlayerSpawn");
        
RegisterHamHam_TakeDamage,   "player""FwdHamTakeDamage" );
        
RegisterHamHam_TraceAttack,  "player""FwdHamTraceAttack" );
        
        
register_event"HLTV""EventNewRound""a""1=0""2=0" );
        
        
CacheCvars( );
    }
}

public 
EventNewRound( )
    
CacheCvars( );

public 
FwdHamPlayerSpawn( const id ) {
    if( 
is_user_aliveid ) ) {
        
g_bNoKillid ]     = false;
        
g_flLastTouchid ] = 0.0;
        
g_iCounterid ]    = 0;
    }
}

public 
FwdHamTraceAttack( const id, const iAttacker ) {
    if( 
IsPlayeriAttacker ) && g_bNoKillid ] && id != iAttacker ) {
        if( ( 
g_flLastTouchid ] + 0.1 ) >= get_gametime( ) )
            return 
HAM_SUPERCEDE;
        else
            
g_bNoKillid ] = false;
    }
    
    return 
HAM_IGNORED;
}

public 
FwdHamTakeDamage( const id, const iInflictor, const iAttacker ) {
    if( 
IsPlayeriAttacker ) && g_bNoKillid ] && id != iAttacker ) {
        if( ( 
g_flLastTouchid ] + 0.1 ) >= get_gametime( ) )
            return 
HAM_SUPERCEDE;
        else
            
g_bNoKillid ] = false;
    }
    
    return 
HAM_IGNORED;
}

public 
FwdTriggerTouch( const iEntity, const id ) {
    static 
Float:flGametime;
    
flGametime get_gametime( );
    
    if( 
flGametime > ( g_flLastTouchid ] + 1.2 ) ) {
        
g_iCounterid ] = 0;
        
g_flLastTouchid ] = flGametime;
    }
    else if( 
g_flLastTouchid ] < flGametime ) {
        
g_iCounterid ]++;
        
        static 
iTypebool:bNoKilliTime;
        
iType entity_get_intiEntityEV_INT_iuser1 );
        
        
GetCvarsiTypebNoKilliTime );
        
        
g_bNoKillid ] = bNoKill;
        
        if( 
iTime ) {
            if( 
g_iCounterid ] >= iTime ) {
                if( 
iTime >= ) {
                    
engclient_printidengprint_center"^nSe puso mas de %i segundos en%s%s.^nUsted ha sido expulsado."iTimeiType == MARIOROOM "^n" " "g_szZonesiType ] );
                    
                    
client_cmdid"spk buttons/blip1" );
                }
                
                
entity_set_vectoridEV_VEC_anglesg_flAnglesiType ] );
                
entity_set_intidEV_INT_fixangle);
                
entity_set_originidg_flOriginsiType ] );
            }
            
            if( 
g_iCounterid ] < ) {
                if( 
iTime >= )
                    
engclient_printidengprint_center"%sUsted esta en %s.%s^n^nUsted tiene %i segundos para salir!"bNoKill "" "^n"g_szZonesiType ], bNoKill "^nNo se puede matar a nadie aqui." ""iTime );
                else
                    
engclient_printidengprint_center"%sUsted esta %s.%s"bNoKill "" "^n"g_szZonesiType ], bNoKill "^nNo se puede matar a nadie aqui." "" );
            }
        }
        
        
g_flLastTouchid ] = flGametime 1.0;
    }
}

GetCvars( const iType, &bool:bNoKill, &iTime ) {
    static 
CvarNoKillCvarTime;
    
    switch( 
iType ) {
        case 
JAIL: {
            
CvarNoKill CV_JAIL_NOKILL;
            
CvarTime CV_JAIL_TIME;
        }
        case 
GUNROOM: {
            
CvarNoKill CV_GUNROOM_NOKILL;
            
CvarTime CV_GUNROOM_TIME;
        }
        case 
MARIOROOM: {
            
CvarNoKill CV_MARIOROOM_NOKILL;
            
CvarTime CV_MARIOROOM_TIME;
        }
    }
    
    
bNoKill bool:( g_iCvarsCvarNoKill ] );
    
iTime g_iCvarsCvarTime ];
}

CacheCvars( ) {
    
g_iCvarsCV_JAIL_NOKILL ]      = get_pcvar_numg_pCvarsCV_JAIL_NOKILL ] );
    
g_iCvarsCV_JAIL_TIME ]        = get_pcvar_numg_pCvarsCV_JAIL_TIME ] );
    
    
g_iCvarsCV_GUNROOM_NOKILL ]   = get_pcvar_numg_pCvarsCV_GUNROOM_NOKILL ] );
    
g_iCvarsCV_GUNROOM_TIME ]     = get_pcvar_numg_pCvarsCV_GUNROOM_TIME ] );
    
    
g_iCvarsCV_MARIOROOM_NOKILL ] = get_pcvar_numg_pCvarsCV_MARIOROOM_NOKILL ] );
    
g_iCvarsCV_MARIOROOM_TIME ]   = get_pcvar_numg_pCvarsCV_MARIOROOM_TIME ] );
}

CreateTrigger( const iType, const Float:flMins], const Float:flMaxs] ) {
    new 
iEntity create_entity"info_target" );
    
    if( !
is_valid_entiEntity ) ) {
        
log_amx"Hubo un error con la creación de ^"%s^""g_szZonesiType ] );
        
        return 
0;
    }
    
    
entity_set_stringiEntityEV_SZ_classnameg_szClassname );
    
entity_set_intiEntityEV_INT_iuser1iType );
    
entity_set_intiEntityEV_INT_movetypeMOVETYPE_NONE );
    
entity_set_intiEntityEV_INT_solidSOLID_TRIGGER );
    
entity_set_sizeiEntityflMinsflMaxs );
    
    return 
iEntity;

__________________
nike"
nike! is offline
Send a message via MSN to nike!
Old 07-04-2011, 13:54
YakumoHiratsuhi
This message has been deleted by YakumoHiratsuhi. Reason: e.e
 



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 03:41.


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