Raised This Month: $51 Target: $400
 12% 

[ANY?] Caseopening System - API


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Nexd
BANNED
Join Date: Dec 2013
Location: Hungary
Plugin ID:
6758
Plugin Version:
1.0.1012pre
Plugin Category:
Fun Stuff
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Caseopening system
    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
    Nexd
    BANNED
    Join Date: Dec 2013
    Location: Hungary
    Old 10-14-2019 , 08:34   Re: [ANY?] Caseopening System - API
    Reply With Quote #2

    Short preview: https://www.youtube.com/watch?v=4AJx2e54Fws (For those who have no idea what's this)

    If you have got any module idea, you can reply to the thread.
    Nexd is offline
    LaGgLs
    Senior Member
    Join Date: Apr 2015
    Location: sweden
    Old 10-14-2019 , 11:13   Re: [ANY?] Caseopening System - API
    Reply With Quote #3

    Hey getting this error [SM] Unable to load plugin "caseopening.smx": Native "VR_Hozzaadas" was not found

    Cant found anything with VR_Hozzaadas
    LaGgLs is offline
    Nexd
    BANNED
    Join Date: Dec 2013
    Location: Hungary
    Old 10-14-2019 , 13:28   Re: [ANY?] Caseopening System - API
    Reply With Quote #4

    Quote:
    Originally Posted by LaGgLs View Post
    Hey getting this error [SM] Unable to load plugin "caseopening.smx": Native "VR_Hozzaadas" was not found

    Cant found anything with VR_Hozzaadas
    My own VIP System - Or just comment out the 137. and 191. lines.

    search for

    #include "case_modules/vipsystem.sp"
    VipSystemOnPluginStart();
    then comment them out, or delete them

    As soon as the first release will be ready, the modules will be separated from the main api.
    Nexd is offline
    LaGgLs
    Senior Member
    Join Date: Apr 2015
    Location: sweden
    Old 10-14-2019 , 15:08   Re: [ANY?] Caseopening System - API
    Reply With Quote #5

    //SourceMod Batch Compiler
    // by the SourceMod Dev Team


    //// caseopening.sp
    // C:\Users\LaGgIs\Desktop\addons\sourcemod\scri pting\include\handles.inc(42) :
    error 021: symbol already defined: "Handle"
    // C:\Users\LaGgIs\Desktop\addons\sourcemod\scri pting\include\sourcemod.inc(140)
    : error 025: function heading differs from prototype
    // C:\Users\LaGgIs\Desktop\addons\sourcemod\scri pting\include\multicolors/moreco
    lors.inc(10) : warning 207: unknown #pragma
    // C:\Users\LaGgIs\Desktop\addons\sourcemod\scri pting\include\multicolors/moreco
    lors.inc(10) : error 038: extra characters on line
    // C:\Users\LaGgIs\Desktop\addons\sourcemod\scri pting\include\multicolors/moreco
    lors.inc(24) : error 010: invalid function or declaration
    // C:\Users\LaGgIs\Desktop\addons\sourcemod\scri pting\include\multicolors/moreco
    lors.inc(2 : error 001: expected token: ";", but found "-identifier-"
    // C:\Users\LaGgIs\Desktop\addons\sourcemod\scri pting\include\multicolors/moreco
    lors.inc(39) : error 001: expected token: ";", but found "-identifier-"
    // C:\Users\LaGgIs\Desktop\addons\sourcemod\scri pting\include\multicolors/moreco
    lors.inc(39) : error 010: invalid function or declaration
    // C:\Users\LaGgIs\Desktop\addons\sourcemod\scri pting\include\multicolors/moreco
    lors.inc(39 -- 40) : error 010: invalid function or declaration
    // C:\Users\LaGgIs\Desktop\addons\sourcemod\scri pting\include\multicolors/moreco
    lors.inc(39 -- 40) : fatal error 127: too many error messages on one line
    //
    // Compilation aborted.
    // 9 Errors.
    //
    // Compilation Time: 0,16 sec
    // ----------------------------------------

    Press enter to exit ...




    //SourceMod Batch Compiler
    // by the SourceMod Dev Team


    //// case_newmodule.sp
    // C:\Users\LaGgIs\Desktop\addons\sourcemod\scri pting\include\nexd.inc(19) : err
    or 021: symbol already defined: "float"
    // C:\Users\LaGgIs\Desktop\addons\sourcemod\scri pting\include\nexd.inc(19) : err
    or 010: invalid function or declaration
    // C:\Users\LaGgIs\Desktop\addons\sourcemod\scri pting\include\nexd.inc(19 -- 23)
    : error 010: invalid function or declaration
    // C:\Users\LaGgIs\Desktop\addons\sourcemod\scri pting\include\nexd.inc(19 -- 23)
    : fatal error 127: too many error messages on one line
    //
    // Compilation aborted.
    // 4 Errors.
    //
    // Compilation Time: 0,14 sec
    // ----------------------------------------

    Press enter to exit ...

    Last edited by LaGgLs; 10-14-2019 at 15:10.
    LaGgLs is offline
    Nexd
    BANNED
    Join Date: Dec 2013
    Location: Hungary
    Old 10-15-2019 , 10:55   Re: [ANY?] Caseopening System - API
    Reply With Quote #6

    Compiler version?
    Nexd is offline
    LaGgLs
    Senior Member
    Join Date: Apr 2015
    Location: sweden
    Old 10-15-2019 , 11:48   Re: [ANY?] Caseopening System - API
    Reply With Quote #7

    If you mean the sourcemods version i use to try to compiler it 1.9 - build 6282

    Sorry not the best for this things<3

    Last edited by LaGgLs; 10-15-2019 at 11:56.
    LaGgLs is offline
    Nexd
    BANNED
    Join Date: Dec 2013
    Location: Hungary
    Old 10-16-2019 , 12:16   Re: [ANY?] Caseopening System - API
    Reply With Quote #8

    Try it with the newest version
    Nexd is offline
    LaGgLs
    Senior Member
    Join Date: Apr 2015
    Location: sweden
    Old 10-17-2019 , 06:23   Re: [ANY?] Caseopening System - API
    Reply With Quote #9

    Trying the dev sourcemod and i getting this error

    //SourceMod Batch Compiler
    // by the SourceMod Dev Team


    //// caseopening.sp
    //
    // C:\Users\LaGgIs\Desktop\addons\sourcemod\scri pting\caseopening.sp(305) : erro
    r 001: expected token: ")", but found "."
    // C:\Users\LaGgIs\Desktop\addons\sourcemod\scri pting\caseopening.sp(305) : erro
    r 029: invalid expression, assumed zero
    // C:\Users\LaGgIs\Desktop\addons\sourcemod\scri pting\caseopening.sp(305) : erro
    r 017: undefined symbol "IsValid"
    // C:\Users\LaGgIs\Desktop\addons\sourcemod\scri pting\caseopening.sp(305) : fata
    l error 189: too many error messages on one line
    //
    // Compilation aborted.
    // 4 Errors.
    //
    // Compilation Time: 0,83 sec
    // ----------------------------------------

    Press enter to exit ...
    LaGgLs is offline
    Nexd
    BANNED
    Join Date: Dec 2013
    Location: Hungary
    Old 10-17-2019 , 12:43   Re: [ANY?] Caseopening System - API
    Reply With Quote #10

    Weird, Have you got the nexd.inc?
    The vip module got removed so you can use the smx

    Last edited by Nexd; 10-17-2019 at 12:44.
    Nexd is offline
    Reply



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 10:49.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode