SA-MP Forums Archive
[Ajuda] Comando dando: Unknown command. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Comando dando: Unknown command. (/showthread.php?tid=654780)



Comando dando: Unknown command. - iFaLLeN - 05.06.2018

O comando não esta pegando, que tem de errado?
Code:
	if( !strcmp( cmd, "/admins", true ))
{

	new adml, adm, mdr, hlp, crg;
	new stg2[1500];
	strcat(stg2, "Nome\tCargo\tStatus\n");                                          //foreach(Player, i)
	for(new i = 0; i < MAX_PLAYERS; i++)
	{

		if(dini_IntSet(f(i), "AdminL") == 1)
		{

			if(aInfo[ i ][ Oculto ] == false)
			{

				adml ++;
				format(gStr, sizeof(gStr), "{FFFFFF}%s[{76EEC6}%d{FFFFFF}] \t{FF1493}Dono(a) \t{00FF00}Online\n", PlayerName(i), i);
				strcat(stg2, gStr);
			}
		}
		if(aInfo[ i ][ Admin ] == 1 && dini_IntSet(f(i), "AdminL") == 0)
		{

			if(aInfo[ i ][ Oculto ] == false)
			{

				adm ++;
				format(gStr, sizeof(gStr), "{FFFFFF}%s[{76EEC6}%d{FFFFFF}] \t{1E90FF}Administrador(a) \t{00FF00}Online\n", PlayerName(i), i);
				strcat(stg2, gStr);
			}
		}
		if(aInfo[ i ][ Moderador ] == 1 && dini_IntSet(f(i), "AdminL") == 0)
		{

			if(aInfo[ i ][ Oculto ] == false)
			{

				mdr ++;
				format(gStr, sizeof(gStr), "{FFFFFF}%s[{76EEC6}%d{FFFFFF}] \t{FF7F24}Moderador(a) \t{00FF00}Online\n", PlayerName(i), i);
				strcat(stg2, gStr);
			}
		}
		if(aInfo[ i ][ Ajudante ] == 1 && dini_IntSet(f(i), "AdminL") == 0)
		{

			if(aInfo[ i ][ Oculto ] == false)
			{

				hlp ++;
				format(gStr, sizeof(gStr), "{FFFFFF}%s[{76EEC6}%d{FFFFFF}] \t{43CD80}Ajudante \t{00FF00}Online\n", PlayerName(i), i);
				strcat(stg2, gStr);
			}
		}
     if(aInfo[i][ Socio ] == 1 && dini_IntSet(f(i), "AdminL") == 0)
		{

			if(aInfo[ i ][ Oculto ] == false)
			{

				crg ++;
				format(gStr, sizeof(gStr), "{FFFFFF}%s[{76EEC6}%d{FFFFFF}] \t{98F5FF}Corregedor(a) \t{00FF00}Online\n", PlayerName(i), i);
				strcat(stg2, gStr);
			}
		}
	}
	new teste = crg+adml+adm+mdr+hlp;
	if(teste == 0) return SendClientMessage(playerid, COLOR_SISTEMA, "| INFO ADMIN |{FFFFFF} Nenhum Staff online no momento [L.S]!");
	format(hFile, sizeof(hFile), "{FFFFFF}•{FFFFFF} Staff PFL Online [{76EEC6}%d{FFFFFF}]",teste);
	ShowPlayerDialog(playerid, 1447, DIALOG_STYLE_TABLIST_HEADERS, hFile, stg2, "Fechar", "");
	return 1;
}



Re: Comando dando: Unknown command. - MtPlayerZ - 06.06.2018

Quote:
Originally Posted by iFaLLeN
View Post
O comando nгo esta pegando, que tem de errado?
Code:
	if( !strcmp( cmd, "/admins", true ))
{

	new adml, adm, mdr, hlp, crg;
	new stg2[1500];
	strcat(stg2, "Nome\tCargo\tStatus\n");                                          //foreach(Player, i)
	for(new i = 0; i < MAX_PLAYERS; i++)
	{

		if(dini_IntSet(f(i), "AdminL") == 1)
		{

			if(aInfo[ i ][ Oculto ] == false)
			{

				adml ++;
				format(gStr, sizeof(gStr), "{FFFFFF}%s[{76EEC6}%d{FFFFFF}] \t{FF1493}Dono(a) \t{00FF00}Online\n", PlayerName(i), i);
				strcat(stg2, gStr);
			}
		}
		if(aInfo[ i ][ Admin ] == 1 && dini_IntSet(f(i), "AdminL") == 0)
		{

			if(aInfo[ i ][ Oculto ] == false)
			{

				adm ++;
				format(gStr, sizeof(gStr), "{FFFFFF}%s[{76EEC6}%d{FFFFFF}] \t{1E90FF}Administrador(a) \t{00FF00}Online\n", PlayerName(i), i);
				strcat(stg2, gStr);
			}
		}
		if(aInfo[ i ][ Moderador ] == 1 && dini_IntSet(f(i), "AdminL") == 0)
		{

			if(aInfo[ i ][ Oculto ] == false)
			{

				mdr ++;
				format(gStr, sizeof(gStr), "{FFFFFF}%s[{76EEC6}%d{FFFFFF}] \t{FF7F24}Moderador(a) \t{00FF00}Online\n", PlayerName(i), i);
				strcat(stg2, gStr);
			}
		}
		if(aInfo[ i ][ Ajudante ] == 1 && dini_IntSet(f(i), "AdminL") == 0)
		{

			if(aInfo[ i ][ Oculto ] == false)
			{

				hlp ++;
				format(gStr, sizeof(gStr), "{FFFFFF}%s[{76EEC6}%d{FFFFFF}] \t{43CD80}Ajudante \t{00FF00}Online\n", PlayerName(i), i);
				strcat(stg2, gStr);
			}
		}
     if(aInfo[i][ Socio ] == 1 && dini_IntSet(f(i), "AdminL") == 0)
		{

			if(aInfo[ i ][ Oculto ] == false)
			{

				crg ++;
				format(gStr, sizeof(gStr), "{FFFFFF}%s[{76EEC6}%d{FFFFFF}] \t{98F5FF}Corregedor(a) \t{00FF00}Online\n", PlayerName(i), i);
				strcat(stg2, gStr);
			}
		}
	}
	new teste = crg+adml+adm+mdr+hlp;
	if(teste == 0) return SendClientMessage(playerid, COLOR_SISTEMA, "| INFO ADMIN |{FFFFFF} Nenhum Staff online no momento [L.S]!");
	format(hFile, sizeof(hFile), "{FFFFFF}•{FFFFFF} Staff PFL Online [{76EEC6}%d{FFFFFF}]",teste);
	ShowPlayerDialog(playerid, 1447, DIALOG_STYLE_TABLIST_HEADERS, hFile, stg2, "Fechar", "");
	return 1;
}
Verifique se esse comando esta dentro da public OnPlayerCommandText, se nгo estiver, provavelmente й esse o erro.
De uma olhadinha: https://sampwiki.blast.hk/wiki/OnPlayerCommandText


Re: Comando dando: Unknown command. - MtPlayerZ - 07.06.2018

@UP!