01.01.2015, 18:36
Line 17082 is:
PHP код:
stock GiveMoney(playerid, money)
{
new str[128];
if(money > 0)
{
format(str, sizeof(str), "~g~+%s$", AddCommas(money));
GameTextForPlayer(playerid, str, 3000, 1);
}
else if(money < 0)
{
format(str, sizeof(str), "~r~%s$", AddCommas(money)); //HERE 17082
GameTextForPlayer(playerid, str, 3000, 1);
}
PInfo[playerid][Cash] += money;
ResetPlayerMoney(playerid);
GivePlayerMoney(playerid, PInfo[playerid][money]);
return 0;
}
stock AddCommas(number)
{
new
tStr[13]; // Up to 9,999,999,999,999
format(tStr,sizeof(tStr),"%d",number);
if(strlen(tStr) < 4)
return tStr;
new
//rNumber = floatround((number+(number/3)),floatround_floor),
iPos = strlen(tStr),
iCount = 1;
while(iPos > 0)
{
if(iCount == 4)
{
iCount = 0;
strins(tStr,",",iPos,1);
iPos ++;
}
iCount ++;
iPos --;
}
return tStr;
}