-
Notifications
You must be signed in to change notification settings - Fork 46
Instructions
Nexius edited this page Aug 12, 2021
·
3 revisions
- If you haven't done it yet, generate the ColAndreas database (ColAndreas.cadb). For doing this, run the Wizard executable (ColAndreasWizard.exe) and follow the instructions. Save the file in the folder scriptfiles/colandreas
- Add the server plugin:
- Windows: Copy ColAndreas.dll to the plugins folder of your server and add "ColAndreas" to the plugins line in server.cfg
- Linux: Copy ColAndreas.so or ColAndreas_static.so (see the note above) and add "ColAndreas.so" or "ColAndreas_static.so" to the plugins line in server.cfg
- Copy ColAndreas.inc to the folder pawno/include
- Use
CA_Init()
to load the SA world:public OnGameModeInit() { // Objects need to be removed BEFORE calling CA_Init CA_RemoveBuilding(); // Load the SA map CA_Init(); // Create objects and add them to the simulation CA_CreateDynamicObjectEx_SC(); // Objects need to be restored AFTER calling CA_Init CA_RestoreBuilding(); return 1; }
- Visual Studio 2013: Download
- CMake build system: Download
- Compile Bullet from source:
mkdir build cd build # Choose a folder for installing the Bullet libraries and headers # Change it to your preferred path set BULLET=C:\libs\bullet cmake -DBUILD_EXTRAS=OFF -DBUILD_BULLET3=OFF -DBUILD_UNIT_TESTS=OFF -DBUILD_BULLET2_DEMOS=OFF -DBUILD_CPU_DEMOS=OFF -DINSTALL_LIBS=ON -DCMAKE_INSTALL_PREFIX=%BULLET% -DCMAKE_BUILD_TYPE=Release -G "NMake Makefiles" .. nmake nmake install
- Generate ColAndreas with CMake:
- Download the source code from here.
- Extract it to any location.
- Using the same command prompt as before, switch to the ColAndreas directory using cd.
- Generate the solution:
mkdir vs cd vs cmake -DBULLET_ROOT=%BULLET% ..
- Open the solution (ColAndreas.sln) using Visual Studio and compile it.
- Use the provided solution file: WizardApp/ColAndreasWizard/ColAndreasWizard.sln
- A C++ compiler with C++11 support (GCC/Clang)
- CMake build system.
- Bullet Physics development files.
- Git version control.
- Install the required packages:
- Ubuntu:
sudo apt-get install libbullet-dev:i386 cmake g++-multilib git
- IMPORTANT: You require the 32bit version of Bullet, even if you're using a 64bit OS.
- Get the source code:
git clone https://github.com/Pottus/ColAndreas.git cd ColAndreas
- Create a build folder and run CMake
mkdir build cd build # Replace "Release" with "Debug" if you want debug symbols cmake -DCMAKE_BUILD_TYPE=Release ..
- Build the project
make -j4
- The compiled file will be placed in the build folder.
- Install the required packages:
- Ubuntu:
sudo apt-get install cmake g++-multilib git
- Compile Bullet from source:
# Getting the source code wget https://github.com/bulletphysics/bullet3/archive/2.83.5.tar.gz tar -xzvf 2.83.5.tar.gz rm 2.83.5.tar.gz cd bullet3-2.83.5 # Creating a build directory mkdir build cd build # Make sure we generate 32bit code export CFLAGS="-m32" export CXXFLAGS="-m32" # Running CMake cmake -DBUILD_EXTRAS=OFF -DBUILD_BULLET3=OFF -DBUILD_UNIT_TESTS=OFF -DBUILD_BULLET2_DEMOS=OFF -DBUILD_CPU_DEMOS=OFF -DCMAKE_INSTALL_PREFIX=../output .. # Building and installing the project make -j4 make install # Going back to where we came from cd ../..
- Compile ColAndreas and tell CMake to use the version of Bullet that we just compiled:
git clone https://github.com/Pottus/ColAndreas.git cd ColAndreas mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release -DBULLET_ROOT=$(pwd)/../../bullet3-2.83.5/output .. make -j4
- The compiled file will be placed in the build folder.
- CA_Init
- CA_RemoveBuilding
- CA_RestoreBuilding
- CA_RayCastLine
- CA_RayCastLineID
- CA_RayCastLineExtraID
- CA_RayCastMultiLine
- CA_RayCastLineAngle
- CA_RayCastReflectionVector
- CA_RayCastLineNormal
- CA_ContactTest
- CA_EulerToQuat
- CA_QuatToEuler
- CA_GetModelBoundingSphere
- CA_GetModelBoundingBox
- CA_SetObjectExtraID
- CA_GetObjectExtraID
- CA_RayCastLineEx
- CA_RayCastLineAngleEx
- CA_LoadFromDff
- CA_CreateObject
- CA_DestroyObject
- CA_IsValidObject
- CA_SetObjectPos
- CA_SetObjectRot
- CA_CreateObject_DC
- CA_DestroyObject_DC
- CA_SetObjectPos_DC
- CA_SetObjectRot_DC
- CA_DestroyAllObjects_DC
- CA_FindZ_For2DCoord
- CA_RayCastExplode
- CA_IsPlayerOnSurface
- CA_IsVehicleOnSurface
- CA_RemoveBarriers
- CA_RemoveBreakableBuildings
- CA_IsPlayerInWater
- CA_IsVehicleInWater
- CA_IsPlayerNearWater
- CA_IsVehicleNearWater
- CA_IsPlayerFacingWater
- CA_IsVehicleFacingWater
- CA_IsPlayerBlocked
- CA_IsVehicleBlocked
- CA_GetRoomHeight
- CA_GetRoomCenter
Credits:
Pottus, Chris420, and Slice - Original ColAndreas Plugin
uint32 - Linux and other build fixes, fixed SA-MP object support
codectile - Helped with stuff
Crayder - New functions, water planes fix, future support