Help about 2 things
#2

foreach loops through connected players ONLY so the check is not needed. The problem is that you format the message but you don't join it with the previous text. switch is also much faster than if/else if. You also got value 13 twice, I guess it's meant to be 14? If not, modify it. Last you forgot the new lines:
PHP код:
CMD:lideri(playeridparams[])
{
    new 
string[564];
    foreach(
Playeri)
    {
        switch (
PI[i][Lider])
        {
            case 
1format(stringsizeof(string), "%s{FBDF89} (( {00C0FF}Policija: {FFFFFF}%s / {FBDF89}ID:{FFFFFF}%d / {FBDF89}Telefon: {FFFFFF}%d.))\n"stringImeIgraca(i), iPI[i][Telefon]);
            case 
2format(stringsizeof(string), "%s{FBDF89} (( {0049FF}Federalni Biro: {FFFFFF}%s / {FBDF89}ID:{FFFFFF}%d / {FBDF89}Telefon: {FFFFFF}%d.))\n"stringImeIgraca(i), iPI[i][Telefon]);
            case 
3format(stringsizeof(string), "%s{FBDF89} (( {FF00EA}Hitna Pomoc: {FFFFFF}%s / {FBDF89}ID:{FFFFFF}%d / {FBDF89}Telefon: {FFFFFF}%d.))\n"stringImeIgraca(i), iPI[i][Telefon]);
            case 
4format(stringsizeof(string), "%s{FBDF89} (( {C3C3C3}CNN: {FFFFFF}%s / {FBDF89}ID:{FFFFFF}%d / {FBDF89}Telefon: {FFFFFF}%d.))\n"stringImeIgraca(i), iPI[i][Telefon]);
            case 
5format(stringsizeof(string), "%s{FBDF89} (( {6EF83C}Grove Street: {FFFFFF}%s / {FBDF89}ID:{FFFFFF}%d / {FBDF89}Telefon: {FFFFFF}%d.))\n"stringImeIgraca(i), iPI[i][Telefon]);
            case 
6format(stringsizeof(string), "%s{FBDF89} (( {B700FF}Ballas: {FFFFFF}%s / {FBDF89}ID:{FFFFFF}%d / {FBDF89}Telefon: {FFFFFF}%d.))\n"stringImeIgraca(i), iPI[i][Telefon]);
            case 
7format(stringsizeof(string), "%s{FBDF89} (( {FFAF00}Hells Angels: {FFFFFF}%s / {FBDF89}ID:{FFFFFF}%d / {FBDF89}Telefon: {FFFFFF}%d.))\n"stringImeIgraca(i), iPI[i][Telefon]);
            case 
8format(stringsizeof(string), "%s{FBDF89} (( {F3FF02}Los Surrenos: {FFFFFF}%s / {FBDF89}ID:{FFFFFF}%d / {FBDF89}Telefon: {FFFFFF}%d.))\n"stringImeIgraca(i), iPI[i][Telefon]);
            case 
9format(stringsizeof(string), "%s{FBDF89} (( {A90202}Yamaguchi: {FFFFFF}%s / {FBDF89}ID:{FFFFFF}%d / {FBDF89}Telefon: {FFFFFF}%d.))\n"stringImeIgraca(i), iPI[i][Telefon]);
            case 
10format(stringsizeof(string), "%s{FBDF89} (( {FFA1A1}La Familia Sinatra: {FBDF89}{FFFFFF}%s / {FBDF89}ID:{FFFFFF}%d / {FBDF89}Telefon: {FFFFFF}%d.))\n"stringImeIgraca(i), iPI[i][Telefon]);
            case 
11format(stringsizeof(string), "%s{FBDF89} (( {FF00EA}The Pink Panthers: {FFFFFF}%s / {FBDF89}ID:{FFFFFF}%d / {FBDF89}Telefon: {FFFFFF}%d.))\n"stringImeIgraca(i), iPI[i][Telefon]);
            case 
12format(stringsizeof(string), "%s{FBDF89} (( {F300FF}Russian Mafia: {FFFFFF}%s / {FBDF89}ID:{FFFFFF}%d / {FBDF89}Telefon: {FFFFFF}%d.))\n"stringImeIgraca(i), iPI[i][Telefon]);
            case 
13format(stringsizeof(string), "%s{FBDF89} (( {F300FF}Hitman: {FFFFFF}%s / {FBDF89}ID:{FFFFFF}%d / {FBDF89}Telefon: {FFFFFF}%d.))\n"stringImeIgraca(i), iPI[i][Telefon]);
            case 
14format(stringsizeof(string), "%s{FBDF89} (( {B7FF00}Condor: {FFFFFF}%s / {FBDF89}ID:{FFFFFF}%d / {FBDF89}Telefon: {FFFFFF}%d.))\n"stringImeIgraca(i), iPI[i][Telefon]);
        }
    }
    if (!
isnull(string)) SPD(playerid1016DIALOG_STYLE_MSGBOX"Online Lideri"string"Uredu""");
    return 
1;

---

I don't know about the second problem but the tag is not needed:
pawn Код:
Update3DTextLabelText(NameTag[playerid], -1, strn);
Reply


Messages In This Thread
Help about 2 things - by ShoortyFl - 14.06.2015, 16:19
Re: Help about 2 things - by Konstantinos - 14.06.2015, 16:31
Re: Help about 2 things - by Virtual1ty - 14.06.2015, 16:32
Re: Help about 2 things - by ShoortyFl - 14.06.2015, 18:01

Forum Jump:


Users browsing this thread: 1 Guest(s)