verteich
Умник
когда я создаю семью у меня так назначаеся лидер у семьи:
проверка такая:
после рестарта мне не доступна та или ная команда из за проверки, так загружается семья:
Если нужно будет кину создание семьи
PHP:
format(FamilyInfo[TOTALFAMILY][famCreator], MAX_PLAYER_NAME, Name(playerid));
PHP:
if(!GetString(Name(playerid), FamilyInfo[PI[playerid][pFamilyMember]][famCreator]) || !GetString(Name(playerid), FamilyInfo[PI[playerid][pFamilyMember]][famZam]) || !GetString(Name(playerid), FamilyInfo[PI[playerid][pFamilyMember]][famZam2]))
return 1;
PHP:
@LoadFamily();
@LoadFamily()
{
new time = GetTickCount();
new rows, fields;
cache_get_data(rows, fields);
if(rows)
{
for(new i = 0; i < rows; i++)
{
FamilyInfo[i+1][famID] = cache_get_field_content_int(i, "id", mysql);
cache_get_field_content(i, "slogan", FamilyInfo[i+1][famSlogan], mysql);
cache_get_field_content(i, "name", FamilyInfo[i+1][famName], mysql);
FamilyInfo[i+1][famMembersCount] = cache_get_field_content_int(i, "memberscount", mysql);
cache_get_field_content(i, "creator", FamilyInfo[i+1][famCreator], mysql);
cache_get_field_content(i, "zam", FamilyInfo[i+1][famZam], mysql);
cache_get_field_content(i, "zam2", FamilyInfo[i+1][famZam2], mysql);
FamilyInfo[i+1][famChatColor] = cache_get_field_content_int(i, "chatcolor", mysql);
FamilyInfo[i+1][famGalka] = cache_get_field_content_int(i, "galka", mysql);
cache_get_field_content(i, "discord", FamilyInfo[i+1][famDiscord], mysql);
cache_get_field_content(i, "raidcall", FamilyInfo[i+1][famRaidCall], mysql);
TOTALFAMILY ++;
}
}
printf("[Загружено семей]: <%i>. Потрачено: <%i ms>.", TOTALFAMILY, GetTickCount() - time);
return 1;
}
