Raised This Month: $ Target: $400
 0% 

[solved]add a distance to client


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Dr.G
Senior Member
Join Date: Nov 2008
Old 03-26-2009 , 09:48   [solved]add a distance to client
Reply With Quote #1

how should the array or what its called, g_noscope_counter_dist[33] look for being correct or working hehe, to hold Distance.


Code:
new g_noscope_counter_dist[33]
 
public plugin_init() 
{
 register_plugin(PLUGIN, VERSION, AUTHOR)
 
 RegisterHam(Ham_Killed, "player", "func_Ham_Killed")
}
 
 
public func_Ham_Killed(id, iAttacker, shouldgib)
{
 new Float: vOrigin[3], Float: aOrigin[3], Float: Distance
 
 pev(id, pev_origin, vOrigin )
 pev(iAttacker, pev_origin, aOrigin )
 
 Distance = fm_get_distance(vOrigin, aOrigin)
 
 if(g_noscope_counter_dist[iAttacker] < Distance)
 {
  g_noscope_counter_dist[iAttacker] = Distance
  client_print(iAttacker, print_chat, "[%s] Your best unscoped kill was done over %.1f meters", g_noscope_counter_dist[id])
 } 
}
 
 
Float:fm_get_distance( Float: Origin1[3], Float: Origin2[3])
{
 new Float: fdistance = get_distance_f(Origin1, Origin2)
 return (fdistance*0.0254)
}

thanks in advance
__________________

Last edited by Dr.G; 03-26-2009 at 13:04.
Dr.G 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 09:01.


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