20.09.2015, 20:47
Any can give me a base on mysql to save it? I make to load (i think will work), any can give me a base pls?
Код:
CarregarFactions()
{
mysql_tquery(ConnectMYSQL, "SELECT * FROM factions", "Carregar_Factions", "");
return 1;
}
forward Carregar_Factions();
public Carregar_Factions()
{
if(!cache_num_rows()) return 0;
for(new row; row < cache_num_rows(); row++) {
cache_get_field_content(row, "facname", FactionInfo[row][facname]);
cache_get_field_content(row, "lider1", FactionInfo[row][lider1]);
cache_get_field_content(row, "lider2", FactionInfo[row][lider2]);
cache_get_field_content(row, "lider3", FactionInfo[row][lider3]);
cache_get_field_content(row, "membro1", FactionInfo[row][membro1]);
cache_get_field_content(row, "membro2", FactionInfo[row][membro2]);
cache_get_field_content(row, "membro3", FactionInfo[row][membro3]);
cache_get_field_content(row, "membro4", FactionInfo[row][membro4]);
cache_get_field_content(row, "membro5", FactionInfo[row][membro5]);
cache_get_field_content(row, "membro6", FactionInfo[row][membro6]);
cache_get_field_content(row, "membro7", FactionInfo[row][membro7]);
cache_get_field_content(row, "membro8", FactionInfo[row][membro8]);
cache_get_field_content(row, "membro9", FactionInfo[row][membro9]);
cache_get_field_content(row, "membro10", FactionInfo[row][membro10]);
cache_get_field_content(row, "membro11", FactionInfo[row][membro11]);
cache_get_field_content(row, "membro12", FactionInfo[row][membro12]);
FactionInfo[row][HQposX] = cache_get_field_content_float(row, "HQposX");
FactionInfo[row][HQposY] = cache_get_field_content_float(row, "HQposY");
FactionInfo[row][HQposZ] = cache_get_field_content_float(row, "HQposZ");
FactionInfo[row][hq] = cache_get_field_content_int(row, "hq");
FactionInfo[row][cofredinheiro] = cache_get_field_content_int(row, "cofredinheiro");
FactionInfo[row][cofresalario] = cache_get_field_content_int(row, "cofresalario");
FactionInfo[row][cofrematerial] = cache_get_field_content_int(row, "cofrematerial");
FactionInfo[row][cofremaconha] = cache_get_field_content_int(row, "cofremaconha");
FactionInfo[row][EagleSPAWNfac] = cache_get_field_content_int(row, "EagleSPAWNfac");
FactionInfo[row][shotgunSPAWNfac] = cache_get_field_content_int(row, "shotgunSPAWNfac");
FactionInfo[row][spazSPAWNfac] = cache_get_field_content_int(row, "spazSPAWNfac");
FactionInfo[row][mp5SPAWNfac] = cache_get_field_content_int(row, "mp5SPAWNfac");
FactionInfo[row][akSPAWNfac] = cache_get_field_content_int(row, "akSPAWNfac");
FactionInfo[row][m4SPAWNfac] = cache_get_field_content_int(row, "m4SPAWNfac");
FactionInfo[row][rifleSPAWNfac] = cache_get_field_content_int(row, "rifleSPAWNfac");
FactionInfo[row][sniperSPAWNfac] = cache_get_field_content_int(row, "sniperSPAWNfac");
FactionInfo[row][meleeSPAWNfac] = cache_get_field_content_int(row, "meleeSPAWNfac");
}
return 1;
}

