Можешь скинуть код нормально? Не скринами
Вот так:
1. script_name('test script')
2. script_author('heybey')
3. script_description('text')
4.
5. require "lib.moonloader"
6.
7. local tag = '[Author - heybey]:'
8. local main_color = 0x9A2EFE
9. local main_color_text = "(9A2EFE)"
10.local white_color = "(FFFFFF)"
11.
12. function main()
13. if not isSampLoaded() or not isSampfuncsLoaded() then return end
14. while not isSampAvailable() do wait(100) end
15.
16. sampRegisterChatCommand ("normal", cmd_test)
17. sampRegisterChatCommand ("bad", bad)
18. sampRegisterChatCommand ("great", great)
19.
20. sampAddChatMessage(tag .. " Activation - /normal", 0xFFFF00)
21.
22. while true do
23. wait(0)
24.
25. end
26.
27. end
28.
29. function cmd_test(arg)
30. sampAddChatMessage("Succesfull", main_color)
40. end
41.
42. function bad(arg)
43. if #arg == 0 then
44. sampAddChatMessage ("arg not completed")
45. else
46. sampAddChatMessage ("arg completed. arg - " .. arg, main_color)
47. end
48.
49. end
50.
51. function great(arg)
52. var1, var2 = string.match(arg, "(.+) (.+)")
53. if var1 == nil or var1 == "" then
54. sampAddChatMessage("tw0 arg, but Im not undetstend", white_color)
55. else
56. sampAddChatMessage("ohh yes, tw0 arguments. first: " .. white_color .. var1 .. ", " .. main_color_text .. "tw0" .. white_color .. var2, main_color)
57. end
58.
59. end