AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Player names showing at a origin (https://forums.alliedmods.net/showthread.php?t=22883)

Drak 01-06-2006 00:33

Player names showing at a origin
 
I wanted wene any player go to a certin origin(area1), it will display the name on the HUD message.

Code:
#include <amxmodx> #include <amxmisc> #define PLUGIN "New Plugin" #define VERSION "1.0" #define AUTHOR "Author" new area1[3]={-711, 259, -2} new origin[3] new playername[32] public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_clcmd("say /test","hud") } public hud(id) {    get_user_name(id, playername, 31)    get_user_origin(id, origin, 2)    if(get_distance(origin,area1) <= 100.0)     {       set_hudmessage(0,175,0,-1.5,0.95,2,0.0,99.9,0.0,0.0,2)       show_hudmessage(id,"%s",playername)       client_print(id, print_chat, "LOOK")        } return PLUGIN_HANDLED }

But in the HUD the name stays even wene theres no one at the origin.

Hawk552 01-06-2006 12:30

It's because of this:

Code:
set_hudmessage(0,175,0,-1.5,0.95,2,0.0,99.9,0.0,0.0,2)

Change the 99.9 to something smaller, like 5.0 or something.

Drak 01-08-2006 00:19

That worked :lol:


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

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