Kxnrl / Store

Store plugin for Source Engine Games.
https://github.com/Kxnrl/Store
90 stars 46 forks source link

Skin level management And the chinese content of !store display issue #89

Closed epicbluffer closed 3 years ago

epicbluffer commented 4 years ago

How can I manage the database so that player can acquire level 5-6 skin? And the chinese content of !store in game is not shown in its chinese (亂碼了) How can I fix that?

Kxnrl commented 4 years ago

可以中文交流, 前提是你看得懂简体 lol

1.Compose or OpenCase 2.Set database charset to utf8mb4

epicbluffer commented 4 years ago

1 OpenCase 里改就可以了? 要用軟件嗎? 就是想用LEVEL 6 的SKIN 好像沒得買和抽 2 好 謝謝 另外 除了模形 其他像足跡的都沒開放了 對吧, 就是我的!STORE只有模型是正常吧? 想弄帽子的話要怎麼做

Kxnrl commented 4 years ago

OpenCase的话, 你需要在store_item_child里面定义case的等级, 只有3级, 0代表3种Case都有, 1就是Advanced和Ultima case , 2就是 Ultima case 才有. Skin Level主要是提供给API用,也用在显示菜单里面装逼.

帽子不支持Case和Compose

epicbluffer commented 4 years ago

OpenCase的话, 你需要在store_item_child里面定义case的等级, 只有3级, 0代表3种Case都有, 1就是Advanced和Ultima case , 2就是 Ultima case 才有. Skin Level主要是提供给API用,也用在显示菜单里面装逼.

帽子不支持Case和Compose

好 非常感謝!:)

epicbluffer commented 4 years ago

OpenCase的话, 你需要在store_item_child里面定义case的等级, 只有3级, 0代表3种Case都有, 1就是Advanced和Ultima case , 2就是 Ultima case 才有. Skin Level主要是提供给API用,也用在显示菜单里面装逼.

帽子不支持Case和Compose

有參數設定CREDITS的獲得方法嗎?

Kxnrl commented 4 years ago

如果是通关Online获得credits, 在Store.sp搜索

g_iCreditsTimerOnline 

and

g_fCreditsTimerInterval

如果是其他的, 你可以写扩展plugin来完成.

epicbluffer commented 4 years ago

如果是通关Online获得credits, 在Store.sp搜索

g_iCreditsTimerOnline 

and

g_fCreditsTimerInterval

如果是其他的, 你可以写扩展plugin来完成.

THX 這個STORE太好了 太感謝了:)

epicbluffer commented 4 years ago

如果是通关Online获得credits, 在Store.sp搜索

g_iCreditsTimerOnline 

and

g_fCreditsTimerInterval

如果是其他的, 你可以写扩展plugin来完成.

THX 這個STORE太好了 太感謝了:)

Bro 那個我用了STORE的SKIN可是顯示不出來 還是預設的SKIN 這個要在哪裡弄? 這個跟我ZR里PLAYERCLASSES.TXT 那個MODEL PATH有關係嗎? 變ZOMBIE之後手部模型反而是STORE SKIN的模型

Kxnrl commented 4 years ago

zr 会 override playerskin, 你需要禁止human的skin

然后就是你的compile macro需要设置成GM_ZE 或者你直接使用store_ze.smx

epicbluffer commented 4 years ago

zr 会 override playerskin, 你需要禁止human的skin

然后就是你的compile macro需要设置成GM_ZE 或者你直接使用store_ze.smx

請問要怎麼禁SKIN? 我不是很會編程 能指教多下嗎? 直接用store_ze.smx 意思是 把其他的SMX刪了 然後只留下這個改成store.smx嗎?

Kxnrl commented 4 years ago
  1. 在zr的classes里面禁止model
  2. 只使用store_ze.smx然后rename store.smx
epicbluffer commented 4 years ago
  1. 在zr的classes里面禁止model 我不知道是哪個文件? PLAYERCLASSES.TXT 把MODEL PATH 刪了會死SERVER. 還是說要去SCRIPTING里面改哪個SP ? 我真心電腦白痴 LOL
  2. 只使用store_ze.smx然后rename store.smx 有的 安裝時按指示做了
