02.10.2012, 14:29
pawn Код:
stock loadfactionvehicles(iFaction)
{
new Query[700], vehicleID;
format(Query, sizeof(Query), "SELECT * FROM `vehicleinfo` WHERE `vfaction` > 0");
mysql_query(Query);
mysql_store_result();
while(mysql_retrieve_row())
{
mysql_fetch_row(Query);
sscanf(Query, "i", vehicleID); // This is assuming that ID is the first column
sscanf(Query, "p<|>e<is[32]is[32]s[32]s[32]s[32]s[32]s[32]s[32]s[32]s[32]s[32]ifffffffffffffff>", VVar[vehicleID]); //NEEDS CHANING TO SUIT VVAR
VVar[vehicleID][vfaction] = iFaction;
}
return 1;
}