samp.directory
← Скрипты и библиотеки

duydang2311/suckless-rp

a roleplay gamemode that sucks less

Игровой мод★ 6обновлён сент. 2022 г.Без лицензииPawnsampctl
Открыть на GitHub

В этом репозитории нет файла лицензии. Код открыт для чтения, но само по себе это не даёт права использовать его.

Установка через sampctl

sampctl package install duydang2311/suckless-rp

Выполните в папке проекта. sampctl скачает пакет и его зависимости.

README.md

suckless-rp

Information

This gamemode was started in early 2021, for a local Vietnamese Role-Play server but then stopped in late 2021 as I moved to GTA:V.

@tavenguyen joined as a new developer later in 2022 and helped making the features.

We decided to make this public as it is no longer developed and maintained.

Here is few images of this gamemode I still keep.

What we've done in this gamemode?

  • Player module.

    • Essential data, event handling.

    • Inventory, hand components.

    • Permissions.

  • Item module.

    • Gun, melee.

    • Sim card (integrating into the phone item).

    • Radio (comes with a frequency management system).

    • Backpack (using item group for containing items).

    • Whisk (for the farmer job).

    • Phone:

      • Dynamic model. We made one, which is Nokia.

      • System functionalities that is pre-installed with all types of phone (think of it like OS API).

      • Registering apps to be featured on the system App Store.

    • Item adjustable attachment, drop, pick, carry.

  • Job.

    • Farmer (with moving NPC cows, feeding, loading on car and selling).
  • Door, house modules are ready to use.

  • Faction module is only ready at the core-level, such as faction essential info, rank, division. Your own development is required to build a specific faction, like features for a faction of type police.

  • Frequency module: a point where radio item connects to and works.

  • Other modules: Subtitle UI, Street, Weapon, Commands...

Notes

  • The source code of item module introduces a code pattern, which overall aims to simulate the inheritance in OOP (in a non-OOP language like Pawn), because there are so many types of item. The pattern is basically a top-level function (for public use by other modules) would make a CallLocalFunction and all types of item would listen to that call (use hooks), then modify the ref argument if the written condition inside is met. After all of the hooks are executed, the top-level function returns the value of the modified argument as its result.

  • All the modules written early, store all the data in memory dynamically (thanks to PawnPlus). Later on, we see this as bad practice. Except for very frequently used data, we don't store any at all but just query the database every time we need it, and this is very handy to do thanks to PawnPlus task.

  • No .sql file is needed because we create tables on gamemode run. Remember to run the gamemode twice so all the tables are created, due to table referencing another table and script execution order.

Страница собрана из того, что GitHub публикует о репозитории. samp.directory не хранит этот код. Сообщить о проблеме с этой записью