Raised This Month: $ Target: $400
 0% 

Player names showing at a origin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Drak
Veteran Member
Join Date: Jul 2005
Old 01-06-2006 , 00:33   Player names showing at a origin
Reply With Quote #1

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.
Drak is offline
Send a message via MSN to Drak
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 01-06-2006 , 12:30  
Reply With Quote #2

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.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Drak
Veteran Member
Join Date: Jul 2005
Old 01-08-2006 , 00:19  
Reply With Quote #3

That worked
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
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 16:08.


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