|
发表于 2020-8-5 10:16:04
|
显示全部楼层
来自 中国–香港
这个问题很早之前我反编译了cmps然后略过了检查id那一步,用callfunc_begin直接执行cmps.amxx的cmpsmenu,代码如下:
- #include <amxmodx>
- #include <colorchat1>
- #define PLUGIN_NAME "CMPS_MENU"
- new const VERSION[] = "0.1";
- new const AUTHOR[] = "paslalala";
- public plugin_init()
- {
- register_plugin(PLUGIN_NAME, VERSION, AUTHOR);
- register_clcmd("say op", "test");
- register_clcmd("say h", "test");
- register_clcmd("go", "test");
- }
- public test(id)
- {
- if(get_user_flags(id) & ADMIN_KICK)
- {
- if(callfunc_begin("Cmp_MainMenu","cmps.amxx") == 1)
- {
- callfunc_push_int(id);
- callfunc_end();
- }
- }
- else
- {
- ColorChat(id,RED,"没有特定权限.")
- }
- }
复制代码 |
|