AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Money text. (https://forums.alliedmods.net/showthread.php?t=113950)

zacky 12-31-2009 15:19

Money text.
 
Hi guys :P
Does anyone know how to change the money text to the amount of a variable?
This money text:
[IMG]http://img199.**************/img199/9448/examplecc.jpg[/IMG]

Thanks
-zacky

benamo6 12-31-2009 15:29

Re: Money text.
 
I think this should work.
PHP Code:

cs_set_user_money(idget_pcvar_num(cvar name

You must include cstrike module to compile this.

zacky 12-31-2009 15:32

Re: Money text.
 
Quote:

Originally Posted by benamo6 (Post 1038162)
I think this should work.
PHP Code:

cs_set_user_money(idget_pcvar_num(cvar name

You must include cstrike module to compile this.

No no, i know how to set money, but just to change that message that i marked on the picture, i want it to show a variable, like gPoints or something, and not show the players money.

benamo6 12-31-2009 15:36

Re: Money text.
 
I think that for that you'll need to change the sprite?

zacky 12-31-2009 15:37

Re: Money text.
 
Quote:

Originally Posted by benamo6 (Post 1038176)
I think that for that you'll need to change the sprite?

I don't know, i don't even know if its possible to change it, but i'll wait for someone else to answer then.

Thanks anyway.

minimiller 12-31-2009 16:03

Re: Money text.
 
if its a number, it will work
but i dont think its possible to remove the "$" sign

zacky 12-31-2009 16:21

Re: Money text.
 
Quote:

Originally Posted by minimiller (Post 1038225)
if its a number, it will work
but i dont think its possible to remove the "$" sign

I dont want to remove the $ sign, i just wanna change so it says the number of the variable i wanna use there instead. Do you know how to do that?

minimiller 12-31-2009 16:29

Re: Money text.
 
cs_set_user_money(id, giPoints);
u need to use that whenever points are given or taken away

zacky 12-31-2009 16:32

Re: Money text.
 
Quote:

Originally Posted by minimiller (Post 1038263)
cs_set_user_money(id, giPoints);
u need to use that whenever points are given or taken away

Aw, thats not what i want. You see, when you kill some1 you get money, then that message will change. Even on next round when you get money.

I either want to change that msg, or block getting money from kills and new rounds.

stupok 12-31-2009 16:36

Re: Money text.
 
This code will change the display, but not the user's money. If you want to change the display AND the actual money value, you should use cs_set_user_money().

PHP Code:

//...
new msgid_Money get_user_msgidid"Money" )
//...

SetMoneyidiMoneybool:bFlash )
{
    
message_beginMSG_ONE_UNRELIABLEmsgid_Money_id )
    
write_longiMoney )
    
write_bytebFlash // should the number blink/flash?
    
message_end()




All times are GMT -4. The time now is 04:13.

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