-
Notifications
You must be signed in to change notification settings - Fork 309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(new/resource): basic first resource #429
Conversation
99b2e72
to
a0c603b
Compare
Imagine deleting true comments :) I really didnt expect that... Now lets create whole docs by LLM |
content/docs/scripting-manual/introduction/creating-your-first-script.md
Outdated
Show resolved
Hide resolved
Let's break this in part: | ||
#### 1. Checking if Code is Executed by a Player: | ||
```lua | ||
if not (source > 0) then return end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if source == 0 then return end
content/docs/scripting-manual/introduction/creating-your-first-script.md
Outdated
Show resolved
Hide resolved
|
||
At the bottom of your `mymode_client.lua`, add this code: | ||
## Client resource |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Client script
|
||
And, guess what, it's actually {{% native_link "REGISTER_COMMAND" %}}! Click that link, and you'll be led to the documentation for this native. It looks a bit like this: | ||
The client-side files, located in the `client` folder, control interactions visible to players and handle rendering, while also enforcing security measures and processing that cannot be tampered with by players. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This last line is a bit weird, the client shouldn't enforce security measures and can be tampered with.
```lua | ||
if not information then return end | ||
``` | ||
This line serves as a crucial validation step, ensuring that the code receives a valid parameter sent by the server. Detecting and handling invalid parameters can be instrumental in identifying and thwarting cheating attempts. For further insights on advanced techniques, refer to the [advanced part](/content/docs/scripting-manual/introduction/creating-your-first-script-extra.md). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why would a value sent from the server help in identifying cheating attempts?
content/docs/scripting-manual/introduction/creating-your-first-script.md
Outdated
Show resolved
Hide resolved
content/docs/scripting-manual/introduction/creating-your-first-script.md
Outdated
Show resolved
Hide resolved
deb714b
to
103e2c1
Compare
Goal is to make user be able to understand how to create his first resource and prevent some first errors.
7e80000
to
510853c
Compare
I don't think this is an improvement over the current documentation. I added this to the tracker though, because these do need to be rewritten. In the future these scripting examples should be completely rewritten and should preferably be a step-by-step in making an example resource like capture the flag. |
Well this is exactly having a step-by-step doc. It also handles docs having beginer guide + more advanced. If it will be rewrittent in the future it's fine, but closing this instead of the actual one make no sense imo. This is a way more complete guide + up to date. |
This pull request enhances the documentation for the first resource by expanding coverage, improving organization, and clarifying terminology. Additionally, it includes an extra section at the end of the module with supplementary materials and further reading suggestions for deeper learning.