Raised This Month: $ Target: $400
 0% 

Hud Not Updating Properly? o.0


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Author Message
Bombe_
New Member
Join Date: Dec 2011
Old 06-23-2012 , 00:26   Hud Not Updating Properly? o.0
#1

hi. ok so my ShowHud function is not updating properly. it says Level: 0 XP: 0 SkillPoints: 0
but when i type /xp which runs the showhud function it goes to Level : 0 XP: 40 SkillPoints: 0
really fast. then goes back to 0 for all.

Code:
set_task(0.1,"ShowHud",0,"",0,"b")
and

Code:
public ShowHud(id) {
    set_hudmessage(255, 0, 0, 0.75, 0.01, 0, 6.0, 15.0);
    show_hudmessage(id, "Level: %i^nXP: %i^nSkill Points: %i", PlayerLevel[id], PlayerXP[id], PlayerSkills[id]);
}
any help would be apreciated. I'm new to this so yea. ^-^
Bombe_ is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 06-23-2012 , 00:37   Re: Hud Not Updating Properly? o.0
#2

id is 0 in ShowHud, pass the correct id in set_task.

Moved to Scripting Help
__________________
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
Bombe_
New Member
Join Date: Dec 2011
Old 06-23-2012 , 00:46   Re: Hud Not Updating Properly? o.0
#3

thanks for moving, i didn't realize I posted it here. Anyway, i'm not sure what you mean by the correct id in set task. how would i know?

Also anther question:
when my xp goes over the required to level: ex. you need 100 xp and its at 105. it wont level up. from 0 to lvl 1? o.o so frustrating.

Spoiler

Last edited by ConnorMcLeod; 06-23-2012 at 11:23.
Bombe_ is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 06-23-2012 , 01:18   Re: Hud Not Updating Properly? o.0
#4

Are you wanting to show the hud message to every user?

Also, in client_connect, the user does not have an authid yet.
__________________
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
Bombe_
New Member
Join Date: Dec 2011
Old 06-23-2012 , 10:04   Re: Hud Not Updating Properly? o.0
#5

Well, every user has its own hud. so yeah.
+
edit;
ok so I added
Code:
 new authID[32];

get_user_authid(id,authID,32);
in client_connect to get their id.

edit;
Also I believe I fixed the

Quote:
Originally Posted by Bombe_ View Post
Also anther question:
when my xp goes over the required to level: ex. you need 100 xp and its at 105. it wont level up. from 0 to lvl 1? o.o so frustrating.
thing.

now I just need the hud message to update properly. cause when I type /xp it shows the actual level and xp. but when it sets task it just shows 0 for all.

Last edited by ConnorMcLeod; 06-23-2012 at 11:20.
Bombe_ is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-23-2012 , 11:21   Re: Hud Not Updating Properly? o.0
#6

This is not your personal forum, don't delete your posts once you got your answer.
Next time you do this i request a ban, i hope you understand.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Closed Thread



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 06:14.


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