AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Numbers in HUD being switched around!? (https://forums.alliedmods.net/showthread.php?t=12075)

Bone 04-04-2005 15:29

Numbers in HUD being switched around!?
 
I am adding Stamina And hunger into Avalances Rp plugin, I got health added in fine as well as stamina.. kind of, you see the thing is the hud i have that displays in upper left corner when i add stamina numbers switch around.

when i have this code

Code:

                // display money and stuff
                format(displaystring,127,"^nHunger:%d^nWallet: $%d^nBank Balance: $%d^nPaycheck in %d minutes^n%s @ $%d/hr",hunger[id],userwallet[id],userbank[id],nextpaycheck[id],displayjob,employed[id] ? employedwages[id] : get_cvar_num("avarp_unemployed_wages"));

everything works perfect but you see i dont have it display stamina, so when i add stamina to the code like so

Code:

                // display money and stuff
                format(displaystring,127,"Stamina: ^nHunger:%d^nWallet: $%d^nBank Balance: $%d^nPaycheck in %d minutes^n%s @ $%d/hr",stamina[id],hunger[id],userwallet[id],userbank[id],nextpaycheck[id],displayjob,employed[id] ? employedwages[id] : get_cvar_num("avarp_unemployed_wages"));

then it goes crazy and looks like this

http://img75.exs.cx/img75/8348/odd4my.jpg

so you see stamina stats is going into where hunger SHOULD be and hunger is in wallet and wallet is in bank etc.. so its all getting like shifted down. can someone PLEASE help me with this its only thing stopping me ffrom finishing plug in. thanks

johnjg75 04-04-2005 19:18

Code:
format(displaystring,127,"Stamina:%d^nHunger:%d^nWallet: $%d^nBank Balance: $%d^nPaycheck in %d minutes^n%s @ $%d/hr",stamina[id],hunger[id],userwallet[id],userbank[id],nextpaycheck[id],displayjob,employed[id] ? employedwages[id] : get_cvar_num("avarp_unemployed_wages"));

XxAvalanchexX 04-06-2005 14:32

It's because you didn't put a %d where you wanted the stamina to be dispalyed, the code john posted has it.

DiscoBBQ 04-07-2005 19:40

2 weeks earlier...

Code:
    format(displaystring,255,"Name: %s^nMoney: $%d^nJob: '%s' at $%d an hour^nPaycheck in: %d minutes^nOrganization: %s^nHunger: %d%^nStamina: %d%",playername,wallet[id],job[id],wages[id],nextpaycheck[id],org[id],hunger[id],stamina[id]);     set_hudmessage(1,255,1,0.015,0.015,0,6.0,999999.0,0.1,0.2,83);     show_hudmessage(id, displaystring);

i just saw you ripping my EXACT idea and CODE on stamina. And now your trying to do my hunger EXACTLY like i did?

cssryan 04-07-2005 19:48

OMG bone u nub copier
make ur own mod dont copy others nubby nubby n00b


All times are GMT -4. The time now is 09:54.

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