• 4 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Gamemode] Offensive-Core: TDM
#1
[Image: offensive-core-2.png?raw=true]


Offensive-Core - is a large project combining a multifunctional game mode and accompanying files written in the Pawn language for servers in SA-MP and open.mp. Based on the implemented methods, you can create absolutely favorite modes and submodes for them. The code can be easily upgraded and expanded for your needs. The project presents the following modes: TDM, DM and Room.

The project is not a modification of other game modes. It is written and thought out completely from scratch.

Screenshots from the game on the server can be viewed here.

📌 Main systems
  • Modes: TDM, DM, Room
  • Inventory
  • Trading platform
  • Quests
  • Premium account
  • Promo codes
  • Functionality for admins
  • Dina assistant

⚽ Mode TDM
In this mode, players fight as a team. Depending on the game mode (sub-mode), players need to capture dots, flags, hack computers, etc.
To spawn, the player can choose another player from his squad, either at a point or base.

There are 4 classes open to the player: Stormtrooper, Medic, engineer and Scout. Each class is upgraded individually.
Weapons, ammo, abilities, etc. are purchased using the internal currency. The maximum number of teams is 4.

⚾ Mode Room
The Room mode is slightly similar to the TDM mode. This is a custom mode in which the player creates their own session with their own parameters. To play it, you need at least 2 players, and a maximum of 10.

Players in a team also fight in this mode. Depending on the game mode (sub-mode), players need to capture points, hack computers, etc.
The player can only choose a base to spawn. There are no classes. The player can select the time, location, weapon, mode, etc. in the session parameters.

🔨 Logic of operation of all modes
The modes are in their own folders and have their own systems. They are like separate "worlds".
In the root of almost every mode there is a folder "locations". It contains a file with various functionality for manipulating
locations. The locations themselves are also placed in their folders.

When the server is started, all modes and their startup sessions are initialized.
When a location is changed in the mode, all created components (pickups, objects, etc.) on the location are deleted
and new ones are created for the new location.

This method of creating and deleting locations has many advantages.
The modes can be divided into several sessions, so you need to think about the limits of SA-MP,
and more specifically about the limits on the creation of transport, the rest of the components
by type of pickups are created dynamically.

The modes can be activated and deactivated, as well as sessions can be managed in them.

All modes are combined by the file "modes_main.pwn" in the "modes" folder.

📑 Architecture
The architecture of the project has been reduced to maximum simplification and ease of use.
As mentioned above, each mode has its own folder, just like the rest of the systems.
All systems are connected in the "offensive-core.pwn" file.
The server systems are located in the "sources" folder. The external files are in the "library" folder.

The distribution of systems by files was logical, because storing tens of thousands of lines of code in one file was already quite difficult to edit anything.

📄 Files
> name_head.inc - contains basic macros, functions, ...
> name_td.inc - contains all TextDraw's systems.
> name_main.pwn - contains all the functionality of the system.

🚀 Powerful TDM mode
The highlight of all of the above is the TDM mode.
For each location, you can create different individual moments and situations in it, for example,
in the Desert location, you can drop a nuclear bomb on the opposing team.

To do this, you need to capture the "Communication Point", then blow up the door next to it and launch the satellite.
Next, get access codes with the /accode command and get on the submarine and launch a nuclear missile there, which will fly to the enemy base.

With existing systems specifically for TDM mode, this is already easily implemented directly in the Desert location file.
At the same time, it is easy for everyone to manipulate various components through the code,
and the created components will be automatically deleted when the location is changed and resumed again!
This works in different sessions and they are not related to each other.

📖 Wiki
Much more information can be found in the Wiki section

🔧 Dependencies
The project uses several popular plug-ins and files of the latest versions for improved work with the code and their capabilities.

Plugins:
Files:
💣 Download
Github
Google Drive
Yandex Drive

♥️ Thanks
NexiusTailer - great help on various topics
Neutralneu (Neuty) - implementation of the system for bots
Roberto_Coluccio, Artem_Gorden, Danil_Marciface, VanilaSW, Dima_Rendi, Fix_Unvardo, Itsuki_Yorimoto,
Flatt_Delx, Fredorico_Viton, Demetrio_Santini, Maks_Anurov, Kocmoc, Vladislav_Barsov,
Doni_Visage, DELIVER, Richi_Klay, Sebastian_Undeground
- assistance in testing
  Reply
#2
(2024-09-17, 06:44 AM)sabrina Wrote: You mentions the project's ease of customization and expansion for specific needs. However, it doesn't detail the process. How easy is it, in practice, to create new sub-modes or modify existing ones within the Offensive-Core framework? Are there clear guidelines or documentation for adding custom features or systems?

Hello, unfortunately there are no specific instructions, I could write them, but I don't have time for that.

Regarding simple code extension and creation of new modes. On Offensive-Core it is really easier to create and change modes than to create this logic of work from scratch or use other game modes.

In fact, the principle of work is very simple. There is a mode and sessions for it. There are various locations for the mode and components on the location (pickups, objects, transport, etc.). When the server starts, these locations are created and when, for example, the match ends, then all created components are deleted (that is, the entire location) and a new location is created with its own components. When a player enters the mode, then the necessary components for him are shown or created on the location that is currently in the mode.

You can see the simplest example of how the modes work in the DM mode folder, everything is simple there. But in the TDM mode folder everything is much more complicated and you need to keep track of all the components.

Unfortunately, I did not have time to transfer the server only to the EN version, there is only the RU version and the RU-EN version...
  Reply
#3
Heart 
Excelent work, 5 stars +rep.
Please, do a EN version
  Reply
#4
New version v2.0.0

What's Changed:
* Upgrade to the new version open.mp: v1.4.0.2783
* Updating the entire Wiki section
* Adding a new plugin: Bcrypt v2.2.3
* Fixing all found bugs
* Tag support open.mp
* Using even more new features from open.mp
* Complete change of the project architecture
* All TextDraws have been moved to separate files
* There are even more modules for the systems.
* The names of functions and variables have been rewritten to match the same style
* Names of all columns in MySQL tables have been rewritten
* All queries to the MySQL database have been optimized, and `orm` queries have been added
* Adding new and extensive functionality for the modes, you can now delete and create sessions, and enable and disable modes (in the admin menu)
* The main menu has been updated, now you can see your character
* Switching to the new version of the compiler 3.10.11 from open.mp . In this version of the server, you can also work with the 3.10.10 compiler from Zeex
* A huge number of small and large changes in the code

Download:
GitHub
Google Drive
Yandex Drive
  Reply


Forum Jump: