Raised This Month: $ Target: $400
 0% 

Entity Rolling


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
DavidJr
Senior Member
Join Date: Apr 2012
Old 11-03-2013 , 07:10   Entity Rolling
Reply With Quote #1

Hi, I would like to know how to make entity rolling on the ground. I have modify weaponbox's angle and avelocity but it landed on the ground like a knife is stab to the floor. I want to make the weaponbox dropped likes in CSS.

This is what I've done:
PHP Code:
public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_touch("weaponbox""player""fw_Bounce")
}
public 
fw_Bounce(enti)
{
    new 
Float:Angle[3], Float:Avelocity[3]
    
    
velocity_by_aim(ent1000Angle)
    
    
Angle[0] = random_float(-1000.01000.0//pitch
    
Angle[1] = random_float(-1000.01000.0//yaw
    
Angle[2] = random_float(-1000.01000.0//roll
    
    
Avelocity[0] = random_float(-500.0500.0)
    
Avelocity[1] = random_float(-500.0500.0)
    
Avelocity[2] = random_float(-500.0500.0)
    
    
entity_set_int(entEV_INT_movetypeMOVETYPE_TOSS)
    
entity_set_vector(entEV_VEC_anglesAngle)
    
entity_set_vector(entEV_VEC_avelocityAvelocity)
    
entity_set_size(entFloat:{-16.0, -16.00.0}, Float:{16.016.064.0})
}
/* 
DavidJr 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 23:17.


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