Raised This Month: $ Target: $400
 0% 

get_user_aiming doesn't work :(


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 01-01-2007 , 16:51   get_user_aiming doesn't work :(
Reply With Quote #1

Hi, I am trying to get the player a user is aiming at and display it in a hud message. When I aim at a player nothing shows up though.

Here is the code...
Code:
public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     set_task(1.0, "getAimed", 0, "", 0, "b"); } public getAimed(id) {     if(!is_user_alive(id)) {         return PLUGIN_HANDLED;     }         new ent, body;     get_user_aiming(id, ent, body);         if(is_valid_ent(ent)) {         new classname[50];         entity_get_string(ent,EV_SZ_classname,classname,49);                 if(equal(classname,"player")) {             if(!is_user_alive(ent)) {                 return PLUGIN_HANDLED;             }                     showPlayerHud(id, ent);         }     }         return PLUGIN_CONTINUE; } public showPlayerHud(id, ent) {     new name[50];         get_user_name(ent, name, 49);     set_hudmessage(0, 100, 200, -1.0, 0.35, 0, 4.0, 0.9, 0.1, 0.2, 2);     show_hudmessage(id, "You are looking at %s", name); }
hlstriker 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 22:27.


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