Raised This Month: $ Target: $400
 0% 

How add a bouncing effect


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Netsys
Senior Member
Join Date: Feb 2010
Old 03-09-2013 , 10:26   How add a bouncing effect
Reply With Quote #1

How I can add to the gold coin as a bouncing effect. Like the game of sonic when to lose rings.

PHP Code:
#include <amxmodx>
#include <engine>
#include <hamsandwich>

new model_coin[] = "models/coin.mdl"

public plugin_precache()
    
precache_model(model_coin);
    
public 
plugin_init()
{
    
register_plugin"asd" "asd" "asd2" );
    
RegisterHamHam_Killed "player" "fw_PlayerKilled" );
}

public 
fw_PlayerKilled(victimattackershouldgib)
{
    
create_coin(victim);
}

stock create_coinvictim )
{
    static 
Float:fOrigin[3];
    
entity_get_vectorvictim EV_VEC_origin fOrigin );
    
    
fOrigin[2] -= 15.0;
    
    new 
entity create_entity"info_target" );
    
    if(!
is_valid_ent(entity))
    {
        
remove_entity(entity);
        return;
    }
    
    
entity_set_originentity fOrigin );
    
entity_set_modelentity model_coin );
    
    
entity_set_intentity EV_INT_solid SOLID_TRIGGER );
    
entity_set_intentity EV_INT_movetype MOVETYPE_NONE );
    
entity_set_floatentity EV_FL_framerate 1.0 );
    
entity_set_intentity EV_INT_sequence );
    
    
entity_set_sizeentity Float:{ -10.0, -10.0, -10.0 }, Float:{ 10.010.010.0 } );
    
drop_to_floorentity );

Netsys 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:36.


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