Is there a good tutorial on this? I followed like three tutorials on this already and I get the same results.
pawn Код:
stock InitGroups()
{
new Query[255];
for(new i = 0; i < MAX_GROUPS; i++)
{
format(Query, sizeof(Query), "SELECT * FROM `Groups` WHERE 'EntryID' = '%d'", i);
mysql_query(Query);
mysql_store_result();
new line[750];
if(mysql_fetch_row(line)) // this is 1813
{
sscanf(line, "p|sdsssssssddddddddfffdffffffddddddddddds",
Groups[i][GroupName],
Groups[i][CommandTypes],
Groups[i][RankName0],
Groups[i][RankName1],
Groups[i][RankName2],
Groups[i][RankName3],
Groups[i][RankName4],
Groups[i][RankName5],
Groups[i][RankName6],
Groups[i][Skin0],
Groups[i][Skin1],
Groups[i][Skin2],
Groups[i][Skin3],
Groups[i][Skin4],
Groups[i][Skin5],
Groups[i][Skin6],
Groups[i][HQInteriorID],
Groups[i][HQInteriorX],
Groups[i][HQInteriorY],
Groups[i][HQInteriorZ],
Groups[i][HQExteriorID],
Groups[i][HQExteriorX],
Groups[i][HQExteriorY],
Groups[i][HQExteriorZ],
Groups[i][SafeX],
Groups[i][SafeY],
Groups[i][SafeZ],
Groups[i][SafeInteriorID],
Groups[i][SafeMoney],
Groups[i][HQLock],
Groups[i][SavedPot],
Groups[i][SavedCrack],
Groups[i][DisbandMinute],
Groups[i][DisbandHour],
Groups[i][DisbandDay],
Groups[i][DisbandMonth],
Groups[i][DisbandYear],
Groups[i][SafeWorld],
Groups[i][MOTD]);
Groups[i][HQPickupID] = CreateDynamicPickup(1239, 23, Groups[i][HQExteriorX], Groups[i][HQExteriorY], Groups[i][HQExteriorZ], -1, -1, -1, 150.0);
Groups[i][SafePickupID] = CreateDynamicPickup(1239, 23, Groups[i][SafeX], Groups[i][SafeY], Groups[i][SafeZ],Groups[i][SafeWorld], -1, -1, 150.0);
printf("Server: Group %d spawned.", i);
}
mysql_free_result();
}
return 1;
}