Sign in to follow this  
Crossy1998

C# ClientSide Scripting Help

Recommended Posts

Well, I've been stuck with a little problem for a while, I can get C# Server Side scripting working fully and have tested it but when it comes to client side I have a bit of a problem. I've created the "cs_packages" folder in the 'client_resources' folder. When it comes to actually loading the script which is in its own folder inside cs_packages and yes it is not compiled into a .dll file.

The problem is when I connect to my local server it grabs all the dll packages inside the cs_packages folder but doesn't start my "Main.cs" script which has a little output with "Loading Clientside".

I've looked at YouTube videos like "Stuyk" and it worked for him, for me no.

Any help would be appreciated, I'll leave the code in the Main.cs in a picture below.

9wtj6Es.jpg

Share this post


Link to post
Share on other sites

Did you create a file called enable-clientside-cs.txt on the root folder where RAGE is installed?

Share this post


Link to post
Share on other sites
Posted (edited)

Yes I did, I've looked through most videos and forums but it still doesn't work. When I looked at how JS do it they use an "Index.js" file, I thought it would work the same but it doesn't from what I could tell it looks like cs_packages and anything in it gets loaded automatically and that's what seems to be the problem loading the actual "Main.cs" file.

The "enable-clientside-cs.txt" also has "true" set in it.

Edited by Crossy1998

Share this post


Link to post
Share on other sites

Got it sorted in the end, it was the "enable-clientside-cs.txt" for some reason my computer was taking it as a text file but only with the extension .txt, I put it into Visual studio code changed it to a text file when saving and it removed the .txt part at the end. Working fully now!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.