new str[250],uid; mysql_query("SELECT * FROM `items`"); mysql_store_result(); while(mysql_fetch_row(str, "|")) { sscanf(str, "p<|>d", uid); sscanf(str, "p<|>is[32]iiiiiiffffff", Items[uid][pUID], ... |
while(mysql_fetch_row(str, "|"))
{
sscanf(str, "p<|>dis[32]iiiiiiffffff",
uid,
Items[uid][pUID],
enum pItems { pUID, pType, pName[32], pUsing, pModel, pAmount, pWeight, pTrash, pValue, Float ![]() Float ![]() Float ![]() Float ![]() Float ![]() Float ![]() pVW, Text3D:TextLabel, pModelid }; stock Items[MAX_ITEMS][pItems]; }; |
CREATE TABLE `items` ( `UID` int(11) NOT NULL auto_increment, `Name` varchar(32) NOT NULL, `Using` int(11) NOT NULL, `Model` int(11) NOT NULL, `Amount` int(11) NOT NULL, `Weight` int(4) NOT NULL, `Trash` int(1) NOT NULL, `Value` int(11) NOT NULL, `PosX` float NOT NULL, `PosY` float NOT NULL, `PosZ` float NOT NULL, `RotX` float NOT NULL, `RotY` float NOT NULL, `RotZ` float NOT NULL, `VW` int(11) NOT NULL, PRIMARY KEY (`UID`) ) ENGINE=MyISAM DEFAULT CHAR |