24.08.2010, 14:02
(
Последний раз редактировалось Cameltoe; 24.08.2010 в 15:24.
)
Hello i'm trying to make a simple clan system.
Heres the function:
Here's the Clan enum's:
I need something like this(Obviously don't work..) :
Heres the function:
pawn Код:
public LoadClanMembers(clanid)
{
printf("%d.",clanid);
new string[128];
format(string, sizeof(string), "SELECT * FROM clanmembers WHERE clanid='%d'", clanid);
mysql_query(string);
mysql_store_result();
if(!mysql_num_rows())
{
printf("None found");
mysql_free_result();
}
else
{
new row[100];
new field[5][50];
mysql_fetch_row(row, "|");
explode(field, row, "|");
// Fetching
}
}
pawn Код:
// Group [ Clan ]
enum gInfo
{
gId,
gTag[50],
gPos,
gSlots,
gBoss[1],
gUnderBoss[2],
gMember[MAX_CLAN_MEMBERS],
}
pawn Код:
format(string, sizeof(string), "SELECT username FROM clanmembers WHERE clanid='%d'", clanid);
new Array[MAX_CLAN_MEMBERS] = mysql_query_array(string);
for(new i; i < MAX_CLAN_MEMBERS; i++)
{
gMember[i] = Array[i];
}