thelink2012 / modloader

Mod Loader for GTA III, Vice City and San Andreas
MIT License
269 stars 29 forks source link

Timecyc not loaded on SAMP #3

Closed thelink2012 closed 9 years ago

thelink2012 commented 10 years ago

Modified timecyc doesn't load on SA-MP even when you put it in the base data directory

thelink2012 commented 10 years ago

No way to fix, SA-MP way of dealing with it, not my fault :)

thelink2012 commented 10 years ago

It may be related to the remotion of the chdir("DATA") from the game code, let's try to do it in another way, instead of removing the chdir call, make our path be relative (e.g. "../modloader/etc")

thelink2012 commented 10 years ago

Interesting link I found http://pastebin.com/vEW12Rdt

thelink2012 commented 9 years ago

Just for the record:

SAMP changes the path from any file named timecyc.dat to a custom path. This hook takes place at kernel32:CreateFileA, so the only way to fix it is telling SAMP to load the timecyc using a different filename.

So, the approach used here to get around this issue is, when the game is running under SAMP copy the custom timecyc (which is somewhere at the modloader directory) into the gta3.std.data cache with a different extension and voilá. By the way, unlike 0.1.x, the std.data from 0.2.x does not insert hooks when the timecyc is not customized (i.e. inside modloader directory), so the workaround used by some people to have a timecyc.aaa file is also going to be valid.