Raised This Month: $ Target: $400
 0% 

[Ball]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
dienvidvejs
Junior Member
Join Date: Aug 2010
Old 08-23-2010 , 11:03   [Ball]
Reply With Quote #1

How can i make it pickable with e && pressing e again you kick it away
HELP!

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <engine>
#include <xs>

#define PLUGIN "Ball"
#define VERSION "1.0"
#define AUTHOR "{PHILMAGROIN}"

new aimVector[3];

public 
plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR);
    
register_touch"Ball""*""EntityOnTouch" );
    
register_concmd"amx_ball""Ball_Me"ADMIN_ADMIN );
    
register_touch("Ball""player""PlayerOnTouch");
}

public 
plugin_precache()
{
    
precache_model("models/newball.mdl");
}

public 
Ball_Me (id)
{
    new 
MyEntity create_entity"info_target" );
    new 
Float:fOrigin[3];
    {
        
entity_set_modelMyEntity"models/newball.mdl"); 
        
get_user_origin(idaimVector3);
        
IVecFVec(aimVectorfOrigin);
        {
            
set_pevMyEntitypev_classname"Ball" );
            
set_pevMyEntitypev_movetype MOVETYPE_BOUNCE );
            
set_pevMyEntitypev_solid    SOLID_BBOX  );
            
set_pevMyEntitypev_gravity  0.50 );
            
set_pevMyEntitypev_originfOrigin );
            
set_pevMyEntitypev_size50.050.050.0);
        }
    }

}

public 
EntityOnTouch ( const nEntity )
{
    static 
Float:Velocity[3];
    {
        
pevnEntitypev_velocityVelocity );
        
xs_vec_mul_scalarVelocity0.85Velocity );
        
set_pevnEntitypev_velocityVelocity );
    }
}

public 
PlayerOnTouch ( const Entityid )
{
    new 
Float:sVelocity[3];
    {
        
velocity_by_aimid480sVelocity );
        
entity_set_vectorEntityEV_VEC_velocitysVelocity );
    }


Last edited by dienvidvejs; 08-23-2010 at 11:06.
dienvidvejs is offline
 



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 21:50.


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