[HELP]GetPlayerNameByPhone
#1

Код:
#define MIN_PHONE_NUM 100000
#define MAX_PHONE_NUM 999999

stock GetPlayerNameByPhone(phonenumb)
{
  new phone[64], name[MAX_PLAYER_NAME] = "Nobody";
  for(new p = MIN_PHONE_NUM; p <= MAX_PHONE_NUM; p++)
  {
  	format(phone, sizeof(phone), "/Phones/%s.dini.save", GetName(p));
	if(dini_Int(phone, "Number") == phonenumb) { name = GetName(p); }
  }
  return name;
}
Ok, Well i want this command to get a players name by the phone number saved in there file. But i want to get be able to get it even though the other player is not in the game.

Basically my real problem is how the hell do i loop through 888888 player files?
Reply
#2

Use a database.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)