Raised This Month: $ Target: $400
 0% 

Target player closes to crosshair


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
KCE
Senior Member
Join Date: Jan 2005
Location: Los Angeles, CA
Old 03-29-2005 , 23:13  
Reply With Quote #9

I changed "get_user_origin(id,aimvec,3)" to "get_user_origin(id,aimvec,1)".

Code:
public find(id) {     new aimvec[3]     get_user_origin(id,aimvec,1)     new players[32], inum     get_players(players,inum,"a")     for(new i = 1 ;i <= inum ;i++)     {         if (is_user_connected(players[i]))         {             new Float:p_origin[3]             pev(players[i],pev_origin,p_origin)             new Float:dist             dist = floatsqroot(floatpower(float(aimvec[0]) - p_origin[0],2.0) + floatpower(float(aimvec[1]) - p_origin[1],2.0))             //calculate distance using the distance formula                         new name[32]             get_user_name(players[i],name,31)             client_print(id,print_chat,"%s - %f",name,dist)         }     } }
__________________

My 3D Art: http://k-c-e.deviantart.com/

[img]http://img213.**************/img213/7132/userbar152416mp2.gif[/img]
[img]http://img65.**************/img65/5606/userbar152433ie5.gif[/img]
[img]http://img223.**************/img223/7576/userbar152440yk6.gif[/img]
KCE 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:58.


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