Raised This Month: $ Target: $400
 0% 

Weapon toss units


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 07-08-2010 , 16:14   Re: Weapon toss units
Reply With Quote #2

This is how i did it.
PHP Code:
#include <amxmodx>
#include <engine>

#pragma semicolon 1
#define VERSION "1.0"

new Floatthroworigin[3];
new 
Floatdroporigin[3];

public 
plugin_init()
{
    
register_plugin("Drop Distance"VERSION"Drekes");
    
    
register_touch("weaponbox""worldspawn""Fwd_Weapon_Touch");
    
    
register_clcmd("drop""cmd_drop");
}

public 
cmd_drop(id)
    
entity_get_vector(idEV_VEC_originthroworigin);
    
public 
Fwd_Weapon_Touch(weaponworld)
{
    
entity_get_vector(weaponEV_VEC_origindroporigin);
    
    
check_distance();
}

public 
check_distance()
{
    new 
Floatdistance get_distance_f(throworigindroporigin);
    
    
client_print(0print_chat"Drop distance: %.1f"distance);

__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
 



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 07:05.


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