30.01.2015, 17:00
Hello, I am new to SA-MP scripting and I am thinking about having a go at creating my own Free roam game mode. My first focus, will be the map (spawning ramps, and other objects around). I could write all of the code inside the "OnPlayerConnectInit()" method, but the problem is- my code will not look neat and therefore, will not be very readable.
So the question is, can I move all of the code for spawning objects in an include file, then include it into my gamemode file and then, on "OnPlayerConncetInit()" method, call the function (which is in the include) that will spawn all of the objects? Also, would it actually be a better thing to do, rather than writing all of the code inside "OnPlayerConnectInit()"?
Thank you for taking your time, and I am looking froward to your responses.
So the question is, can I move all of the code for spawning objects in an include file, then include it into my gamemode file and then, on "OnPlayerConncetInit()" method, call the function (which is in the include) that will spawn all of the objects? Also, would it actually be a better thing to do, rather than writing all of the code inside "OnPlayerConnectInit()"?
Thank you for taking your time, and I am looking froward to your responses.