Question for strings
#6

Instead of making those many strings, you can do it in one string..
PHP код:
public PayDay()
{
    new 
payday[830];
    foreach(
Playeri)
    {
        if(
IsPlayerConnected(i) && gPlayerLogged[i] == 1)
        {
            
format(paydaysizeof(payday),"        {FFFFFF}|___{00FFFF}BANKARSKI IZVESTAJ{FFFFFF}___|");
            
format(paydaysizeof(payday),"%s\n{00FFFF}Plata: {FFFFFF}$%d"paydaychecks);
            
format(paydaysizeof(payday),"%s\n{00FFFF}Steceni interes: {FFFFFF}$%d"payday,interes);
            
format(paydaysizeof(payday),"%s\n{00FFFF}Kamatna stopa: {FFFFFF}0.%d posto"payday,kamatnastopa);
            
format(paydaysizeof(payday),"%s\n\n        {FFFFFF}|---------------- {00FFFF}Racuni {FFFFFF}----------------|",payday);
            
format(paydaysizeof(payday),"%s\n{00FFFF}Racun za struju: {FFFFFF}$%d"payday,struja);
            
format(paydaysizeof(payday),"%s\n{00FFFF}Racun za vodu: {FFFFFF}$%d"payday,voda);
            
format(paydaysizeof(payday),"%s\n{00FFFF}Racun za komunalije: {FFFFFF}$%d"payday,komunalije);
            
format(paydaysizeof(payday),"%s\n\n        {FFFFFF}|---------------- {00FFFF}Porezi {FFFFFF}----------------|",payday);
            
format(paydaysizeof(payday),"%s\n{00FFFF}Rent: {FFFFFF}%d",payday,rent);
            
format(paydaysizeof(payday),"%s\n{00FFFF}Porez na bogatstvo: {FFFFFF}$%d",payday,porezbogastvo);
            
format(paydaysizeof(payday),"%s\n\n        {FFFFFF}|-----------------------------------------------|",payday);
            
format(paydaysizeof(payday),"%s\n{00FFFF}Staro Stanje: {FFFFFF}$%d{FFFFFF}",paydayPlayerInfo[i][pAccount] - checks interes + (porezbogastvo struja voda komunalije));
            
format(paydaysizeof(payday),"%s\n{00FFFF}Novo Stanje: {FFFFFF}$%d",payday,PlayerInfo[i][pAccount]);
            
format(paydaysizeof(payday),"%s\n\n        {FFFFFF}|-----------------------------------------------|",payday);
            
ShowPlayerDialog(iPLATADIALOG_STYLE_MSGBOX"Bankarski izvestaj gradjana"payday "U redu""");
        }
    }

PS: sorry vince.. Just saw your post.. Tut none wanted to help him :*
Reply


Messages In This Thread
Question for strings - by DusanInfinity - 21.12.2015, 10:03
Re: Question for strings - by RoboN1X - 21.12.2015, 10:08
Re: Question for strings - by DusanInfinity - 21.12.2015, 10:15
Re: Question for strings - by Vince - 21.12.2015, 10:21
Re: Question for strings - by jamesbond007 - 21.12.2015, 11:41
Re: Question for strings - by Mic_H - 21.12.2015, 13:09
Re: Question for strings - by DusanInfinity - 21.12.2015, 19:13
Re: Question for strings - by AmigaBlizzard - 21.12.2015, 20:31
Re: Question for strings - by SickAttack - 21.12.2015, 21:48
Re: Question for strings - by DusanInfinity - 22.12.2015, 19:23

Forum Jump:


Users browsing this thread: 3 Guest(s)