SA-MP Forums Archive
[Ajuda] Procurar nome - 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] Procurar nome (/showthread.php?tid=551465)



Procurar nome - zqkRazer - 19.12.2014

Queria fazer um sistema de ir pro a/d sу quem esta com uma tag especifica mais ta dando erro ;-;

Код:
new name[MAX_PLAYER_NAME],
        azt[MAX_PLAYER_NAME]; //<< TODOS QUE TIVER COM A TAG AZT VAI PRO A/D
	for (new i = 0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
			if(name[i] == azt[i]); // << linha do erro
			GetPlayerName(i, name, MAX_PLAYER_NAME);
			AAD_Vai[i] = 0;
}



Re: Procurar nome - Seidel - 19.12.2014

Comparaзгo de valores normal й usada para inteiros.

Para strings use strcmp.

Recomendo vocк fazer uma verificaзгo com strfind aн.


Re: Procurar nome - davi54723 - 19.12.2014

pawn Код:
GetPlayerName(playerid, player, sizeof(player));
if(strfind(player,"AZT,true) != -1)
{
..... lalalala
}



Re: Procurar nome - zqkRazer - 20.12.2014

Valeu :d