Find player id (from name)
#1

Hi guys,

I need help how to make command which will give you list of players with that name.For example if I have on server
ID 0: John_Smith
ID 1: John_Williams
ID 2: John_Taylor

When I type /find John he need to give me list of that names.

For example if I do this:

Код:
YCMD:find(playerid, params[],help)
{
	new string[75], target;
	if(sscanf(params, "u", target))
	{
		return 1;
	}
	if(IsPlayerConnected(target))
	{
		if(target != INVALID_PLAYER_ID)
		{
			format(string, sizeof(string), "(%d) %s",target,GetName(target));
			SendClientMessage(playerid, -1, string);
		}
	}
	return 1;
}
He will give me just first ID(John_Smith) ..I need all names which have John.
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=602923

Read Users section (bottom of first post)
Reply
#3

I'm find it,thank you very much.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)