Raised This Month: $12 Target: $400
 3% 

get_user_aim help...


Post New Thread Reply   
 
Thread Tools Display Modes
The Specialist
BANNED
Join Date: Nov 2006
Old 11-07-2006 , 16:48   Re: get_user_aim help...
Reply With Quote #11

yeah , johny got his guns plugin was how many were in view , k007 is trying to find how many are in one LINE OF FIRE. a little more tricky
The Specialist is offline
Send a message via AIM to The Specialist
k007
BANNED
Join Date: Mar 2006
Location: bacon?
Old 11-07-2006 , 17:52   Re: get_user_aim help...
Reply With Quote #12

thx guys i might just try using jghg way but kinda of change some shit..
k007 is offline
Send a message via MSN to k007
VEN
Veteran Member
Join Date: Jan 2005
Old 11-08-2006 , 04:54   Re: get_user_aim help...
Reply With Quote #13

As far as i remember that is two defferent ways and you can't easily make it to work like you want. Maybe i'll write you the complete example, since i guess it would be a bit tricky for you.
VEN is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 11-08-2006 , 06:52   Re: get_user_aim help...
Reply With Quote #14

Here is the function and test script with some output results.
Code:
/* OUTPUT TOTALNUM[1] ARRELEM[0] PLAYER[6] TOTALNUM[0] TOTALNUM[2] ARRELEM[0] PLAYER[5] ARRELEM[1] PLAYER[3] TOTALNUM[3] ARRELEM[0] PLAYER[6] ARRELEM[1] PLAYER[5] ARRELEM[2] PLAYER[3] */ #include <amxmodx> #include <fakemeta> #include <xs> public plugin_init() {     register_concmd("test", "func") } public func(id) {     new players[32], num = fm_get_aim_players(id, players)     server_print("TOTALNUM[%d]", num)     for (new i; i < num; i++)         server_print("ARRELEM[%d] PLAYER[%d]", i, players[i])     server_print("^n")     return PLUGIN_HANDLED } stock fm_get_aim_players(index, players[32]) {     new Float:start[3], Float:view_ofs[3]     pev(index, pev_origin, start)     pev(index, pev_view_ofs, view_ofs)     xs_vec_add(start, view_ofs, start)     new Float:dest[3]     pev(index, pev_v_angle, dest)     engfunc(EngFunc_MakeVectors, dest)     global_get(glb_v_forward, dest)     xs_vec_mul_scalar(dest, 9999.0, dest)     xs_vec_add(start, dest, dest)     new tr, num, player = index, max_aims = get_maxplayers() - 1     for (new i; i < max_aims; i++) {         tr = 0         engfunc(EngFunc_TraceLine, start, dest, 0, player, tr)         player = get_tr2(tr, TR_pHit)         if (!is_user_alive(player))             break         players[num++] = player         get_tr2(tr, TR_vecEndPos, start)     }     return num }
VEN is offline
Reply



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:01.


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