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

Empujar a un Player


  
 
 
Thread Tools Display Modes
shinoda
Spanish Moderator
Join Date: Nov 2009
Location: ag_crossfire
Old 02-16-2011 , 11:26   Re: Empujar a un Player
#11

PHP Code:
#include <amxmodx>
#include <fakemeta>

#define is_player(%0)    (1 <= %0 <= g_iMaxplayers)
new g_iMaxplayers

#define RADIUS    300.0

public plugin_init()
{
    
register_clcmd("say test""cmdTest")
    
    
g_iMaxplayers get_maxplayers()
}

public 
cmdTest(id)
{
    if( 
is_user_alive(id) )
    {
        new 
Float:flOrigin[3]
        
pev(idpev_originflOrigin)
        
        new 
iEntFloat:iEntOrigin[3]
        
        while( (
iEnt engfunc(EngFunc_FindEntityInSphereiEntflOriginRADIUS)) )
        {
            if( 
is_player(iEnt) && iEnt != id )
            {
                
// Desde aqui haces tus calculos
                
pev(iEntpev_originiEntOrigin)
                
                
/*
                iEntOrigin[0] = (iEntOrigin[0] - flOrigin[0]) * 10.0
                iEntOrigin[1] = (iEntOrigin[1] - flOrigin[1]) * 10.0
                iEntOrigin[2] = (iEntOrigin[2] - flOrigin[2]) + 500.0
                */
                
                
set_pev(iEntpev_velocityiEntOrigin)
            }
        }
    }
    return 
PLUGIN_HANDLED

__________________
Oh hell no this shit is awesome !!!
shinoda is offline
Send a message via MSN to shinoda Send a message via Skype™ to shinoda
!Morte
Veteran Member
Join Date: May 2010
Old 02-16-2011 , 12:21   Re: Empujar a un Player
#12

Quote:
Originally Posted by shinoda View Post
PHP Code:
#include <amxmodx>
#include <fakemeta>

#define is_player(%0)    (1 <= %0 <= g_iMaxplayers)
new g_iMaxplayers

#define RADIUS    300.0

public plugin_init()
{
    
register_clcmd("say test""cmdTest")
    
    
g_iMaxplayers get_maxplayers()
}

public 
cmdTest(id)
{
    if( 
is_user_alive(id) )
    {
        new 
Float:flOrigin[3]
        
pev(idpev_originflOrigin)
        
        new 
iEntFloat:iEntOrigin[3]
        
        while( (
iEnt engfunc(EngFunc_FindEntityInSphereiEntflOriginRADIUS)) )
        {
            if( 
is_player(iEnt) && iEnt != id )
            {
                
// Desde aqui haces tus calculos
                
pev(iEntpev_originiEntOrigin)
                
                
/*
                iEntOrigin[0] = (iEntOrigin[0] - flOrigin[0]) * 10.0
                iEntOrigin[1] = (iEntOrigin[1] - flOrigin[1]) * 10.0
                iEntOrigin[2] = (iEntOrigin[2] - flOrigin[2]) + 500.0
                */
                
                
set_pev(iEntpev_velocityiEntOrigin)
            }
        }
    }
    return 
PLUGIN_HANDLED

Gracias shinoda, era exactamente lo que buscaba

Last edited by !Morte; 02-16-2011 at 13:51.
!Morte is offline
Send a message via MSN to !Morte Send a message via Skype™ to !Morte
gladius
Veteran Member
Join Date: Jul 2008
Location: Santiago, Chile
Old 02-16-2011 , 12:22   Re: Empujar a un Player
#13

Quote:
Originally Posted by p4rp4d30 View Post
Sino aca tenes mas info de cuando un player toca a otro player... seria lo mismo que semiclip la firencia que tenes que usar el pev_impulse
Que semiclip usa touch ? Yo siempre he visto y también es mejor, usar addtofullpack.
__________________
Proyects
Kreedz Chile Mod [100%] (Fixing some details).


Last edited by gladius; 02-16-2011 at 12:24.
gladius is offline
Send a message via MSN to gladius Send a message via Skype™ to gladius
p4rp4d30
Veteran Member
Join Date: Mar 2007
Old 02-16-2011 , 18:07   Re: Empujar a un Player
#14

Quote:
Originally Posted by gladius View Post
Que semiclip usa touch ? Yo siempre he visto y también es mejor, usar addtofullpack.
y si el semiclip usa touch de esa manera cuando te asercas a un player se hace holography y te deja atravesarlo...

no se si usa esa funcion de touch que estaba antes pero... seria algo asi pero de otra forma.

Last edited by p4rp4d30; 02-16-2011 at 18:14.
p4rp4d30 is offline
gladius
Veteran Member
Join Date: Jul 2008
Location: Santiago, Chile
Old 02-16-2011 , 20:43   Re: Empujar a un Player
#15

Creo que había leído que hay posibilidad de que haya bug con touch, como que a veces se traban.
__________________
Proyects
Kreedz Chile Mod [100%] (Fixing some details).

gladius is offline
Send a message via MSN to gladius Send a message via Skype™ to gladius
 



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 16:29.


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