AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   display text on right? (https://forums.alliedmods.net/showthread.php?t=12540)

Bone 04-17-2005 16:51

display text on right?
 
I want to display info from my rp plugin on right side instead of left.. so im wondering what values i change so its on right side instead of left, heres current code.

Code:
 public employmentstatus(id) {     new displaystring[128], displayjob[64];     // if still alive     if(is_user_alive(id) == 1) {         // figure out which variables to use         // when setting up the display below         if(employed[id] == 0) {             get_cvar_string("avarp_unemployed_job",displayjob,63);         }         else {             format(displayjob,63,"Working as %s",employedjob[id]);         }         if(orged[id] == 0) {             org[id] = noorg;         }         paycheck(id); // do paycheck countdown         // get color from cvar         new hudcolor[12];         get_cvar_string("avarp_hudcolor",hudcolor,11);         // split it into red, green, blue         new redamt[4], greenamt[4], blueamt[4];         parse(hudcolor,redamt,0,greenamt,1,blueamt,3);         // display money and stuff         format(displaystring,127,"Stamina:%d%^nHunger: %d%^nOrganization: %s^nWallet: $%d^nBank Balance: $%d^nPaycheck in %d minutes^n%s @ $%d/hr",stamina[id],hunger[id],org[id],userwallet[id],userbank[id],nextpaycheck[id],displayjob,employed[id] ? employedwages[id] : get_cvar_num("avarp_unemployed_wages"));         set_hudmessage(str_to_num(redamt),str_to_num(greenamt),str_to_num(blueamt),0.015,0.015,0,6.0,float(MINUTESINHOUR*get_cvar_num("avarp_secondsinminute")),0.1,0.2,TEXTCHANNEL);         show_hudmessage(id,displaystring);     }     set_task(get_cvar_float("avarp_secondsinminute"),"employmentstatus",id); // loop task  }

KyleD 04-17-2005 19:43

You have to change the set_hudmessage.

So..

Code:
set_hudmessage(str_to_num(redamt),str_to_num(greenamt),str_to_num(blueamt),0.015,0.015,0,6.0,float(MINUTESINHOUR*get_cvar_num("avarp_secondsinminute")),0.1,0.2,TEXTCHANNEL);

You would just have to change the..

Code:
0.015,0.015
to whatever the cords are for the right side.

XxAvalanchexX 04-17-2005 19:51

And the x coord for the right side would be 1.0 (not technically, but it'll show it on the right).

Bone 04-18-2005 12:21

so would it become like

Code:
set_hudmessage(str_to_num(redamt),str_to_num(greenamt),str_to_num(blueamt),1.0,1.0,0,6.0,float(MINUTESINHOUR*get_cvar_num("avarp_secondsinminute")),0.1,0.2,TEXTCHANNEL)

KyleD 04-18-2005 13:47

Yup. If those are the right cords.


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

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