Kxnrl commented 4 years ago

scripts里面改吧. 你的zr是franug的吗

epicbluffer commented 4 years ago

不是FRANUG的 我的是這個

zombiereloaded-3.1-r733.zip (https://forums.alliedmods.net/showthread.php?t=205567) 水平有限 試來試去都不行 不知道改哪個SP ~_~

里面有個APPLY.INC有一段是 /**

試了改 但是都沒用 然後就不知道要到哪裡改哪個SP了

Kxnrl commented 4 years ago

那你在playerclass.txt直接把modelpath 设置no_change

epicbluffer commented 4 years ago

那你在playerclass.txt直接把modelpath 设置no_change

It WORKS! so much THANKS!

epicbluffer commented 4 years ago

STORE里的SKIN 在ZR MODE 如果重生成T 就顯示不出來 CT就可以 如果要令T也變得顯示得到 應該要怎麼做?

Kxnrl commented 4 years ago

T不是应该显示zombie model吗? 同理, playerclass里面的modelpath 设置no_change

epicbluffer commented 4 years ago

T不是应该显示zombie model吗? 是的 我意思是回合開始時 未有MOTHERZOMBIE前 如果是在CT 那STORE的SKIN會顯示出來 如果在T(人類) 則是經典T的SKIN 不會顯示STORE的SKIN (試過ITEMS.TXT 把TEAMS改成4, 1, 沒效) 或許我試試找PLUGIN改成回合開始時只有很少T吧 同理, playerclass里面的modelpath 设置no_change

Kxnrl commented 4 years ago

zr的cfg有参数可以设置游戏开始之前switch所有player到ct

epicbluffer commented 4 years ago

zr的cfg有参数可以设置游戏开始之前switch所有player到ct

感激, ALIPAY小小心意 :)

Kxnrl commented 4 years ago

thx

epicbluffer commented 4 years ago

如果是通关Online获得credits, 在Store.sp搜索

g_iCreditsTimerOnline 

and

g_fCreditsTimerInterval

如果是其他的, 你可以写扩展plugin来完成.

這個改了數值之後 重開SERVER 也沒反應 請問是要怎麼樣才生效?

Kxnrl commented 4 years ago

改了之后你要re-compile store.sp with GM_ZE

epicbluffer commented 4 years ago

改了之后你要re-compile store.sp with GM_ZE

是用什麼軟件/網站 COMPILE完就好了?

Kxnrl commented 4 years ago

spcomp.exe啊, 你download一个1.10的SM, 不过要6371以下的版本, 我一般用6366的来compile

epicbluffer commented 4 years ago

好的

epicbluffer commented 4 years ago

現在 ARMS MODEL被感染了也是人類的ARMSMODEL, 試過Franc1sco 的ARMS FIX (https://forums.alliedmods.net/showthread.php?p=2277249 ) 會強制所有人類用某1個ARMS MODEL, 但是原本的就被覆蓋了 而且有時候被感染也是會不變ARMSMODEL

有其他方法嗎?

Kxnrl commented 4 years ago

glove overcap?

epicbluffer commented 4 years ago

glove overcap? use this plugin and remove default arms feature in the sp file. https://forums.alliedmods.net/showthread.php?p=2277249 seems fixed :)

epicbluffer commented 4 years ago

glove overcap? 用了PLUGIN後 還是會有問題 現在是 變MOTHERZOMBIE大概率沒問題 但是被感染時就手變隱形了

Kxnrl commented 4 years ago

this is a simple arms plugin

#pragma semicolon 1
#pragma newdecls required

#include <sourcemod>
#include <smutils>
#include <zombiereloaded>
#include <zr_tools>

public Plugin myinfo =
{
    name        = "ZombiEscape - Zombie Arms",
    author      = "Kyle",
    description = "",
    version     = "1.0",
    url         = "https://www.kxnrl.com"
};

char arms[][] = {
    "models/player/custom_player/maoling/pvz/zombie/zombie_arms.mdl",
    "models/player/custom_player/maoling/pvz/footsoldier/footsoldier_arms.mdl"
};

public void OnMapStart()
{
    for (int i = 0; i < sizeof(arms); i++)
    {
        if (FileExists(arms[i]))
            PrecacheModel(arms[i], true);
    }
}

public void ZR_OnClientInfected(int client, int killer, bool motherInfect, bool respawnOverride, bool respawn)
{
    int class = ZR_GetActiveClass(client);

    if (!ZR_IsValidClassIndex(class))
        return;

    char classname[32];
    ZR_GetClassDisplayName(class, classname, 32);

    char model[128];
    ZRT_GetClientAttributeString(client, "arms_path", model, 128);

    bool find = false;
    for (int i = 0; i < sizeof(arms); i++)
    {
        if (FileExists(arms[i]) && IsModelPrecached(arms[i]))
        if (strcmp(arms[i], model) == 0)
        {
            find = true;
            break;
        }
    }

    if (!find)
        return;

    SetEntPropString(client, Prop_Send, "m_szArmsModel", model);
}
epicbluffer commented 4 years ago

this is a simple arms plugin

#pragma semicolon 1
#pragma newdecls required

#include <sourcemod>
#include <smutils>
#include <zombiereloaded>
#include <zr_tools>

public Plugin myinfo =
{
    name        = "ZombiEscape - Zombie Arms",
    author      = "Kyle",
    description = "",
    version     = "1.0",
    url         = "https://www.kxnrl.com"
};

char arms[][] = {
    "models/player/custom_player/maoling/pvz/zombie/zombie_arms.mdl",
    "models/player/custom_player/maoling/pvz/footsoldier/footsoldier_arms.mdl"
};

public void OnMapStart()
{
    for (int i = 0; i < sizeof(arms); i++)
    {
        if (FileExists(arms[i]))
            PrecacheModel(arms[i], true);
    }
}

public void ZR_OnClientInfected(int client, int killer, bool motherInfect, bool respawnOverride, bool respawn)
{
    int class = ZR_GetActiveClass(client);

    if (!ZR_IsValidClassIndex(class))
        return;

    char classname[32];
    ZR_GetClassDisplayName(class, classname, 32);

    char model[128];
    ZRT_GetClientAttributeString(client, "arms_path", model, 128);

    bool find = false;
    for (int i = 0; i < sizeof(arms); i++)
    {
        if (FileExists(arms[i]) && IsModelPrecached(arms[i]))
        if (strcmp(arms[i], model) == 0)
        {
            find = true;
            break;
        }
    }

    if (!find)
        return;

    SetEntPropString(client, Prop_Send, "m_szArmsModel", model);
}

我INCLUDE這FOLDER里面沒有ZR_TOOLS這個東西 所以一直COMPILE不了 我試過INCLUDE別的東西 /home/csgoserver/serverfiles/csgo/addons/sourcemod/scripting/include/sdktools_engine.inc(49) : error 147: new-style declarations are required /home/csgoserver/serverfiles/csgo/addons/sourcemod/scripting/include/sdktools_engine.inc(59) : error 147: new-style declarations are required /home/csgoserver/serverfiles/csgo/addons/sourcemod/scripting/include/sdktools_engine.inc(59) : error 147: new-style declarations are required /home/csgoserver/serverfiles/csgo/addons/sourcemod/scripting/include/sdktools_engine.inc(69) : error 147: new-style declarations are required /home/csgoserver/serverfiles/csgo/addons/sourcemod/scripting/include/sdktools_functions.inc(47) : error 147: new-style declarations are required /home/csgoserver/serverfiles/csgo/addons/sourcemod/scripting/include/sdktools_functions.inc(58) : error 147: new-style declarations are required /home/csgoserver/serverfiles/csgo/addons/sourcemod/scripting/include/sdktools_functions.inc(58) : error 147: new-style declarations are required /home/csgoserver/serverfiles/csgo/addons/sourcemod/scripting/include/sdktools_functions.inc(68) : error 147: new-style declarations are required /home/csgoserver/serverfiles/csgo/addons/sourcemod/scripting/include/sdktools_functions.inc(81) : error 147: new-style declarations are required /home/csgoserver/serverfiles/csgo/addons/sourcemod/scripting/include/sdktools_functions.inc(90) : error 147: new-style declarations are required /home/csgoserver/serverfiles/csgo/addons/sourcemod/scripting/include/sdktools_functions.inc(102) : error 147: new-style declarations are required /home/csgoserver/serverfiles/csgo/addons/sourcemod/scripting/include/sdktools_functions.inc(102) : error 147: new-style declarations are required /home/csgoserver/serverfiles/csgo/addons/sourcemod/scripting/include/sdktools_functions.inc(102) : error 147: new-style declarations are required /home/csgoserver/serverfiles/csgo/addons/sourcemod/scripting/include/sdktools_functions.inc(102) : fatal error 190: too many error messages on one line

還是不行, 沒有ZR_TOOLS是不是我的ZOMBIE RELOADED版本太舊了?

Kxnrl commented 4 years ago

更新sourcemod版本, 更新include files

epicbluffer commented 4 years ago

/home/csgoserver/serverfiles/csgo/addons/sourcemod/scripting/include/zr/infect.zr.inc(36) : error 147: new-style declarations are required /home/csgoserver/serverfiles/csgo/addons/sourcemod/scripting/include/zr/infect.zr.inc(46) : error 147: new-style declarations are required /home/csgoserver/serverfiles/csgo/addons/sourcemod/scripting/include/zr/infect.zr.inc(61) : error 147: new-style declarations are required /home/csgoserver/serverfiles/csgo/addons/sourcemod/scripting/include/zr/infect.zr.inc(75) : error 147: new-style declarations are required /home/csgoserver/serverfiles/csgo/addons/sourcemod/scripting/include/zr/infect.zr.inc(90) : error 147: new-style declarations are required /home/csgoserver/serverfiles/csgo/addons/sourcemod/scripting/include/zr/infect.zr.inc(101) : error 147: new-style declarations are required /home/csgoserver/serverfiles/csgo/addons/sourcemod/scripting/include/zr/infect.zr.inc(114) : error 147: new-style declarations are required /home/csgoserver/serverfiles/csgo/addons/sourcemod/scripting/include/zr/infect.zr.inc(123) : error 147: new-style declarations are required /home/csgoserver/serverfiles/csgo/addons/sourcemod/scripting/include/zr/respawn.zr.inc(47) : error 147: new-style declarations are required /home/csgoserver/serverfiles/csgo/addons/sourcemod/scripting/include/zr/respawn.zr.inc(59) : error 147: new-style declarations are required /home/csgoserver/serverfiles/csgo/addons/sourcemod/scripting/include/zr/respawn.zr.inc(68) : error 147: new-style declarations are required /home/csgoserver/serverfiles/csgo/addons/sourcemod/scripting/include/zr/respawn.zr.inc(82) : error 147: new-style declarations are required /home/csgoserver/serverfiles/csgo/addons/sourcemod/scripting/include/zr/respawn.zr.inc(95) : error 147: new-style declarations are required /home/csgoserver/serverfiles/csgo/addons/sourcemod/scripting/include/zr/class.zr.inc(55) : error 147: new-style declarations are required /home/csgoserver/serverfiles/csgo/addons/sourcemod/scripting/include/zr/class.zr.inc(64) : error 147: new-style declarations are required /home/csgoserver/serverfiles/csgo/addons/sourcemod/scripting/include/zr/class.zr.inc(84) : error 147: new-style declarations are required /home/csgoserver/serverfiles/csgo/addons/sourcemod/scripting/include/zr/class.zr.inc(97) : error 147: new-style declarations are required /home/csgoserver/serverfiles/csgo/addons/sourcemod/scripting/include/zr/class.zr.inc(97) : error 147: new-style declarations are required /home/csgoserver/serverfiles/csgo/addons/sourcemod/scripting/include/zr/class.zr.inc(109) : error 147: new-style declarations are required /home/csgoserver/serverfiles/csgo/addons/sourcemod/scripting/include/zr_tools.inc(19) : error 147: new-style declarations are required /home/csgoserver/serverfiles/csgo/addons/sourcemod/scripting/include/zr_tools.inc(33) : error 147: new-style declarations are required /home/csgoserver/serverfiles/csgo/addons/sourcemod/scripting/include/zr_tools.inc(33) : error 147: new-style declarations are required /home/csgoserver/serverfiles/csgo/addons/sourcemod/scripting/include/zr_tools.inc(33) : error 147: new-style declarations are required /home/csgoserver/serverfiles/csgo/addons/sourcemod/scripting/include/zr_tools.inc(33) : fatal error 190: too many error messages on one line

更新了SM1.10 6454 也找了ZR_TOOLS的INC 反而是這樣了 試過用6366的 也不行 ><

Kxnrl commented 4 years ago

用这个zr_tools.inc

/* Zombie:Reloaded additional native tools
*
* Copyright � 2013, FrozDark
*
* This file is provided as is (no warranties).
*
*/

/**
 * Gets client class section name in the config
 *
 * @param client        Client index.
 * @param buffer        Buffer to store the class section name in.
 * @param maxlen        Max length to store.
 *
 * @return              Number of bytes written to the buffer.
 * @error               If the client is not in game or invalid.
 */
native void ZRT_GetClientClassSectionName(int client, char[] buffer, int maxlen);

/**
 * Gets attribute string of the player's class
 *
 * @param client        Client index.
 * @param attrib        Attribute name.
 * @param buffer        Buffer to store the attribute string in.
 * @param maxlen        Max length to store.
 * @param defvalue      Optional default value to use if the attribute is not found.
 *
 * @return              Number of bytes written to the buffer.
 * @error               If the client is not in game or invalid.
 */
native void ZRT_GetClientAttributeString(int client, const char[] attrib, char[] buffer, int maxlen, const char[] defvalue = "");

/**
 * Gets attribute numeric value of the player's class
 *
 * @param client        Client index.
 * @param attrib        Attribute name.
 * @param defvalue      Optional default value to use if the attribute is not found.
 *
 * @return              Retrieves the numeric value.
 * @error               If the client is not in game or invalid.
 */
native void ZRT_GetClientAttributeValue(int client, const char[] attrib, int defvalue = 0);

/**
 * Gets attribute floating value of the player's class
 *
 * @param client        Client index.
 * @param attrib        Attribute name.
 * @param defvalue      Optional default value to use if the attribute is not found.
 *
 * @return              Retrieves the floating value.
 * @error               If the client is not in game or invalid.
 */
native float ZRT_GetClientAttributeValueFloat(int client, const char[] attrib, float defvalue = 0.0);

/**
 * Whether the player has attribute
 *
 * @param client        Client index.
 * @param attrib        Attribute name.
 *
 * @return              True on success, false otherwise.
 * @error               If the client is not in game or invalid.
 */
native bool ZRT_PlayerHasAttribute(int client, const char[] attrib);

/**
 * Whether the round is active
 *
 * @noparams
 *
 * @return              True on round active, false otherwise
 * @noerror
 */
native bool ZRT_IsRoundActive();

/*----------------------------------
***********************************
**  Don't edit below this line!  **
***********************************
-----------------------------------*/

public SharedPlugin __pl_zr_tools = 
{
    name = "zr_tools",
    file = "zr_tools.smx",
#if defined REQUIRE_PLUGIN
    required = 1,
#else
    required = 0,
#endif
};

#if !defined REQUIRE_PLUGIN
public void __pl_zr_tools_SetNTVOptional()
{
    MarkNativeAsOptional("ZRT_GetClientClassSectionName");
    MarkNativeAsOptional("ZRT_GetClientAttributeString");
    MarkNativeAsOptional("ZRT_GetClientAttributeValue");
    MarkNativeAsOptional("ZRT_GetClientAttributeValueFloat");
    MarkNativeAsOptional("ZRT_PlayerHasAttribute");
    MarkNativeAsOptional("ZRT_IsRoundActive");
}
#endif