Raised This Month: $51 Target: $400
 12% 

[help] target hud


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
indraraj striker
Veteran Member
Join Date: Mar 2014
Location: Under the water
Old 09-26-2014 , 07:39   [help] target hud
Reply With Quote #1

i was making target hud to all players
i would like to know how to delay hud time between first nick then second etc
i want delay

First hud
Nick shadow
score: death:

delay to stay as it is for 6 seconds then next

second hud
Nick killerz
score: death:

etc delay between next hud 6 seconds

set_hudmessage(255, 0, 0, 0.84.0, 0.75, 0, 6.0, 12.0)
show_hudmessage(id, "nick:^nscore:%i death:%i")

thanks in advanced
__________________
Thanks everyone. #miss_you_all
indraraj striker is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 09-26-2014 , 07:48   Re: [help] target hud
Reply With Quote #2

Below the example:
PHP Code:
public plugin_init()
{
    
set_task(6.0,"message1")
}

public 
message1()
{
    
set_hudmessage(255000.84.00.7506.012.0)
    
show_hudmessage(0"YourMessage")
    
set_task(6.0,"message2")
}

public 
message2()
{
    
set_hudmessage(255000.84.00.7506.012.0)
    
show_hudmessage(0"YourMessage")
    
set_task(6.0,"message3")
}

public 
message3()
{
    
set_hudmessage(255000.84.00.7506.012.0)
    
show_hudmessage(0"YourMessage")


Last edited by zmd94; 09-26-2014 at 07:56.
zmd94 is offline
RateX
Veteran Member
Join Date: Jun 2012
Location: 0o. SEA .o0
Old 09-26-2014 , 07:55   Re: [help] target hud
Reply With Quote #3

You forgot to provide the id
RateX is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 09-26-2014 , 08:00   Re: [help] target hud
Reply With Quote #4

No need the "id" as the request:
Quote:
Originally Posted by indraraj striker View Post
I was making target hud to all players.
If we put the "id", the message will not be displayed to all players. ;)
zmd94 is offline
indraraj striker
Veteran Member
Join Date: Mar 2014
Location: Under the water
Old 09-26-2014 , 08:57   Re: [help] target hud
Reply With Quote #5

Quote:
Originally Posted by zmd94 View Post
Below the example:
PHP Code:
public plugin_init()
{
    
set_task(6.0,"message1")
}

public 
message1()
{
    
set_hudmessage(255000.84.00.7506.012.0)
    
show_hudmessage(0"YourMessage")
    
set_task(6.0,"message2")
}

public 
message2()
{
    
set_hudmessage(255000.84.00.7506.012.0)
    
show_hudmessage(0"YourMessage")
    
set_task(6.0,"message3")
}

public 
message3()
{
    
set_hudmessage(255000.84.00.7506.012.0)
    
show_hudmessage(0"YourMessage")

please try to understand what i m trying to do
its so fast changing nick i cant see proper

PHP Code:
new players[32], inum;
get_players(playersinum);
new 
name[32];

for(new 
ii<inumi++)
{
target[id] = players[i]
get_user_name(idname31)
set_hudmessage(255,255,255,0.84,0.75,0,6.0,6.0)
show_hudmessage(0,"Nick:%s",name)

__________________
Thanks everyone. #miss_you_all

Last edited by indraraj striker; 09-26-2014 at 08:58.
indraraj striker is offline
aron9forever
Veteran Member
Join Date: Feb 2013
Location: Rromania
Old 09-27-2014 , 04:47   Re: [help] target hud
Reply With Quote #6

Quote:
new Float:timer = 0.1
for(new i=0;i<11;i++)
{
set_task(timer,"showname",id)
timer = timer+0.1
}
for an infinite number of tasks on a fixed interval
__________________
Meanwhile, in 2050:
Quote:
Originally Posted by aron9forever
useless small optimizations
Quote:
Originally Posted by Black Rose View Post
On a map that is 512x512x128 units you end up with 3,355,443,200,000 different "positions". To store each one of those positions individually in the variable "user_or" you need 12 terabytes of memory.
aron9forever is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 09-27-2014 , 07:25   Re: [help] target hud
Reply With Quote #7

Quote:
Originally Posted by aron9forever View Post
Code:
new Float:timer = 0.1
for(new i=0;i<11;i++)
{
set_task(timer,"showname",id)
timer = timer+0.1
}
for an infinite number of tasks on a fixed interval
Don't do that, do this

Code:
set_task(timer,"showname",id, _, _, "a", 11)
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).

Last edited by YamiKaitou; 09-27-2014 at 11:36.
YamiKaitou is offline
RateX
Veteran Member
Join Date: Jun 2012
Location: 0o. SEA .o0
Old 09-27-2014 , 11:29   Re: [help] target hud
Reply With Quote #8

Wait, I thought if you give a repeat value, then the flag is supposed to be "a", right?
RateX is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 09-27-2014 , 11:33   Re: [help] target hud
Reply With Quote #9

"a" - Repeat task a specified number of times.
"b" - Loop task infinitely.
"c" - Do task on time after a map timeleft.
"d" - Do task on time before a map timeleft.

Last edited by zmd94; 09-27-2014 at 11:35.
zmd94 is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 09-27-2014 , 11:37   Re: [help] target hud
Reply With Quote #10

Quote:
Originally Posted by RateX View Post
Wait, I thought if you give a repeat value, then the flag is supposed to be "a", right?
My mistake, you are correct
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
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 13:31.


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