loading groups problem.. -
pawn Код:
stock LoadGroup(id)
{
new data[70];
format(GlobalQuery1, sizeof(GlobalQuery1), "SELECT * FROM `Groups` WHERE `Groupid` = %d LIMIT 1",id);
mysql_query(GlobalQuery1);
mysql_store_result();
if(mysql_num_rows() > 0)
{
new line[700];
while(mysql_fetch_row(line))
{
new Gstr[9][70],Gvar[1];
sscanf(line, "p<|>ds[70]s[70]s[70]s[70]s[70]s[70]s[70]s[70]s[70]",Gvar[0],Gstr[0],Gstr[1],Gstr[2],Gstr[3],Gstr[4],Gstr[5],Gstr[6],Gstr[7],Gstr[8]);
Groups[id][Groupid] = Gvar[0];
strmid(Groups[id][GroupName], Gstr[0], false, strlen(Groups[id][GroupName]), 70);
strmid(Groups[id][RankName0], Gstr[1], false, strlen(Groups[id][RankName0]), 70);
strmid(Groups[id][RankName1], Gstr[2], false, strlen(Groups[id][RankName1]), 70);
strmid(Groups[id][RankName2], Gstr[3], false, strlen(Groups[id][RankName2]), 70);
strmid(Groups[id][RankName3], Gstr[4], false, strlen(Groups[id][RankName3]), 70);
strmid(Groups[id][RankName4], Gstr[5], false, strlen(Groups[id][RankName4]), 70);
strmid(Groups[id][RankName5], Gstr[6], false, strlen(Groups[id][RankName5]), 70);
strmid(Groups[id][RankName6], Gstr[7], false, strlen(Groups[id][RankName6]), 70);
strmid(Groups[id][MOTD], Gstr[8], false, strlen(Groups[id][MOTD]), 70);
GroupCount++;
printf("Loaded Groupid:%d",id);
printf("Groupid:%d Name:%s Rank0:%s Rank1:%s Rank2:%s Rank3:%s Rank4:%s Rank5:%s Rank6:%s MOTD:%s",
Groups[id][Groupid],Groups[id][GroupName],Groups[id][RankName0],Groups[id][RankName1],Groups[id][RankName2],
Groups[id][RankName3],Groups[id][RankName4],Groups[id][RankName5],Groups[id][RankName6],Groups[id][MOTD]);
}
mysql_fetch_field("Groupid",data);
Groups[id][Groupid]=strval(data);
mysql_fetch_field("GroupName",data);
strmid(Groups[id][GroupName], data, false, strlen(Groups[id][GroupName]), 70);
mysql_fetch_field("RankName0",data);
strmid(Groups[id][RankName0], data, false, strlen(Groups[id][RankName0]), 70);
mysql_fetch_field("RankName1",data);
strmid(Groups[id][RankName1], data, false, strlen(Groups[id][RankName1]), 70);
mysql_fetch_field("RankName2",data);
strmid(Groups[id][RankName2], data, false, strlen(Groups[id][RankName2]), 70);
mysql_fetch_field("RankName3",data);
strmid(Groups[id][RankName3], data, false, strlen(Groups[id][RankName3]), 70);
mysql_fetch_field("RankName4",data);
strmid(Groups[id][RankName4], data, false, strlen(Groups[id][RankName4]), 70);
mysql_fetch_field("RankName5",data);
strmid(Groups[id][RankName5], data, false, strlen(Groups[id][RankName5]), 70);
mysql_fetch_field("RankName6",data);
strmid(Groups[id][RankName6], data, false, strlen(Groups[id][RankName6]), 70);
mysql_fetch_field("MOTD",data);
strmid(Groups[id][MOTD], data, false, strlen(Groups[id][MOTD]), 70);
printf("Loaded Groupid:%d",id);
printf("Groupid:%d Name:%s Rank0:%s Rank1:%s Rank2:%s Rank3:%s Rank4:%s Rank5:%s Rank6:%s MOTD:%s",
Groups[id][Groupid],Groups[id][GroupName],Groups[id][RankName0],Groups[id][RankName1],Groups[id][RankName2],
Groups[id][RankName3],Groups[id][RankName4],Groups[id][RankName5],Groups[id][RankName6],Groups[id][MOTD]);
}
mysql_free_result();
return 1;
}
Re: loading groups problem.. - [L3th4l] - 24.11.2010
If you are using G-Stylezzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz's plugin, post the logs here.
Re: loading groups problem.. -
Re: loading groups problem.. -
Re: loading groups problem.. -