Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - 2b2ttianxiu

#1
Script Showroom / Re: Fast reload the server
May 28, 2025, 03:19 PM
I forgot to add 'onPlayerPart' code
#2
Community Plugins / New Python Plugin
May 10, 2025, 05:37 PM
The vcmp-python-plugin, available on GitHub at github.com/tianxiu2b2t/vcmp-python-plugin, is a Python plugin designed for VC-MP game servers. VC-MP is a platform that enables multiplayer gaming based on the classic Vice City game. This plugin significantly enhances the functionality and gameplay of VC-MP servers.

The original author, ysc3839, laid the foundation for this plugin. He conducted in-depth research on the architecture of VC-MP game servers and the features of the Python programming language to write the initial plugin code. The plugin was able to connect with VC-MP game servers and handle various in-game events such as player join, leave, and chat messages. It also provided basic function interfaces for developers to create custom functions. For instance, a simple player management system was implemented to record player login times and gaming durations. Additionally, basic chat command functions were introduced to facilitate player interactions within the game.

On this basis, I have optimized the plugin. First, I reorganized and optimized the plugin's code structure. Previously disorganized code modules were divided into more structured ones, making the code easier to understand and maintain. For example, code related to game event handling was centralized into a dedicated module, while player management - related code was placed in another module. This makes it more convenient to add and modify functions in future development and improves the code's readability and reusability.
In terms of functionality, I have added more practical features. For example, the player permission system has been enhanced, allowing server administrators to allocate different permissions based on player levels and manage player behavior more flexibly. An in-game item and weapon management function has also been added. Administrators can now easily set which items and weapons players can use and their attributes, better controlling game balance and gameplay. Moreover, the plugin's performance has been optimized. Algorithm improvements and code simplification have reduced resource usage and improved stability and response speed under high - load conditions. For instance, the event handling mechanism has been optimized to more efficiently listen to and process a large number of in - game events, avoiding previous issues of event processing delays or omissions.

The optimized vcmp-python-plugin has the following standout features:
Firstly, it has strong function extensibility. With the rich interfaces provided by the plugin, developers can easily create various unique game functions and玩法 based on their needs, whether adding new game modes, designing complex task systems, or achieving interconnection with other servers.
Secondly, it boasts good stability and compatibility. After optimization, the plugin can run stably in various VC-MP game server environments and remains compatible with game updates. This ensures continuous and stable server operation for players.

Thirdly, it is easy to use and maintain. The optimized code structure and clear document comments enable developers new to the plugin to quickly get started with function development and plugin maintenance, lowering the usage threshold and attracting more developers to participate in plugin development and optimization.
In summary, the vcmp-python-plugin, optimized on the foundation of the original work by ysc3839, has become a powerful, stable, and easy - to - use plugin for VC-MP game servers. It provides strong support for the development of the VC-MP game community and the creation of diverse gameplay. It also offers a platform for developers to showcase their creativity and engage in technical exchanges.

(Written by kimi AI)
(My English is not good, and github commits with Chinese. :>)

#3
Maybe you need to restart your server :>
#4
Community Plugins / Re: New curl plugin
May 05, 2025, 04:17 AM
AN ERROR HAS OCCURED [rror when curl_multi_add_handle. Code: ]

CALLSTACK
*FUNCTION [CNManager_onScriptLoad()] ./scripts/CNManager_main.cnut line [35]
*FUNCTION [onScriptLoad()] scripts/main.nut line [3]

LOCALS
[request] NATIVECLOSURE
[path] "./scripts"
[config] TABLE
[this] TABLE
[this] TABLE
#5
What about GetVehicleSyncSource?
#6
A question about VCMP SDK

Hello everyone, I have a question about Server performance report for VCMP SDK.

ServerPerformanceReportEvent(count=8, descriptions=['Streaming', 'Vehicle proximity checks', 'Processing players', 'Processing vehicles', ' Processing pickups', 'Processing objects', 'Packet processing', 'Plugin frame event'], times=[23, 108, 1746, 1197, 14459, 3715, 33070, 555183])

