Raised This Month: $ Target: $400
 0% 

HUD Conflicting


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
shuttle_wave
Veteran Member
Join Date: Apr 2009
Location: New Zealand
Old 07-02-2010 , 03:34   HUD Conflicting
Reply With Quote #1

Hi.
How would i stop HUD conflicting?. When round start i use set_task to run my hud function and i have more than one task to run differnt hud. Do i need to use TASK_ID for my set_task. Also i dont understand task_id so can someone explain to my about task_id thanks

Cheers
Shuttle_Wave
__________________
JailBreak Mod with Plugin API ( 90% ) Public
shuttle_wave is offline
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 07-02-2010 , 03:55   Re: HUD Conflicting
Reply With Quote #2

I believe this should work..

PHP Code:
register_event("ResetHUD""eventResetHUD""b");

public 
eventResetHUD(id)
{
    
//what to reset

I'm sure you know what to do with these.
__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.
GXLZPGX is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 07-02-2010 , 04:01   Re: HUD Conflicting
Reply With Quote #3

Quote:
Originally Posted by GXLZPGX View Post
I believe this should work..

PHP Code:
register_event("ResetHUD""eventResetHUD""b");

public 
eventResetHUD(id)
{
    
//what to reset

I'm sure you know what to do with these.
just add an ID to your task like :


set_task(1.0,"Show_Message",1337)

and use the code which GXLZPGX posted.




Code:
register_event("ResetHUD", "eventResetHUD", "b") //Reset Headup Display event

public eventResetHUD(id)
{
    if(task_exists(1337))     //If task 1337 exists...
    {
          remove_task(1337)   // Remove it to display a new Message
    }
}
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
shuttle_wave
Veteran Member
Join Date: Apr 2009
Location: New Zealand
Old 07-02-2010 , 04:05   Re: HUD Conflicting
Reply With Quote #4

for the task_id those numbers i can put any right.

like

#define TASK_ID_HUD 1234
__________________
JailBreak Mod with Plugin API ( 90% ) Public
shuttle_wave is offline
shuttle_wave
Veteran Member
Join Date: Apr 2009
Location: New Zealand
Old 07-02-2010 , 04:07   Re: HUD Conflicting
Reply With Quote #5

wat if i want a hud message to stay on the screen forever while another hud is showed how would i do that without anything happening to the hud that is displayed forever?
__________________
JailBreak Mod with Plugin API ( 90% ) Public
shuttle_wave is offline
JaGareN
Senior Member
Join Date: Mar 2009
Old 07-02-2010 , 08:58   Re: HUD Conflicting
Reply With Quote #6

Just make a task that calls every 1.0 seconds with flag "b" so the message will still up, like this
PHP Code:
set_task(1.0"display_hud"3000__"b");
 
public 
display_hud(id)
{
        
// your hudmessage

JaGareN is offline
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 07-02-2010 , 11:52   Re: HUD Conflicting
Reply With Quote #7

Quote:
Originally Posted by shuttle_wave View Post
wat if i want a hud message to stay on the screen forever while another hud is showed how would i do that without anything happening to the hud that is displayed forever?
And JaGareN's method above is the best way to go about it, it refreshes every second, so if any data changes it will do it smoothly.
__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.
GXLZPGX is offline
shuttle_wave
Veteran Member
Join Date: Apr 2009
Location: New Zealand
Old 07-02-2010 , 16:54   Re: HUD Conflicting
Reply With Quote #8

Quote:
Originally Posted by JaGareN View Post
Just make a task that calls every 1.0 seconds with flag "b" so the message will still up, like this
PHP Code:
set_task(1.0"display_hud"3000__"b");
 
public 
display_hud(id)
{
        
// your hudmessage

OK. so the 3000 is the task id?
__________________
JailBreak Mod with Plugin API ( 90% ) Public
shuttle_wave is offline
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 07-02-2010 , 17:19   Re: HUD Conflicting
Reply With Quote #9

Quote:
Originally Posted by shuttle_wave View Post
OK. so the 3000 is the task id?
Yup. So is id, the parameter passed in your function.
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ 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 19:51.


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