public PayDay( ) { for(new i=0; i<MAX_PLAYERS; i++) { new String[128], String2[128], s[128], RandomSum; new Stringfm1[64], Stringfm2[64], //Stringfm3[64], Stringfm4[64]; RandomSum = random(1000*pInfo[i][pLevel]-900*pInfo[i][pLevel]) + 900*pInfo[i][pLevel]; format(String2, sizeof(String2), "PayCheck: $%s | Balance: $%s", FormatMoney(RandomSum, Stringfm1), FormatMoney(pInfo[i][pBankCash], Stringfm2)); format(s, sizeof(s), "Interest gained: 0.1 | Gained money: $%i", 1/10/100 * pInfo[i][pBankCash]); format(String,sizeof(String), "New Balance: $%s", FormatMoney(pInfo[i][pBankCash] + 1/10/100 * pInfo[i][pBankCash], Stringfm4)); SendClientMessage(i, FactColor[0], "___________________ [ BANK STATMENT ] _____________________"); SendClientMessage(i, FactColor[0], ""); SendClientMessage(i, FactColor[0], String2); SendClientMessage(i, FactColor[0], s); SendClientMessage(i, FactColor[0], "___________________ [ NEW STATEMENT ] _____________________"); SendClientMessage(i, FactColor[0], String); pInfo[i][pBankCash] += (0.001 * pInfo[i][pBankCash]); GivePlayerMoney(i, RandomSum); pInfo[i][pRespectPoints] ++; if(pInfo[i][pRobPoints] < 10) pInfo[i][pRobPoints] ++; if(pInfo[i][pFBlackList] > 0) pInfo[i][pFBlackList] --; } return 1; }
printf("pBankCash: %d",pInfo[i][pBankCash]);
format(s, sizeof(s), "Interest gained: 0.1 | Gained money: $%f", 1/10/100 * pInfo[i][pBankCash]);
enum PlayerInfo { pPass, pLevel, pSex, pAge, pSpawnHealth, pCash, pBankCash, pPhoneNr, pRespectPoints, pWarnings, pFactionW, pLotto, pWanted, pJail, pRobPoints, pKills, pDeaths, pJob, pDrugs, pFBlackList, pMaterials, pAdmin, pHelper, pFaction, pLeader, pRank, pSkin, pTutorial }; new pInfo[MAX_PLAYERS][PlayerInfo];
public LoadUser_data(playerid,name[],value[]) { // ..... INI_Int("Money", pInfo[playerid][pCash]); INI_Int("BankMoney", pInfo[playerid][pBankCash]); // .... return 1; }
enum PlayerInfo
{
pPass, pLevel, pSex, pAge, pSpawnHealth, pCash, pBankCash,
pPhoneNr, pRespectPoints, pWarnings, pFactionW, pLotto,
pWanted, pJail, pRobPoints, pKills, pDeaths, pJob, pDrugs,
pFBlackList, pMaterials, pAdmin, pHelper, pFaction, pLeader,
pRank, pSkin, pTutorial
};
enum PlayerInfo
{
pPass, pLevel, pSex, pAge, pSpawnHealth, pCash, Float:pBankCash,
pPhoneNr, pRespectPoints, pWarnings, pFactionW, pLotto,
pWanted, pJail, pRobPoints, pKills, pDeaths, pJob, pDrugs,
pFBlackList, pMaterials, pAdmin, pHelper, pFaction, pLeader,
pRank, pSkin, pTutorial
};
PHP код:
PHP код:
- Mencent ![]() |
format(s, sizeof(s), "Interest gained: 0.1 | Gained money: $%f", float(1/10/100 * pInfo[i][pBankCash]));