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

open.mp #430

Open
axmfs opened this issue May 28, 2023 · 10 comments
Open

open.mp #430

axmfs opened this issue May 28, 2023 · 10 comments

Comments

@axmfs
Copy link

axmfs commented May 28, 2023

I guess it's time to move to open.mp, a multiplayer mod for Grand Theft Auto San Andreas completely built from the ground up and open-source!
Would be great if @ikkentim or any other contributor created a branch for open.mp.

@ikkentim
Copy link
Owner

ikkentim commented May 28, 2023

Since there is no documentation that I know of for the new components SDK of open.mp and there is no sample for consuming there SDK I've had a hard time to work on a proof of concept.

The current sampsharp plugin works fine with open.mp as a "legacy" plugin.

EDIT: I see some samples where released earlier this year. I might give it a shot.

@duydang2311
Copy link
Contributor

Hello @ikkentim, we've actually had a small chat about this on Discord, and just a bit later, I made my attempt to make a C# component, if you don't mind, please check this out https://github.com/duydang2311/open.mp-net.

So far, I've done some of API wrappers, events (except for some that require complex struct marshal) and threading. It works basically, not fully tested though.

If it's possible, do you feel like working together?

@ikkentim
Copy link
Owner

I'm expperimenting with some setups of interop

@ikkentim
Copy link
Owner

I'm working on a proof-of-concept project here: https://github.com/SampSharp/openmp-sampsharp-x64-poc

@axmfs
Copy link
Author

axmfs commented Feb 12, 2024

this is great news! :)

@bssth
Copy link

bssth commented Jan 17, 2025

Hi! I'm getting this in open.mp:

[2025-01-17T16:57:47+0400] [Info] [SampSharp:ERROR] Can not load sampsharp if a non-SampSharp gamemode is set to load.
[2025-01-17T16:57:47+0400] [Info] [SampSharp:ERROR] Please ensure you set 'gamemode0 empty 1' in your server.cfg file.

But my config is:

        "legacy_plugins": ["SampSharp"],
        "main_scripts": [
            "empty 0"
        ],

Can I fix this somehow, @ikkentim?
Or I should compile last version for myself referring to #420?

@ikkentim
Copy link
Owner

ikkentim commented Jan 17, 2025

In the latest released version of sampsharp, only server.cfg configuration is supported. You'll need to use a server.cfg config instead of a json config.
In the unreleased version on the master branch a json config is supported.

@bssth
Copy link

bssth commented Jan 17, 2025

Almost got it. Compiled last commit by myself

[2025-01-17T19:53:32+0400] [Info] [SampSharp:INFO] v0.11.0, (C)2014-2022 Tim Potze
[2025-01-17T19:53:32+0400] [Info] [SampSharp:ERROR] Invalid gamemode specified in server.cfg.

gamemodes\empty.amx present, main_script is same

If something needs to be fixed, I'll try to do it and create PR

@ikkentim
Copy link
Owner

"Invalid gamemode specified in server.cfg." means it is looking for your .NET gamemode, so you're one step further ;)
I think you can put the sampsharp config options directly in the root object of the json file

@bssth
Copy link

bssth commented Jan 17, 2025

I tried to put this in root JSON:

    "gamemode": "empty",
    "gamemode0": "empty"

It didn't help. I can try to debug your code and create pull request if you don't know what to do too

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

No branches or pull requests

4 participants