Search Player Name in Dialog [REP+]
#6

This function can help you to get player ID from player name, so when you get player id you can get other infos

Код:
stock GetPlayerIDS(string[])
{
    new testname[MAX_PLAYER_NAME];
    for(new i=0; i<MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{

				GetPlayerName(i, testname, sizeof(testname));
				if(!strcmp(testname, string, true))
				{
					return i;
				}

		}
	}
	return INVALID_PLAYER_ID;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)