Load code from file.
#1

Hi, I have InGame mapping object which can export the code to .txt file with FileManager.
Here is an example of my .txt files which exported from InGame.
pawn Код:
new objects[16];

objects[0] = CreateDynamicObject(19362, 1539.6771, -1621.2464, 14.1728, 0.0000, 0.0000, 0.3240, -1, -1, -1, 300.0);
SetDynamicObjectMaterialText(objects[0], "Test", 0, 20, "Arial", 24, 1, 0xFFFFFFFF, 0xFF000000, 1);
objects[1] = CreateDynamicObject(19362, 1541.3817, -1622.7629, 14.1728, 0.0000, 0.0000, 90.1239, -1, -1, -1, 300.0);
objects[2] = CreateDynamicObject(19362, 1539.6595, -1618.0566, 14.1625, 0.0000, 0.0000, 0.3240, -1, -1, -1, 300.0);
objects[3] = CreateDynamicObject(1491, 1582.5871, -1637.9016, 12.3538, 0.0000, 0.0000, 0.4485, -1, -1, -1, 300.0);
objects[4] = CreateDynamicObject(19362, 1543.4885, -1638.7956, 14.1728, 0.0000, 0.0000, 12.2238, -1, -1, -1, 300.0);
objects[5] = CreateDynamicObject(1569, 1540.4395, -1634.0979, 12.4167, 0.0000, 0.0000, 0.0000, -1, -1, -1, 300.0);
objects[6] = CreateDynamicObject(19362, 1539.7030, -1635.7951, 14.1728, 0.0000, 0.0000, 0.3240, -1, -1, -1, 300.0);
objects[7] = CreateDynamicObject(19391, 1541.2030, -1634.1137, 14.1728, 0.0000, 0.0000, 90.0239, -1, -1, -1, 300.0);
objects[8] = CreateDynamicObject(19362, 1544.3935, -1634.1131, 14.1728, 0.0000, 0.0000, 90.0239, -1, -1, -1, 300.0);
objects[9] = CreateDynamicObject(19362, 1541.4051, -1637.2939, 14.1728, 0.0000, 0.0000, 90.0239, -1, -1, -1, 300.0);
objects[10] = CreateDynamicObject(968, 1544.6967, -1630.8343, 12.9728, 0.0000, 89.0000, 90.0000, -1, -1, -1, 300.0);
objects[11] = CreateDynamicObject(19362, 1544.5815, -1622.7563, 14.1728, 0.0000, 0.0000, 90.1239, -1, -1, -1, 300.0);
objects[12] = CreateDynamicObject(985, 1588.5477, -1638.2711, 13.3627, 0.0000, 0.0000, 0.0000, -1, -1, -1, 300.0);
objects[13] = CreateDynamicObject(984, 1548.9222, -1714.4880, 27.9948, 0.0000, 0.0000, 90.0000, -1, -1, -1, 300.0);
objects[14] = CreateDynamicObject(983, 1542.5339, -1711.2492, 28.0447, 0.0000, 0.0000, 0.0000, -1, -1, -1, 300.0);
objects[15] = CreateDynamicObject(19362, 1529.8142, -1631.1693, 13.3828, 0.0000, 0.0000, 36.0351, -1, -1, -1, 300.0);
Nah, now Im confused, how can I import that code InGame with all texture ?
Reply
#2

You can either copy and paste it straight in to OnGameModeInit (or OnFilterScriptInit if in a fs), or put it in a file (perhaps .map) then #include it under OnGameModeInit/OnFSInit.

BUT, you have a global array, which I don't know if you need. It seems only needed for the material object (in fact not even for that really).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)