View Single Post
Author Message
Nexd
BANNED
Join Date: Dec 2013
Location: Hungary
Old 10-12-2019 , 16:03   [ANY?] Caseopening System - API
Reply With Quote #1

Helloo. I've been gone for a time, blabla.

I've made this like a year ago, but it was private for a very long time. The old, private version was horrible, and limited. So instead of releasing some sh.. I've recoded it from scratch, now waiting for feedbacks and bugreports.
( Old version preview )
( Old repository )

For new previews, take a look there: https://github.com/KillStr3aK/caseopening

This plugin is just an API, so without modules you can't really do anything.
I've created some core modules, which is related to the zephstore so if you're willing to help me with the tests, dont forget to install that store too.

FOR DEVS
Please, instead of working/editing it privately, just send pull requests.
Before trying to do anything, take a look on the include files, especially on the methodmap.

Description:
Players can get cases, keys from various ways (Not done yet)
They can open cases, and get anything if the server have got the right module for the given item. (Its easy to create a new module)
At the moment, the system can handle up to 64 modules, 32 case can be created, each case could have up to 24 items, and you can set custom grades for every item.
You can place cases with the admin menu, it will be saved in configs/case_spawns/mapname.txt

Dependencies:
  • ZephStore - Only if you want to use the core modules, otherwise you dont need store at all.
  • MySQL - ONLY MYSQL SUPPORT (In the databases.cfg, the section name should be "ladarendszer" or just edit the cvar in the sourcecode.)

Core included modules:
  • Store Support ( Core included ) - Players can open anything from the Store plugin (Based on item unique_id)
  • VIP Support ( Core included ) - Currently only my own vipsystem is supported, its in the package but not included by default.
    • Requires my vipsystem, included above.
  • Admin commands ( Core included ) - Commands will be listed below
    • sm_drop - Giving out a crate like in the endgame drop
    • sm_caseban - Banning a player
    • sm_refreshcases - Refresh the cases from db (This will refresh the items && grades too.)
    • sm_loadinv - Load inventory for the given player
    • sm_givekey - Give key to a player
    • sm_givecase - Give case to a player
    • sm_givecaseall - Give case to every player
    • sm_givekey - Give key to every player
    • sm_refreshid - Force refresh player id
  • Endgame drops ( Core included ) - A random player will be picked for the case drop
    • When the match ends, a random case will be given to a random player.
  • Place cases to the map ( Core included ) - You can place cases
  • Ban system ( Core included ) - Admins can ban players from using the system.

ConVars
case_database "ladarendszer" - Section name in the databases.cfg file
case_debug "0" - debug mode for the plugin

case_drops "1" - Enable endgame drops
case_drops_minplayer "1" - If drops enabled, then the minimum player to start the drop
case_drops_chance "50" - If the drops is enabled and there is enough player, the chance for the "event" to even happen
case_drops_delay "6.5" - Seconds after the match end to drop a case

case_pickup "1" - Enable case pickups
case_pickup_minplayer "1" - If you've placed cases to the map, how many player must be on the server to spawn them
case_pickup_offset "30.0" - Z axis for the case (0.0 = the case will spawn on the ground)
case_pickup_rotate "1" - Rotate the case or not

case_open_animation "1" - If its enabled, the case will spawn to the player and plays the open animation with sounds
case_open_close "1" - If its enabled, the player must stay close to the case to see the rolling part (The opening still continues if the player goes far away from the case, just the roll will be hided)
case_open_close_distance "100.0" - if "case_open_close" is enabled, the max. distance between the case and the player to show the rolling
case_open_close_look "0" - This isn't done yet, dont enable it.

case_chat_prefix "{default}[{lightred}Case-System{default}]" - Chat prefix for messages

Known bugs atm:
  • S̶o̶m̶e̶t̶i̶m̶e̶s̶ ̶t̶h̶e̶ ̶d̶r̶o̶p̶ ̶c̶o̶m̶m̶a̶n̶d̶ ̶i̶s̶ ̶n̶o̶t̶ ̶w̶o̶r̶k̶s̶ ̶a̶s̶ ̶i̶n̶t̶e̶n̶d̶e̶d̶
  • N̶o̶t̶ ̶p̶r̶e̶c̶a̶c̶h̶e̶d̶ ̶m̶o̶d̶e̶l̶s̶ ̶c̶a̶n̶ ̶c̶r̶a̶s̶h̶ ̶t̶h̶e̶ ̶s̶e̶r̶v̶e̶r̶ ̶&̶&̶ ̶p̶l̶a̶y̶e̶r̶s̶
  • NONE ATM

Before asking "how-to" questions
Take a look on the wiki

For first try, you should import the sql files to your database.

If you have got any problem or error with the plugin, or just a good idea feel free to reply to the thread and share it with us.

I would like to credit every forum member, "nexd.inc" is a collection of "useful"(atleast most of the times) stocks, and I dont remember for every name.

If you have got an older version, dont forget to replace everything with the new files!

Download
Direct Download
Github Repo
Releases <-- CHANGELOGS

Last edited by Nexd; 10-23-2019 at 15:37. Reason: Update
Nexd is offline