10.02.2013, 10:58
Она наверно не динамическая, слово не верное подобрал
Вот массив и загрузка данных.
Вот массив и загрузка данных.
PHP код:
enum EnterExit {
PickupID,
pWorld,
Float:PosX,
Float:PosY,
Float:PosZ,
Float:ExX,
Float:ExY,
Float:ExZ,
Float:ExA,
Interior,
World,
ShopName,
pID
}
new pInfo[MAX_EE][EnterExit];
//***************
public OnGameModeInit() {
mysql_function_query(mysqlid,"SELECT * FROM `enterexit`",true,"LoadEnterExit","d",mysqlid);
// ....
}
forward LoadEnterExit();
public LoadEnterExit() {
cache_get_data(rows,fields);
printf("ROWS: %d",rows);
for(new i = 1; i < rows+1; i++) {
cache_get_row(i,1,qResult); sscanf(qResult,"i",pInfo[i][PickupID]);
cache_get_row(i,2,qResult); sscanf(qResult,"i",pInfo[i][pWorld]);
cache_get_row(i,3,qResult); sscanf(qResult,"f",pInfo[i][PosX]);
cache_get_row(i,4,qResult); sscanf(qResult,"f",pInfo[i][PosY]);
cache_get_row(i,5,qResult); sscanf(qResult,"f",pInfo[i][PosZ]);
cache_get_row(i,6,qResult); sscanf(qResult,"f",pInfo[i][ExX]);
cache_get_row(i,7,qResult); sscanf(qResult,"f",pInfo[i][ExY]);
cache_get_row(i,8,qResult); sscanf(qResult,"f",pInfo[i][ExZ]);
cache_get_row(i,9,qResult); sscanf(qResult,"f",pInfo[i][ExA]);
cache_get_row(i,10,qResult); sscanf(qResult,"i",pInfo[i][Interior]);
cache_get_row(i,11,qResult); sscanf(qResult,"i",pInfo[i][World]);
cache_get_row(i,12,qResult); sscanf(qResult,"i",pInfo[i][ShopName]);
pInfo[i][pID] = CreatePickup(pInfo[i][PickupID],23,pInfo[i][PosX],pInfo[i][PosY],pInfo[i][PosZ],pInfo[i][pWorld]);
printf("NewID: %d",pInfo[i][pID]);
pickups++;
}
return 1;
}