View Single Post
naven
Veteran Member
Join Date: Jun 2008
Location: Poland, Cieszyn
Old 08-11-2010 , 05:04   Re: Soccer Ball for jailbreak
Reply With Quote #7

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);
}
}
    return 
PLUGIN_HANDLED;
}

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 );
}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/ 
__________________
naven.com.pl
"At the end of the day, there are always going to be mental disorders and people who cause violence for no other reason than the fact that they're fucked up and lost. And all we can do is try to learn from it." Corey Taylor.
naven is offline