24.03.2010, 16:06
[FS]ObjectCalc - Object Position Calculator
What is ObjectCalc?
ObjectCalc is simple filterscipt what you can use to move or rotate your CreateObject code.
For example if you have created some structure which includes 50 objects, and you need to move it for instance X +500 and Y + 300,
this is the right tool you should use.
Using this you don't need to calculate every objects new position one by one.
Why should I download this?
If you have created some structure and you need to move or rotate it,
and you are too lazy to create your structure again with map editor in new place.
Download:
View the code
Install:
Copy the code from here.
Open your pawn editor, and paste it there.
Then copy your CreateObject code you want to edit,
and paste it to OnFilterScriptInit.
Next you have to replace CreateObject with CalculateCoords.
Go to menu panel > Edit > Replace or press Ctrl + H.
Replace every CreateObject with CalculateCoords EXCEPT the one at stock CalculateCoords.
Then set the differences of coordinates you like them to be after editing coordinates.
Find this part of code:
#define DifferenceX 0.0
#define DifferenceY 0.0
#define DifferenceZ 0.0
#define DifferenceRX 0.0
#define DifferenceRY 0.0
#define DifferenceRZ 0.0
and edit the differences like you wish.
Then compile your script to .amx file and run it on your server.
(/rcon loadfs ObjectCalc).
After that you should have the code in you scriptfiles folder in file called "MovedObjects.txt".
Hope you find it useful.