0
0
mirror of https://gitlab.com/YuukiPS/GC-Resources.git synced 2025-04-29 09:35:48 +00:00
GC-Resources/Resources/Scripts/Gadget/SetGadgetState_BanMP.lua
2023-04-20 15:34:28 -07:00

37 lines
1.2 KiB
Lua
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

function OnClientExecuteReq(context, param1, param2, param3)
--联机状态下,由于未被及时卸载时被交互的保险
if true == ScriptLib.CheckIsInMpMode(context) then
ScriptLib.PrintContextLog(context, "#SetGadgetState_BanMP# Is in MP mode, refuse state change.")
--重新设为可交互
ScriptLib.SetGadgetEnableInteract(context, 0, ScriptLib.GetContextGadgetConfigId(context), true)
return 0
end
--ScriptLib.PrintLog("GadgetState Get Change")
if param1 == 0 then
ScriptLib.SetGadgetState(context, GadgetState.Default)
end
if param1 == 201 then
ScriptLib.SetGadgetState(context, GadgetState.GearStart)
end
if param1 == 202 then
ScriptLib.SetGadgetState(context, GadgetState.GearStop)
end
if param1 == 203 then
ScriptLib.SetGadgetState(context, GadgetState.GearAction1)
end
if param1 == 204 then
ScriptLib.SetGadgetState(context, GadgetState.GearAction2)
end
if param1 == 901 then
ScriptLib.SetGadgetState(context, GadgetState.Action01)
end
if param1 == 902 then
ScriptLib.SetGadgetState(context, GadgetState.Action02)
end
if param1 == 903 then
ScriptLib.SetGadgetState(context, GadgetState.Action03)
end
if param1 == 106 then
ScriptLib.SetGadgetState(context, GadgetState.ChestRock)
end
end