Crossy1998 Posted March 25, 2019 Posted March 25, 2019 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.
Xabi Posted March 25, 2019 Posted March 25, 2019 Did you create a file called enable-clientside-cs.txt on the root folder where RAGE is installed?
Crossy1998 Posted March 25, 2019 Author Posted March 25, 2019 (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 March 25, 2019 by Crossy1998
Crossy1998 Posted March 26, 2019 Author Posted March 26, 2019 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!
robearded Posted June 3, 2019 Posted June 3, 2019 5 hours ago, T0xicPo1nter said: I have the same problem! How did you fixed it? Create enable-clientside-cs.txt file inside the rage directory. If not working, you may have extensions hidden from windows and you manually put .txt at the end of the file which with the hidden extension would make .txt.txt Show us a screenshot of the contents inside main RAGE directory.
iDavidGB Posted June 4, 2019 Posted June 4, 2019 (edited) vor 2 Stunden schrieb T0xicPo1nter: I fixed it. Thanks Got the same problem. Can you tell me how you solved it? I definitly named it "enable-clientside-cs.txt" without hidden extensions. Edited June 4, 2019 by iDavidGB
Simon9608 Posted January 22, 2020 Posted January 22, 2020 (edited) In case anyone comes across this issue too and they've verified that they have done what the above comments suggest then check if your client class has 'using RAGE.Game' , if it does remove it and derive class from Events.Script not just Script. For some reason that won't load your script. Hope that helps! Edited January 22, 2020 by Simon9608 clearer formatting
Xabi Posted January 22, 2020 Posted January 22, 2020 2 minutes ago, Simon9608 said: In case anyone comes across this issue too and they've verified that they have done what the above comments suggest then check if your client class has 'using RAGE.Game' , if it does remove it and derive class from Events.Script not just Script. For some reason that won't load your script. Hope that helps! It's not the same class, they're RAGE.Events.Script and RAGE.Game.Script, you need the first one as you said.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now