[Ajuda] Algum problema nesse cуdigo?
#1

Bom eu queria saber se hб algum erro neste cуdigo pуis quando digito ele os helpers nгo aparecem

Код:
	if (strcmp(cmd, "/helpers", true) == 0)
	{
		SendClientMessage(playerid, COR_HELPER, "|___[{00CC00}B{FFFF00}L{0000FF}G{058AFF}]___| Helpers Online |___[{00CC00}B{FFFF00}L{0000FF}G{058AFF}]___|:");
  		for(new i = 0; i < MAX_PLAYERS; i++)
		{
            if(IsPlayerConnected(i))
            {
                if(PlayerInfo[i][pHelper] > 0 && PlayerInfo[i][pHelper] < 152)
                {
                    new HelperLevel = PlayerInfo[i][pHelper];
            		GetPlayerName(i, sendername, sizeof(sendername));
            		if(helpertrampando[i] == 0 && PlayerInfo[i][pHelper] >= 1)
            		{
            			format(string, sizeof(string), "{0099FF}Helper{FFFFFF}: %s - {0099FF}Nivel{FFFFFF}: [{02EA9E}%d{FFFFFF}] - {0099FF}Modo{FFFFFF}:{FFFFFF} [{999900}Ajudando{FFFFFF}]", sendername, HelperLevel);
                        SendClientMessage(playerid, COR_HELPER, string);
            		}
            		if(helpertrampando[i] == 0 && PlayerInfo[i][pHelper] >= 1)
            		{
            			format(string, sizeof(string), "{0099FF}Helper{FFFFFF}: %s - {0099FF}Nivel{FFFFFF}: [{02EA9E}%d{FFFFFF}]{FFFFFF} - {0099FF}Modo{FFFFFF}:{FFFFFF} [{CC66FF}Jogando{FFFFFF}]", sendername, HelperLevel);
                        SendClientMessage(playerid, COR_HELPER, string);
                    }
                    if(helpertrampando[i] == 0 && PlayerInfo[i][pHelper] >= 50)
            		{
            			format(string, sizeof(string), "{0099FF}Helper{FFFFFF}: %s - {0099FF}Nivel{FFFFFF}: [{02EA9E}%d{FFFFFF}] - {0099FF}Modo{FFFFFF}:{FFFFFF} [{999900}Ajudando{FFFFFF}]", sendername, HelperLevel);
                        SendClientMessage(playerid, COR_HELPER, string);
            		}
            		if(helpertrampando[i] == 0 && PlayerInfo[i][pHelper] >= 50)
            		{
            			format(string, sizeof(string), "{0099FF}Helper{FFFFFF}: %s - {0099FF}Nivel{FFFFFF}: [{02EA9E}%d{FFFFFF}]{FFFFFF} - {0099FF}Modo{FFFFFF}:{FFFFFF} [{CC66FF}Jogando{FFFFFF}]", sendername, HelperLevel);
                        SendClientMessage(playerid, COR_HELPER, string);
                    }
                    if(helpertrampando[i] == 0 && PlayerInfo[i][pHelper] >=80)
            		{
            			format(string, sizeof(string), "{0099FF}Helper{FFFFFF}: %s - {0099FF}Nivel{FFFFFF}: [{02EA9E}%d{FFFFFF}] - {0099FF}Modo{FFFFFF}:{FFFFFF} [{999900}Ajudando{FFFFFF}]", sendername, HelperLevel);
                        SendClientMessage(playerid, COR_HELPER, string);
            		}
            		else if(helpertrampando[i] == 0 && PlayerInfo[i][pHelper] >= 80)
            		{
            			format(string, sizeof(string), "{0099FF}Helper{FFFFFF}: %s - {0099FF}Nivel{FFFFFF}: [{02EA9E}%d{FFFFFF}]{FFFFFF} - {0099FF}Modo{FFFFFF}:{FFFFFF} [{CC66FF}Jogando{FFFFFF}]", sendername, HelperLevel);
                        SendClientMessage(playerid, COR_HELPER, string);
                    }
                    if(helpertrampando[i] == 0 && PlayerInfo[i][pHelper] >=100)
            		{
            			format(string, sizeof(string), "{0099FF}Helper{FFFFFF}: %s - {0099FF}Nivel{FFFFFF}: [{02EA9E}%d{FFFFFF}] - {0099FF}Modo{FFFFFF}:{FFFFFF} [{999900}Ajudando{FFFFFF}]", sendername, HelperLevel);
                        SendClientMessage(playerid, COR_HELPER, string);
            		}
            		else if(helpertrampando[i] == 0 && PlayerInfo[i][pHelper] >= 100)
            		{
            			format(string, sizeof(string), "{0099FF}Helper{FFFFFF}: %s - {0099FF}Nivel{FFFFFF}: [{02EA9E}%d{FFFFFF}]{FFFFFF} - {0099FF}Modo{FFFFFF}:{FFFFFF} [{CC66FF}Jogando{FFFFFF}]", sendername, HelperLevel);
                        SendClientMessage(playerid, COR_HELPER, string);
                    }
                    if(helpertrampando[i] == 0 && PlayerInfo[i][pHelper] >=150)
            		{
            			format(string, sizeof(string), "{0099FF}Helper{FFFFFF}: %s - {0099FF}Nivel{FFFFFF}: [{02EA9E}%d{FFFFFF}] - {0099FF}Modo{FFFFFF}:{FFFFFF} [{999900}Ajudando{FFFFFF}]", sendername, HelperLevel);
                        SendClientMessage(playerid, COR_HELPER, string);
            		}
            		else if(helpertrampando[i] == 0 && PlayerInfo[i][pHelper] >= 150)
            		{
            			format(string, sizeof(string), "{0099FF}Helper{FFFFFF}: %s - {0099FF}Nivel{FFFFFF}: [{02EA9E}%d{FFFFFF}]{FFFFFF} - {0099FF}Modo{FFFFFF}:{FFFFFF} [{CC66FF}Jogando{FFFFFF}]", sendername, HelperLevel);
                        SendClientMessage(playerid, COR_HELPER, string);
            		}
            	}
             }
        }
        return 1;
    	}
Reply
#2

Quote:
Originally Posted by gugugrp
Посмотреть сообщение
Bom eu queria saber se hб algum erro neste cуdigo pуis quando digito ele os helpers nгo aparecem

Код:
	if (strcmp(cmd, "/helpers", true) == 0)
	{
		SendClientMessage(playerid, COR_HELPER, "|___[{00CC00}B{FFFF00}L{0000FF}G{058AFF}]___| Helpers Online |___[{00CC00}B{FFFF00}L{0000FF}G{058AFF}]___|:");
  		for(new i = 0; i < MAX_PLAYERS; i++)
		{
            if(IsPlayerConnected(i))
            {
                if(PlayerInfo[i][pHelper] > 0 && PlayerInfo[i][pHelper] < 152)
                {
                    new HelperLevel = PlayerInfo[i][pHelper];
            		GetPlayerName(i, sendername, sizeof(sendername));
            		if(helpertrampando[i] == 0 && PlayerInfo[i][pHelper] >= 1)
            		{
            			format(string, sizeof(string), "{0099FF}Helper{FFFFFF}: %s - {0099FF}Nivel{FFFFFF}: [{02EA9E}%d{FFFFFF}] - {0099FF}Modo{FFFFFF}:{FFFFFF} [{999900}Ajudando{FFFFFF}]", sendername, HelperLevel);
                        SendClientMessage(playerid, COR_HELPER, string);
            		}
            		if(helpertrampando[i] == 0 && PlayerInfo[i][pHelper] >= 1)
            		{
            			format(string, sizeof(string), "{0099FF}Helper{FFFFFF}: %s - {0099FF}Nivel{FFFFFF}: [{02EA9E}%d{FFFFFF}]{FFFFFF} - {0099FF}Modo{FFFFFF}:{FFFFFF} [{CC66FF}Jogando{FFFFFF}]", sendername, HelperLevel);
                        SendClientMessage(playerid, COR_HELPER, string);
                    }
                    if(helpertrampando[i] == 0 && PlayerInfo[i][pHelper] >= 50)
            		{
            			format(string, sizeof(string), "{0099FF}Helper{FFFFFF}: %s - {0099FF}Nivel{FFFFFF}: [{02EA9E}%d{FFFFFF}] - {0099FF}Modo{FFFFFF}:{FFFFFF} [{999900}Ajudando{FFFFFF}]", sendername, HelperLevel);
                        SendClientMessage(playerid, COR_HELPER, string);
            		}
            		if(helpertrampando[i] == 0 && PlayerInfo[i][pHelper] >= 50)
            		{
            			format(string, sizeof(string), "{0099FF}Helper{FFFFFF}: %s - {0099FF}Nivel{FFFFFF}: [{02EA9E}%d{FFFFFF}]{FFFFFF} - {0099FF}Modo{FFFFFF}:{FFFFFF} [{CC66FF}Jogando{FFFFFF}]", sendername, HelperLevel);
                        SendClientMessage(playerid, COR_HELPER, string);
                    }
                    if(helpertrampando[i] == 0 && PlayerInfo[i][pHelper] >=80)
            		{
            			format(string, sizeof(string), "{0099FF}Helper{FFFFFF}: %s - {0099FF}Nivel{FFFFFF}: [{02EA9E}%d{FFFFFF}] - {0099FF}Modo{FFFFFF}:{FFFFFF} [{999900}Ajudando{FFFFFF}]", sendername, HelperLevel);
                        SendClientMessage(playerid, COR_HELPER, string);
            		}
            		else if(helpertrampando[i] == 0 && PlayerInfo[i][pHelper] >= 80)
            		{
            			format(string, sizeof(string), "{0099FF}Helper{FFFFFF}: %s - {0099FF}Nivel{FFFFFF}: [{02EA9E}%d{FFFFFF}]{FFFFFF} - {0099FF}Modo{FFFFFF}:{FFFFFF} [{CC66FF}Jogando{FFFFFF}]", sendername, HelperLevel);
                        SendClientMessage(playerid, COR_HELPER, string);
                    }
                    if(helpertrampando[i] == 0 && PlayerInfo[i][pHelper] >=100)
            		{
            			format(string, sizeof(string), "{0099FF}Helper{FFFFFF}: %s - {0099FF}Nivel{FFFFFF}: [{02EA9E}%d{FFFFFF}] - {0099FF}Modo{FFFFFF}:{FFFFFF} [{999900}Ajudando{FFFFFF}]", sendername, HelperLevel);
                        SendClientMessage(playerid, COR_HELPER, string);
            		}
            		else if(helpertrampando[i] == 0 && PlayerInfo[i][pHelper] >= 100)
            		{
            			format(string, sizeof(string), "{0099FF}Helper{FFFFFF}: %s - {0099FF}Nivel{FFFFFF}: [{02EA9E}%d{FFFFFF}]{FFFFFF} - {0099FF}Modo{FFFFFF}:{FFFFFF} [{CC66FF}Jogando{FFFFFF}]", sendername, HelperLevel);
                        SendClientMessage(playerid, COR_HELPER, string);
                    }
                    if(helpertrampando[i] == 0 && PlayerInfo[i][pHelper] >=150)
            		{
            			format(string, sizeof(string), "{0099FF}Helper{FFFFFF}: %s - {0099FF}Nivel{FFFFFF}: [{02EA9E}%d{FFFFFF}] - {0099FF}Modo{FFFFFF}:{FFFFFF} [{999900}Ajudando{FFFFFF}]", sendername, HelperLevel);
                        SendClientMessage(playerid, COR_HELPER, string);
            		}
            		else if(helpertrampando[i] == 0 && PlayerInfo[i][pHelper] >= 150)
            		{
            			format(string, sizeof(string), "{0099FF}Helper{FFFFFF}: %s - {0099FF}Nivel{FFFFFF}: [{02EA9E}%d{FFFFFF}]{FFFFFF} - {0099FF}Modo{FFFFFF}:{FFFFFF} [{CC66FF}Jogando{FFFFFF}]", sendername, HelperLevel);
                        SendClientMessage(playerid, COR_HELPER, string);
            		}
            	}
             }
        }
        return 1;
    	}
Pelo que eu percebi SendClientMessage estб muito grande

tente diminuir .

ex: vocк pode tira as cores
Reply
#3

pawn Код:
if(strcmp(cmd, "/helpers", true) == 0)
{
    SendClientMessage(playerid, COR_ADMIN , "Helpers Online:");
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(PlayerInfo[i][pHelper] == 0) continue;
        GetPlayerName(i, sendername, MAX_PLAYER_NAME);
        switch(PlayerInfo[i][pHelper])
        {
            case 1..49:
            {
                format(string, 128, "{3366FF}Helper{FFFFFF}: %s {3366FF}- Nivel{FFFFFF}: [{CC6633}%s{FFFFFF}]{3366FF} - Modo{FFFFFF}: %s", sendername, HelperLevel, helpertrampando[i] == 1 ? ("[{33CC33}Trabalhando{FFFFFF}]") : ("[{FF00FF}Jogando{FFFFFF}]"));
                SendClientMessage(playerid, COLOR_WHITE, string);
            }
            case 50..79:
            {
                format(string, 128, "{3366FF}Helper{FFFFFF}: %s {3366FF}- Nivel{FFFFFF}: [{CC6633}%s{FFFFFF}]{3366FF} - Modo{FFFFFF}: %s", sendername, HelperLevel, helpertrampando[i] == 1 ? ("[{33CC33}Trabalhando{FFFFFF}]") : ("[{FF00FF}Jogando{FFFFFF}]"));
                SendClientMessage(playerid, COLOR_WHITE, string);
            }
            case 80..99:
            {
                format(string, 128, "{3366FF}Helper{FFFFFF}: %s {3366FF}- Nivel{FFFFFF}: [{CC6633}%s{FFFFFF}]{3366FF} - Modo{FFFFFF}: %s", sendername, HelperLevel, helpertrampando[i] == 1 ? ("[{33CC33}Trabalhando{FFFFFF}]") : ("[{FF00FF}Jogando{FFFFFF}]"));
                SendClientMessage(playerid, COLOR_WHITE, string);
            }
            case 100..149:
            {
                format(string, 128, "{3366FF}Helper{FFFFFF}: %s {3366FF}- Nivel{FFFFFF}: [{CC6633}%s{FFFFFF}]{3366FF} - Modo{FFFFFF}: %s", sendername, HelperLevel, helpertrampando[i] == 1 ? ("[{33CC33}Trabalhando{FFFFFF}]") : ("[{FF00FF}Jogando{FFFFFF}]"));
                SendClientMessage(playerid, COLOR_WHITE, string);
            }
            default:
            {
                format(string, 128, "{3366FF}Helper{FFFFFF}: %s {3366FF}- Nivel{FFFFFF}: [{CC33CC}%s{FFFFFF}]{3366FF} - Modo{FFFFFF}: %s", sendername, HelperLevel, helpertrampando[i] == 1 ? ("[{33CC33}Trabalhando{FFFFFF}]") : ("[{FF00FF}Jogando{FFFFFF}]"));
                SendClientMessage(playerid, COLOR_WHITE, string);
            }
        }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)