2024-08-15, 11:22 AM
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.
Main systems
- Administration
- Transport
- Inventory
- Marketplace
- Weapon and token drop
- Quests Dean's Assistant
- Modes: TDM, DM, Room
First of all, you need to know that each mode is in its own folder and has its own systems in files.
In the root folder of each mode there is a folder "locations", in it there is a file with various systems for manipulating locations and the locations themselves are in their own folders.
When the server is launched, various systems are initialized and locations for modes (TDM, DM) are created/loaded. When a location is changed in a 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.
Modes can be divided into several sessions, so you need to think about SA-MP limits, and more specifically about the limits on creating Transport and GangZone, other components such as pickups are created dynamically.
To summarize, each mode has its own folders and subfolders, each mode can also be divided into sessions, and locations in them are created and deleted.
All modes are united by the file "system.pwn" in the folder "game-modes". This can be seen in the code itself.
Architecture
The project architecture was reduced to maximum simplification and ease of use. As mentioned above, each mode has its own folder, as do the other systems. The most basic functions and systems are in the file "offensive-core.pwn". The remaining systems are in the "sources" folder. Some systems are located right there, these are "vehicle", "admin", etc. A separate subfolder "player" was allocated for the player, for the "game-modes" modes.
The distribution of systems into files was logical, since storing tens of thousands of lines of code in one file was already quite difficult for editing anything.
Files
header.inc - stores information that in theory or in practice can be used in other systems (vars, defines, functions).
system.pwn - these are the systems themselves used for any purpose.
Note
Initially, all the code was in one file and therefore you can find illogical moments in the code, but they do not interfere with work at all.
Powerful TDM mode
The highlight of all of this is the TDM mode. For each location, you can create different individual moments and situations, 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 that is nearby and launch the satellite.
Then get the 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 file for the "Desert" location.
With all this, it is easy to manipulate various components through code, and these same components created will be automatically deleted when changing the location and resumed again! This works in different sessions and they are not connected to each other.
Difference between RU and RU-EN version
The RU and RU-EN versions differ in the choice of language on the server and fundamentally in some moments.
The server was initially made for the RU-EN version, but soon it turned out to be unnecessary and even very disturbing.
Both versions work, but it is recommended to choose the RU version, in it the logic of creating CreatePlayer3DTextLabel has been changed to the dynamic CreateDynamic3DTextLabel.
In the RU-EN version, 3DText had to be created separately for each player using the CreatePlayer3DTextLabel function, and this turned out to be very problematic and inconvenient.
Wiki
More information can be found in the Wiki section
Dependencies
Plugins:
- sscanf v2.13.8
- streamer v2.9.6
- mysql vR1-4
- Pawn.CMD v3.4.0
- Pawn.RakNet v1.6.0
- Pawn.Regex v1.2.3
- rustext v2.0.8
- FCNPC v2.0.10 (not needed for open.mp)
- CrashDetect v4.22
- weapon-config
- nex-ac v1.9.64
- foreach v2.2.6
- mdialog v1.4.3
- cinterface v1.0.0
- StreamerFunctions
- progress2
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