AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Point at Enemy and get Infos, like HP etc. (https://forums.alliedmods.net/showthread.php?t=26335)

Stephen 03-31-2006 10:40

Point at Enemy and get Infos, like HP etc.
 
Hi.
My question is, is it possible to point the crosshair at an enemy and have on the right side of the Crosshair then some Information standing like HP/Speed/etc.. whatever floats the boat.

And how would that be done if its possible ?
Also that some offsets are beeing read and displayed on the Information.

Hope you know what im talking about.

v3x 03-31-2006 10:48

I think this is how you'd do it:
Code:
#include <amxmodx> #include <fakemeta> public plugin_init() {     register_plugin("wootsa" , "0.1" , "v3x");     register_forward(FM_TraceLine , "forward_traceline" , 1); } public forward_traceline(Float:v1[3] , Float:v2[3] , noMonsters , id) {     if(!is_user_alive(id))         return FMRES_IGNORED;     new hitid = get_tr(TR_pHit);     if(!is_user_alive(hitid))         return FMRES_IGNORED;     new hp = pev(hitid , pev_health);     new speed = pev(hitid , pev_speed);     // set_hudmessage( .. );     new message[101];     format(message , 100 , "HP: %d^nSpeed: %d" , hp , speed);     show_hudmessage(id , message);     return FMRES_IGNORED; }
You can use other modules to retrieve other information about the player if you need to.

Stephen 03-31-2006 12:10

Thx i gonna try it right away now.

I tried it with an Bot in ESF but it didnt show me anything :cry:
or its not working for ESF yet ??? :o


All times are GMT -4. The time now is 16:43.

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