Umm help please
#6

Код:
ReturnUser(text[])
{
	new pos = 0;
	while (text[pos] < 0x21)
	{
		if (text[pos] == 0) return INVALID_PLAYER_ID;
		pos++;
	}
	new userid = INVALID_PLAYER_ID;
	if (IsNumeric(text[pos]))
	{
		userid = strval(text[pos]);
		if (userid >=0 && userid < MAX_PLAYERS)
		{
			if(!IsPlayerConnected(userid))
			{
				userid = INVALID_PLAYER_ID;
			}
			else
			{
				return userid;
			}
		}
	}
	new giveid;
	new GetPlayer[20];
	for (giveid=0; giveid<=MAX_PLAYERS; giveid++)
	{
	    if (IsPlayerConnected(giveid))
	    {
			GetPlayerName(giveid,GetPlayer,16);
			new space = (strfind(GetPlayer, text));
			if (space != -1)
			{
				return giveid;
			}
	    }
    }
    return userid;
}
Put this at the end of your script, out of any callback.
Reply


Messages In This Thread
Umm help please - by kujox32 - 05.05.2010, 03:25
Re: Umm help please - by Backwardsman97 - 05.05.2010, 04:06
Re: Umm help please - by kujox32 - 05.05.2010, 14:58
Re: Umm help please - by johnnyc - 05.05.2010, 16:03
Re: Umm help please - by rbN. - 05.05.2010, 16:05
Re: Umm help please - by Killa_ - 05.05.2010, 16:17

Forum Jump:


Users browsing this thread: 1 Guest(s)