Write mysql?
#1

can write for me this mysql?, Please.
Код:
forward OnLoadFuels();
public OnLoadFuels()
{
	new string[512], iIndex;
	new rows, fields;
	cache_get_data(rows, fields, MainPipeline);
	while(iIndex<rows)
	{
	    for(new field;field<fields;field++)
	    {
 		    cache_get_row(iIndex, field, string, MainPipeline);
			switch(field)
			{
			    case 0: FuelPumpInfo[iIndex][FuelSQLID] = strval(string);
		        case 1: FuelPumpInfo[iIndex][FuelPumpOwner_ID] = strval(string);
		        case 2: FuelPumpInfo[iIndex][FuelOwned] = strval(string);
	    		case 3: FuelPumpInfo[iIndex][FuelSafeBalance] = strval(string);
	       		case 4: FuelPumpInfo[iIndex][FuelPumpObjectID] = strval(string);
	     		case 5: FuelPumpInfo[iIndex][GasPumpPosX] = floatstr(string);
	     		case 6: FuelPumpInfo[iIndex][GasPumpPosY] = floatstr(string);
	     		case 7: FuelPumpInfo[iIndex][GasPumpPosZ] = floatstr(string);
	     		case 8: FuelPumpInfo[iIndex][GasPumpRotX] = floatstr(string);
		    	case 9: FuelPumpInfo[iIndex][GasPumpRotY] = floatstr(string);
		    	case 10: FuelPumpInfo[iIndex][GasPumpRotZ] = floatstr(string);
	    		case 11: FuelPumpInfo[iIndex][GasPumpGas] = floatstr(string);
	    		case 12: FuelPumpInfo[iIndex][GasPumpCapacity] = strval(string);
	     		case 13: FuelPumpInfo[iIndex][SupplyPointX] = floatstr(string);
		    	case 14: FuelPumpInfo[iIndex][SupplyPointY] = floatstr(string);
		    	case 15: FuelPumpInfo[iIndex][SupplyPointZ] = floatstr(string);
		    	case 16: FuelPumpInfo[iIndex][GasPrice] = strval(string);
		    	case 17: FuelPumpInfo[iIndex][GasBuy] = strval(string);
		    	case 18: FuelPumpInfo[iIndex][GasStock] = strval(string);
	     	}
		}
Код:
enum bInfo
{
    bSQLId,
    bOwned,
    bRadio,
	bOwner[255],
	bMessage[255],
	bPickupID,
	bIconID,
	bIconType,
	bVirWorld,
	bExtortion[255],
	Float:bEntranceX,
	Float:bEntranceY,
	Float:bEntranceZ,
	Float:bDeliverX,
	Float:bDeliverY,
	Float:bDeliverZ,
	Float:bExitX,
	Float:bExitY,
	Float:bExitZ,
	bLevelNeeded,
	bBuyPrice,
	bEntranceCost,
	bBizBank,
	bLocked,
	bInteriorID,
	bExteriorID,
	bInterior,
	bProducts,
	bDelivProd,
	bPercent,
	bType,
	BusinessProdPrice[26],
	BusinessPrice,
	BusinessPickup,
	Text3D:BusinessLabel,
	BusinessFee,
	BusinessProducts,
	bPriceProd,
	bMaxProducts,
	bGiaSP1,
	bGiaSP2,
	bGiaSP3,
	bGiaSP4,
	bGiaSP5,
	bGiaSP6,
	bGiaSP7,
	bGiaSP8,
	bGiaSP9,
	bGiaSP10,
	bGiaSP11,
	bGiaSP12,
	bGiaSP13,
	bGiaSP14,
	bGiaSP15,
	bPickkupModel,
	bWeapons1,
	bWeapons2,
	bWeapons3,
	bWeapons4,
	bWeapons5,
	bWeapons6,
	bWeapons7,
	bWeapons8,
	bWeapons9,
	bWeapons10,
	bMats,
	bPrice,
	bLuong[ 6 ],
	bBaoKe,
};


new BizzInfo[MAX_BUSINESSES][bInfo];
Please Thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)