Help me
#2

Quote:
Originally Posted by Mariciuc223
Посмотреть сообщение
Hello guys , i have a little question for you :

How can i make a Integer who is > 1000 to appear me 1,000 or if it's 1232344 for example it appear 1.232.344 ! sorry for my really bad english , so i left a code down there ... maybe see what i say ..

Код HTML:
new String[128];
format(String, sizeof(String), "Hello, you have {008000}$%i{FFFFFF} !", GetPlayerMoney(playerid));
SendClientMessage(playerid, -1, String);
And i want message to look like those message [depends of money]:

Hello, you have $3.496 ! ==> means $3496
Hello, you have $232.127 ! ==> means $232127
Hello, you have $3.232.566 ! ==> means $3232566
Hello, you have $232.232.566 ! ==> means $232232566
Hello, you have $1.032.232.566 ! ==> means $1032232566

I think you understand what i try to explain with my very bad english o.O
This is for max 1.000.000, you can do the rest yourself I hope, else unfortunate, couldnt bother doing it for higher amounts.
PHP код:
new sAmount[64], sConvert[64], sA[64], sB[64], iMoniez;
iMoniez GetPlayerMoney(playerid);
format(sAmountsizeof(sAmount), "%d"iMoniez);
if (
iMoniez >= 1000 && iMoniez 1000000)
{
    
strmid(sAsAmount0strlen(sAmount)-3);
    
strmid(sBsAmountstrlen(sAmount)-3strlen(sAmount));
    
format(sConvertsizeof(sConvert), "%s.%s"sAsB);
    return 
1;

sConvert will be the amount of money thats convert from for example 950000 to 950.000, its in string format.
Reply


Messages In This Thread
Help me - by Mariciuc223 - 15.07.2015, 09:47
Re: Help me ++REP - by notime - 15.07.2015, 10:37
Re: Help me ++REP - by !damo!spiderman - 15.07.2015, 10:39
Re: Help me ++REP - by notime - 15.07.2015, 10:42
Re: Help me - by liquor - 15.07.2015, 10:47
Re: Help me - by !damo!spiderman - 15.07.2015, 10:52
Re: Help me - by liquor - 15.07.2015, 10:55
Re: Help me - by Virtual1ty - 15.07.2015, 12:27
Re: Help me - by Mariciuc223 - 15.07.2015, 12:45

Forum Jump:


Users browsing this thread: 5 Guest(s)