03.09.2009, 11:52
Код:
//in a command SendClientMessage(playerid, COLOR_LIME, "----- CONTACTS -----"); for(new c = 0; c <= 8; c++) { SendFormattedMessage(playerid, COLOR_WHITE, "%d] %s - %d", c++, GetPlayerNameByPhone(Contacts[playerid][c]), GetPlayerPhoneByName(playerid)); } //functions stock GetPlayerNameByPhone(phonenumb) { new phone[64], pname[MAX_PLAYER_NAME]="Nobody"; for(new i = 0; i <= MAX_PLAYERS; i++){ format(phone, sizeof(phone), "/Phones/%s.dini.save", GetName(i)); if(dini_Exists(phone)){ if(Phone[i][pPhoneNumber] == phonenumb) return GetName(i); } } return pname; } stock GetPlayerPhoneByName(name[MAX_PLAYER_NAME]) { new phone[64]; format(phone, sizeof(phone), "/Phones/%s.dini.save", name); if(strcmp(name,"Nobody", false ) != 0){ if(dini_Exists(phone)){ return dini_Int(phone, "Number"); } } return 255; }
But instead it goes 0, 2, 3, 4, 8. Instead of 0, 1, 2, 3, 4, 5, 6, 7, 8