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

[Ball]


Post New Thread Reply   
 
Thread Tools Display Modes
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
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 08-23-2010 , 11:05   Re: [Ball]
Reply With Quote #2

use php tag pls. much easier to read ur code.
__________________
Quote:
#define true ((rand() % 2)? true: false) //Happy debugging suckers
mottzi is offline
Send a message via MSN to mottzi
dienvidvejs
Junior Member
Join Date: Aug 2010
Old 08-23-2010 , 11:06   Re: [Ball]
Reply With Quote #3

oky
dienvidvejs is offline
lazarev
Veteran Member
Join Date: Sep 2008
Old 08-23-2010 , 12:45   Re: [Ball]
Reply With Quote #4

use xpaw's ball
http://forums.alliedmods.net/showpos...0&postcount=28
lazarev is offline
Reply



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 01:48.


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