Monthly Target: $400 Donations: $554
 138% 

Show message to dead people


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mrrr
Member
Join Date: Jun 2007
Old 11-16-2007 , 04:36   Show message to dead people
Reply With Quote #1

Can you tell me how i can put hud message only for dead people ?
I mean only dead peoples in server can read the hud message.

It must appear in the upper right corner.

Thanks
Mrrr is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 11-16-2007 , 06:54   Re: Show message to dead people
Reply With Quote #2

Code:
new Players[32], Num, Player;
get_players(Players, Num, "bch");
 
for(new i = 0 ; i < Num ; i++)
{
    Player = Players[i];
 
    //set_hudmessage(...);
    //show_hudmessage(Player, "wow....");
}
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-16-2007 , 10:58   Re: Show message to dead people
Reply With Quote #3

Just on a side note :

get_players(Players, Num, "bch");
"b" = Don't return alive players
"c" = Skip bots
"h" = Skip HLTV
See the full list here : http://www.amxmodx.org/funcwiki.php?go=func&id=174
__________________
Working on : CS Weapon Mod (72%) , MonsterAI (PAUSED),

Arkshine is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 11-16-2007 , 13:24   Re: Show message to dead people
Reply With Quote #4

Quote:
Originally Posted by arkshine View Post
Just on a side note :

get_players(Players, Num, "bch");
"b" = Don't return alive players
"c" = Skip bots
"h" = Skip HLTV
See the full list here : http://www.amxmodx.org/funcwiki.php?go=func&id=174
duh, so what's the problem ?! o.O or is for Mrrr ?
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-16-2007 , 13:35   Re: Show message to dead people
Reply With Quote #5

Because you give what he needs but whitout explanations...

Obviously it's for Mrrr. -_-'
__________________
Working on : CS Weapon Mod (72%) , MonsterAI (PAUSED),

Arkshine is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 11-16-2007 , 13:39   Re: Show message to dead people
Reply With Quote #6

oh, nvm , thanks for added the full explication.
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Lee
SourceMod Donor
Join Date: Feb 2006
Location: London, UK
Old 11-16-2007 , 13:45   Re: Show message to dead people
Reply With Quote #7

This method avoids get_players() - a native which many avoid since it reduces readability.

Code:
maxPlayers = get_maxplayers(); for(new i = 1; i <= maxPlayers; i++) {     if(is_user_alive(i))     {         continue;     }     set_hudmessage();     show_hudmessage(i, "You happen to be dead. :("); }
Lee is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 11-16-2007 , 14:21   Re: Show message to dead people
Reply With Quote #8

why to loop trough 32 slots ? o.O pointless... you can make also :
Code:
static Players[32], Num;
get_players(Players, Num);
 
for(new i = 0 ; i < Num ; i++)
{
    if(is_user_alive)
        continue;
 
    //blah blah...your dead.
}
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-16-2007 , 15:04   Re: Show message to dead people
Reply With Quote #9

Does the hudmessage have to be set in the loop ?
ConnorMcLeod is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 11-16-2007 , 15:07   Re: Show message to dead people
Reply With Quote #10

Nope.
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Reply


Thread Tools
Display Modes

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 23:57.


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