The Max script generates code that replaces models starting with ID 4000. That's just a random number that came to my mind at scripting time. Also, I was aiming to "race" mappers, so it doesn't really matter what model is replaced since race maps are fully custom. I may add a text box which will let user insert their own ID. I also thought of a feature that will let users set their spawn points straight in 3DS Max.
[miLKy_wAy], I managed to get MTA to work and I'll test some maps including yours. Just post your latest resource here and I'll try to figure out what is wrong.
<!-- Meta.xml generated with 50p MTA:SA MAXScript v0.1 (23/04/2010) -->
<meta>
<info author="" gamemodes="race" type="map" name="pool01" />
<script src="pool01.lua" type="client" />
<map src="pool01.map" />
<file src="pool01.dff" />
<file src="pool01.col" />
</meta>
my map file
<map edf:definitions="race,editor_main">
<object name="pool01" model="4000" posX="-56.6282" posY="-119.069" posZ="0.0" rotX="-89.8685" rotY="0.816823" rotZ="95.4547" />
</map>
my lua file
-- Script generated with
-- 50p MTA:SA MAXScript v0.1 (23/04/2010)
modelNames = { "pool01", }
function reloadModels( )
for i, modelName in ipairs( modelNames ) do
local temp = engineLoadDFF( modelName .. ".dff", 0 );
engineReplaceModel( temp, i + 4000 );
temp = engineLoadCOL( modelName .. ".col" );
engineReplaceCOL( temp, i + 4000 );
end
end
addEventHandler( "onClientResourceStart", getResourceRootElement(), reloadModels );
addCommandHandler( "reload", reloadModels );