Jump to content

Question

Posted

Salut am facut si eu la server chestia cu puncte la bani sa apare asa 20.000.000

si nu merge

private GroupDigit(number)
{
	/*
	    Example:
	    printf("%s",GroupDigit(-59032);
	    Will print: -59.032
	*/

	new cmoney[18];
	new bool:signed = false;

	if(number < 0) { number = -number; signed = true; }
	format(cmoney,sizeof(cmoney),"%d",number);

 	switch(strlen(cmoney))
	{
		case 4: strins(cmoney,".",1); // 2.000$
		case 5: strins(cmoney,".",2); // 20.000$
	 	case 6: strins(cmoney,".",3); // 200.000$

		case 7: { strins(cmoney,".",1); strins(cmoney,".",5); } // 2.000.000$
	  	case 8: { strins(cmoney,".",2); strins(cmoney,".",6); } // 20.000.000$
		case 9: { strins(cmoney,".",3); strins(cmoney,".",7); } // 200.000.000$

		case 10: { strins(cmoney,".",1); strins(cmoney,".",5); strins(cmoney,".",9);  } // 2.000.000.000$
	    case 11: { strins(cmoney,".",2); strins(cmoney,".",6); strins(cmoney,".",10); } // 20.000.000.000$
	    case 12: { strins(cmoney,".",3); strins(cmoney,".",7); strins(cmoney,".",11); } // 200.000.000.000$
	}
    if(signed) strins(cmoney,"-",0);

    return cmoney;
}
Am pus asa sa apara la status si nu apare , apare 49$ si eu 500k in banca.
format(coordsstring, sizeof(coordsstring), "Level:[%d] Sex:[%s] Age:[%d] Origin:[%s] Cash:[$%d] Bank:[$%d] Ph:[%d]", level,atext,age,otext,GroupDigit(cash),GroupDigit(account),pnumber);

6 answers to this question

Recommended Posts

Posted
Click si uitate dupa FormatNumber, e mult mai bun.
Posted

Tot nu merge

format(coordsstring, sizeof(coordsstring), "Level:[%d] Sex:[%s] Age:[%d] Origin:[%s] Cash:[$%d] Bank:[$%d] Ph:[%d]", level,atext,age,otext,FormatNumber(cash),FormatNumber(account),pnumber);

Posted

Ce anume nu merge?

Explica ca sa inteleg.

Posted

Apare cand dau /stats imi apare la bani in mana 49 si eu am 500k si in banca tot asa..

Fara FormatNumber ai incercat sa vezi daca iti apare bine?

Poate sa fie problema din alta parte.

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.