Skip to content
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

Update creating-your-first-script-csharp.md #281

Closed
wants to merge 1 commit into from

Conversation

SQKo
Copy link
Contributor

@SQKo SQKo commented Nov 8, 2021

Add a client-specific ClientScript and server-specific ServerScript class as alternative to BaseScript, which was added since artifact 3395 citizenfx/fivem@304f787

Add a client-specific ClientScript and server-specific ServerScript class as alternative to BaseScript
Copy link
Collaborator

@4mmonium 4mmonium left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, sorry for the super late response. Perhaps you could provide some usage example? :-)

@SQKo
Copy link
Contributor Author

SQKo commented Mar 28, 2022

There is no example actually, unless you want me to replace "BaseScript" with "ClientScript"/"ServerScript" in examples of another pages,

which I found here: https://github.com/citizenfx/fivem-docs/blob/cd7acf5402b61feda988f521c98f46aaa3541617/content/docs/scripting-manual/introduction/creating-your-first-script-csharp.md

using CitizenFX.Core;

namespace MyResourceNameClient
{
    public class Class1 : BaseScript
    {
        public Class1()
        {

        }
    }
}

becomes:

using CitizenFX.Core;

namespace MyResourceNameClient
{
    public class Class1 : ClientScript
    {
        public Class1()
        {

        }
    }
}

As far I know this was added only to prevent possible ambiguity/conflict when building and linking the .dll

@AvarianKnight
Copy link
Collaborator

This should probably be explained better within the example, given the age of this PR I'm going to close this and add it to the tracking issue #466

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants