SA-MP and C# -
TheBlackRazer - 10.09.2010
Hello guys,
i have a little question:
Is there any possibility to extend sa-mp with C#, or
to write gamemodes with it? There must be a way to let the server communicate with c#-compiled
files, or not?
It would be great, if you can extend sa-mp with C# or if you had a library which contains all
script functions that you can use in pawn scripts.
In any way, you should can load the assembly and get the entry point (the gamemode-initialisation)
and then run the rest of it.
is this possible? i mean, itґs difficult to use native c++ and C#, of course, but it must work anyhow.
i mean, sa-mp is good enough to do something like this.
C# is much easier than c++. So many newbies can extend it faster as with c++,
and the possibilities if you can use C# to extend it will be much bigger, as well you can use MySQL databases,
network comunication and so on, all based on .Net Framework.
So say it: Is it possible? I hope you say yes. If it is, i will help on it, if some people develop it (only C# programming) as much as i can.
Greetings
TBR
Re: SA-MP and C# -
RyDeR` - 10.09.2010
Nope, as far as I know you can't write .dll plugins for SA:MP via C#
It's difficult in the beginning but once you got the basic you'll play with it.
AW: SA-MP and C# -
TheBlackRazer - 10.09.2010
Thatґs worse ...
You can use C++ dllґs with .Net. If you can write a library or program, which
converts the data from C# into C++ or reverse, it may work to make a gamemode on this way.
anyhow there must be a way to do it. iґm sure it can work.
If i could write c++ it would be much easier to try it...
Re: SA-MP and C# -
joemomma53 - 10.09.2010
Server owners that run their servers on linux would have to use mono in order to use plugins in C#(or any .net language), which they wouldn't have to do with C++, cause C++ compiles natively on both linux, and windows, which is less of a hassle overall.
AW: SA-MP and C# -
TheBlackRazer - 10.09.2010
Maybe there is a way.
The only question is, if itґs possible with making a plugin for sa-mp.
I found this information on the web. So C++ and C# could communicate very easy.
http://stackoverflow.com/questions/5...-c-application
So, if you send strings in form as a command (like "saveXML("user1", "password1")) you can do it.
All you need is the function to invoke methods.
I think itґs worth a try. And i will try it
EDIT: Here is the best information off all. So you wouldnґt need any named pipe. The solution is: Bridges.
But this is something for the developer team ... (
http://www.codeproject.com/KB/dotnet/bridge.aspx)
Re: SA-MP and C# -
RoBo - 11.09.2010
You can use C# (or any other language) if you convert the SDK.
Re: SA-MP and C# -
ettans - 11.09.2010
I believe dugi or Popz attempted to make a C# game-mode a while ago.
AW: SA-MP and C# -
TheBlackRazer - 11.09.2010
That sounds interesting
I donґt want to script a gamemode with pawn. If itґs possible with C#
i will do it.
Re: AW: SA-MP and C# -
Popz - 14.09.2010
Quote:
Originally Posted by TheBlackRazer
That sounds interesting
I donґt want to script a gamemode with pawn. If itґs possible with C#
i will do it.
|
Yea I did once using sockets. It works quite well, but my socket was being laggy for some reason so I gave up. It's possible though.
Popz
Re: SA-MP and C# -
Killerkid - 14.09.2010
It's possible using libmono:
http://www.mono-project.com/Embedding_Mono