Here's my test report, I see some things that are in the thousands
Can you tell me if this is normal?
#7
生成开始于 19:15...
1>------ 已启动生成: 项目: helloworld, 配置: Debug x64 ------
1>SQConsts.cpp
1>The contents of <variant> are available only with C++17 or later.
1>SQFuncs.cpp
1>The contents of <variant> are available only with C++17 or later.
1>Y:\c\helloworld\SQFuncs.cpp(24,15): warning C4244: "初始化": 从"SQInteger"转换到"int",可能丢失数据
1>SQMain.cpp
1>The contents of <variant> are available only with C++17 or later.
1>正在生成代码...
1>LINK : warning LNK4075: 忽略"/INCREMENTAL"(由于"/OPT:ICF"规范)
1>SQConsts.obj : warning LNK4075: 忽略"/EDITANDCONTINUE"(由于"/OPT:ICF"规范)
1>SQFuncs.obj : error LNK2005: "void __cdecl Logger::debug(char const *)" (?debug@Logger@@YAXPEBD@Z) 已经在 SQConsts.obj 中定义
1>SQFuncs.obj : error LNK2005: "void __cdecl Logger::debug(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?debug@Logger@@YAXV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) 已经在 SQConsts.obj 中定义
1>SQFuncs.obj : error LNK2005: "void __cdecl Logger::error(char const *)" (?error@Logger@@YAXPEBD@Z) 已经在 SQConsts.obj 中定义
1>SQFuncs.obj : error LNK2005: "void __cdecl Logger::error(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?error@Logger@@YAXV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) 已经在 SQConsts.obj 中定义
1>SQFuncs.obj : error LNK2005: "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl Logger::format_number(unsigned long,int)" (?format_number@Logger@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@KH@Z) 已经在 SQConsts.obj 中定义
1>SQFuncs.obj : error LNK2005: "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl Logger::getFormattedTime(void)" (?getFormattedTime@Logger@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) 已经在 SQConsts.obj 中定义
1>SQFuncs.obj : error LNK2005: "void __cdecl Logger::info(char const *)" (?info@Logger@@YAXPEBD@Z) 已经在 SQConsts.obj 中定义
1>SQFuncs.obj : error LNK2005: "void __cdecl Logger::info(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?info@Logger@@YAXV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) 已经在 SQConsts.obj 中定义
1>SQFuncs.obj : error LNK2005: "class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > __cdecl Logger::parseLogMessage(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?parseLogMessage@Logger@@YA?AV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@3@0@Z) 已经在 SQConsts.obj 中定义
1>SQFuncs.obj : error LNK2005: "void __cdecl Logger::rawLogger(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?rawLogger@Logger@@YAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0@Z) 已经在 SQConsts.obj 中定义
1>SQFuncs.obj : error LNK2005: "void __cdecl Logger::rawLogger(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,char const *)" (?rawLogger@Logger@@YAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEBD@Z) 已经在 SQConsts.obj 中定义
1>SQFuncs.obj : error LNK2005: "void __cdecl Logger::rawLogger(char const *,char const *)" (?rawLogger@Logger@@YAXPEBD0@Z) 已经在 SQConsts.obj 中定义
1>SQFuncs.obj : error LNK2005: "void __cdecl Logger::success(char const *)" (?success@Logger@@YAXPEBD@Z) 已经在 SQConsts.obj 中定义
1>SQFuncs.obj : error LNK2005: "void __cdecl Logger::success(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?success@Logger@@YAXV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) 已经在 SQConsts.obj 中定义
1>SQFuncs.obj : error LNK2005: "void __cdecl Logger::warning(char const *)" (?warning@Logger@@YAXPEBD@Z) 已经在 SQConsts.obj 中定义
1>SQFuncs.obj : error LNK2005: "void __cdecl Logger::warning(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?warning@Logger@@YAXV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) 已经在 SQConsts.obj 中定义
1>SQFuncs.obj : error LNK2005: "void * Logger::hstdout" (?hstdout@Logger@@3PEAXEA) 已经在 SQConsts.obj 中定义
1>SQFuncs.obj : error LNK2005: "bool Logger::DEBUG" (?DEBUG@Logger@@3_NA) 已经在 SQConsts.obj 中定义
1>SQFuncs.obj : error LNK2005: "class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,int,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,int> > > Logger::COLORS" (?COLORS@Logger@@3V?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@HU?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@std@@@2@@std@@A) 已经在 SQConsts.obj 中定义
1>SQFuncs.obj : error LNK2005: "class std::map<int,int,struct std::less<int>,class std::allocator<struct std::pair<int const ,int> > > Logger::COLORS_32" (?COLORS_32@Logger@@3V?$map@HHU?$less@H@std@@V?$allocator@U?$pair@$$CBHH@std@@@2@@std@@A) 已经在 SQConsts.obj 中定义
1>SQFuncs.obj : error LNK2005: "class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,int,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,int> > > Logger::LEVELS" (?LEVELS@Logger@@3V?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@HU?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@std@@@2@@std@@A) 已经在 SQConsts.obj 中定义
1>SQFuncs.obj : error LNK2005: "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > Logger::defaultPrefix" (?defaultPrefix@Logger@@3V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@A) 已经在 SQConsts.obj 中定义
1>SQFuncs.obj : error LNK2005: "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > Logger::FORMAT" (?FORMAT@Logger@@3V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@A) 已经在 SQConsts.obj 中定义
1>SQFuncs.obj : error LNK2005: "class std::basic_regex<char,class std::regex_traits<char> > Logger::REGEXP" (?REGEXP@Logger@@3V?$basic_regex@DV?$regex_traits@D@std@@@std@@A) 已经在 SQConsts.obj 中定义
1>SQMain.obj : error LNK2005: "void __cdecl Logger::debug(char const *)" (?debug@Logger@@YAXPEBD@Z) 已经在 SQConsts.obj 中定义
1>SQMain.obj : error LNK2005: "void __cdecl Logger::debug(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?debug@Logger@@YAXV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) 已经在 SQConsts.obj 中定义
1>SQMain.obj : error LNK2005: "void __cdecl Logger::error(char const *)" (?error@Logger@@YAXPEBD@Z) 已经在 SQConsts.obj 中定义
1>SQMain.obj : error LNK2005: "void __cdecl Logger::error(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?error@Logger@@YAXV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) 已经在 SQConsts.obj 中定义
1>SQMain.obj : error LNK2005: "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl Logger::format_number(unsigned long,int)" (?format_number@Logger@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@KH@Z) 已经在 SQConsts.obj 中定义
1>SQMain.obj : error LNK2005: "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl Logger::getFormattedTime(void)" (?getFormattedTime@Logger@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) 已经在 SQConsts.obj 中定义
1>SQMain.obj : error LNK2005: "void __cdecl Logger::info(char const *)" (?info@Logger@@YAXPEBD@Z) 已经在 SQConsts.obj 中定义
1>SQMain.obj : error LNK2005: "void __cdecl Logger::info(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?info@Logger@@YAXV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) 已经在 SQConsts.obj 中定义
1>SQMain.obj : error LNK2005: "class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > __cdecl Logger::parseLogMessage(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?parseLogMessage@Logger@@YA?AV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@3@0@Z) 已经在 SQConsts.obj 中定义
1>SQMain.obj : error LNK2005: "void __cdecl Logger::rawLogger(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?rawLogger@Logger@@YAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0@Z) 已经在 SQConsts.obj 中定义
1>SQMain.obj : error LNK2005: "void __cdecl Logger::rawLogger(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,char const *)" (?rawLogger@Logger@@YAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEBD@Z) 已经在 SQConsts.obj 中定义
1>SQMain.obj : error LNK2005: "void __cdecl Logger::rawLogger(char const *,char const *)" (?rawLogger@Logger@@YAXPEBD0@Z) 已经在 SQConsts.obj 中定义
1>SQMain.obj : error LNK2005: "void __cdecl Logger::success(char const *)" (?success@Logger@@YAXPEBD@Z) 已经在 SQConsts.obj 中定义
1>SQMain.obj : error LNK2005: "void __cdecl Logger::success(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?success@Logger@@YAXV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) 已经在 SQConsts.obj 中定义
1>SQMain.obj : error LNK2005: "void __cdecl Logger::warning(char const *)" (?warning@Logger@@YAXPEBD@Z) 已经在 SQConsts.obj 中定义
1>SQMain.obj : error LNK2005: "void __cdecl Logger::warning(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?warning@Logger@@YAXV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) 已经在 SQConsts.obj 中定义
1>SQMain.obj : error LNK2005: "void * Logger::hstdout" (?hstdout@Logger@@3PEAXEA) 已经在 SQConsts.obj 中定义
1>SQMain.obj : error LNK2005: "bool Logger::DEBUG" (?DEBUG@Logger@@3_NA) 已经在 SQConsts.obj 中定义
1>SQMain.obj : error LNK2005: "class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,int,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,int> > > Logger::COLORS" (?COLORS@Logger@@3V?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@HU?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@std@@@2@@std@@A) 已经在 SQConsts.obj 中定义
1>SQMain.obj : error LNK2005: "class std::map<int,int,struct std::less<int>,class std::allocator<struct std::pair<int const ,int> > > Logger::COLORS_32" (?COLORS_32@Logger@@3V?$map@HHU?$less@H@std@@V?$allocator@U?$pair@$$CBHH@std@@@2@@std@@A) 已经在 SQConsts.obj 中定义
1>SQMain.obj : error LNK2005: "class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,int,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,int> > > Logger::LEVELS" (?LEVELS@Logger@@3V?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@HU?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@std@@@2@@std@@A) 已经在 SQConsts.obj 中定义
1>SQMain.obj : error LNK2005: "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > Logger::defaultPrefix" (?defaultPrefix@Logger@@3V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@A) 已经在 SQConsts.obj 中定义
1>SQMain.obj : error LNK2005: "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > Logger::FORMAT" (?FORMAT@Logger@@3V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@A) 已经在 SQConsts.obj 中定义
1>SQMain.obj : error LNK2005: "class std::basic_regex<char,class std::regex_traits<char> > Logger::REGEXP" (?REGEXP@Logger@@3V?$basic_regex@DV?$regex_traits@D@std@@@std@@A) 已经在 SQConsts.obj 中定义
1>  正在创建库 Y:\c\helloworld\x64\Debug\helloworld.lib 和对象 Y:\c\helloworld\x64\Debug\helloworld.exp
1>Y:\c\helloworld\x64\Debug\helloworld.dll : fatal error LNK1169: 找到一个或多个多重定义的符号
1>已完成生成项目"helloworld.vcxproj"的操作 - 失败。
========== 生成: 0 成功,1 失败,0 最新,0 已跳过 ==========
========== 生成 于 19:16 完成,耗时 25.540 秒 ==========


:(
#8
Quote from: MEGAMIND on Apr 16, 2025, 09:05 AM
Quote from: 2b2ttianxiu on Apr 16, 2025, 08:54 AMI want to use csharp language to make dll c squirrel or call with python, but how can i make it(?
or how to fast develop plugin
YOU can simply adapt that by using plugin sdk of vcmp & Download sources from Habi's basic plugin download fiels check whats going on..! use those in chsarp if ur good at it
But... i use those, maybe get LINK2019 or other
#9
maybe can use unix or tcp socket to call other language
#10
I want to use csharp language to make dll c squirrel or call with python, but how can i make it(?
or how to fast develop plugin
#13
get error: AN ERROR HAS OCCURRED [stack overflow, cannot resize stack while in a metamethod]
#14
class CLabel {
    constructor() {

    }
    function _set(idx, val) {
        Console.Print(idx + " " + val)
        return null;
    }
    function _get(idx) {
        Console.Print(idx)
        return null;
    }
}
#15
Scripting and Server Management / Decode JSON
Oct 01, 2024, 03:06 AM
How i decode json?
I make a encode json code, but decode it again may different. How can i do?