Re: SampSharp - Write gamemodes in .NET -
SecretBoss - 05.07.2015
Great work
Re: SampSharp - Write gamemodes in .NET -
ikkentim - 05.07.2015
Quote:
Originally Posted by kaZax
How to set encoding to "1251 windows-1251 ANSI Cyrillic; Cyrillic (Windows)" ?
|
In server.cfg add
Where [number] is the codepage identifier you'd like to use
http://sampsharp.timpotze.nl/configuration#encoding
Re: SampSharp - Write gamemodes in .NET -
kaZax - 06.07.2015
Quote:
Originally Posted by ikkentim
|
Thank you!! Great work.
Re: SampSharp - Write gamemodes in .NET -
ikkentim - 06.07.2015
Quote:
Originally Posted by kaZax
Thank you!! Great work.
|
You can also call Server.SetCodepage within the code.
Re: SampSharp - Write gamemodes in .NET -
Bravo81 - 07.07.2015
Hello! Just stumbled across your page as I see your interesting signature logo..I gave in & clicked.
I'm a C# Developer, I create games in Unity with Visual Studio.
Now I want to make my own game modes for SA-MP, with MySQL connectivity..this plugin looks absolutely amazing to me.
Would I be able to do that with ease? Are there any issues or anything that would prevent me from creating a working game mode from scratch in C#?
Also do you have a Wiki or Documentation I can refer to?
Thanks for your time.
Re: SampSharp - Write gamemodes in .NET -
ikkentim - 07.07.2015
Everything should just work.
There is very basic documentation available at
http://sampsharp.timpotze.nl and
http://api.sampsharp.timpotze.nl (API docs is a version behind, sorry! ). It tells you how to set things up and get started but much more hasn't been documented yet. With the latest version of sampsharp, you should be able to use entity framework, but I like NHibernate better (I had issues with EF before, but NH worked for me from the gecko). A basic NHibernate example can be found here:
https://github.com/ikkentim/SampShar...NHibernateTest
I'm going on vacation tomorrow, so if you need help, we also have a channel on gitter:
http://gitter.im/ikentim/sampsharp , and there are some friendly people on there who might be able to help you if you have issues getting started.
To get started, it's best if you follow the steps under "setup" (except for Building the Plugin) and then the steps under "basics" on
http://sampsharp.timpotze.nl
Re: SampSharp - Write gamemodes in .NET -
Bravo81 - 07.07.2015
Quote:
Originally Posted by ikkentim
Everything should just work.
There is very basic documentation available at http://sampsharp.timpotze.nl and http://api.sampsharp.timpotze.nl (API docs is a version behind, sorry! ). It tells you how to set things up and get started but much more hasn't been documented yet. With the latest version of sampsharp, you should be able to use entity framework, but I like NHibernate better (I had issues with EF before, but NH worked for me from the gecko). A basic NHibernate example can be found here: https://github.com/ikkentim/SampShar...NHibernateTest
I'm going on vacation tomorrow, so if you need help, we also have a channel on gitter: http://gitter.im/ikentim/sampsharp , and there are some friendly people on there who might be able to help you if you have issues getting started.
To get started, it's best if you follow the steps under "setup" (except for Building the Plugin) and then the steps under "basics" on http://sampsharp.timpotze.nl
|
Thank you for your time Tim, I'll let you know how I get on.
Enjoy your holiday!
Re: SampSharp - Write gamemodes in .NET -
Bravo81 - 08.07.2015
Wanted to update this just to say Thank you to Tim & Florian for their help with this so far! I've got a server running a game mode I've created, with commands that run SQL queries using nHibernate.
Pretty amazing being that with Pawn I couldn't even get a text command working.
Re: SampSharp - Write gamemodes in .NET -
KingServerIRAN - 08.07.2015
Good job
Re: SampSharp - Write gamemodes in .NET -
Buero - 24.07.2015
How get\set time on the server?
Re: SampSharp - Write gamemodes in .NET -
WopsS - 24.07.2015
Quote:
Originally Posted by Buero
How get\set time on the server?
|
There is a function in C# it is called
DateTime.Now it will return you the time in default format
24/07/2015 22:01:00.
You can set a textdraw with function (
DateTime.Now) return value.
Re: SampSharp - Write gamemodes in .NET -
urss - 27.08.2015
Great!
Re: SampSharp - Write gamemodes in .NET -
erorcun - 24.09.2015
Can we use tasks/threads on this?
Re: SampSharp - Write gamemodes in .NET -
ikkentim - 24.09.2015
You can, but you must run methods that calls pawn functions on the main thread. So I'd advice only to use threads/tasks for big calculations, accessing databases or web APIs. To sync with the main thread check the Sync class.
Re: SampSharp - Write gamemodes in .NET -
HardWar - 05.10.2015
Do I need to change GtaPlayer.Max value or is there no problem?
Re: SampSharp - Write gamemodes in .NET -
Buero - 06.10.2015
Player.cs haven't OnPlayerPickUpPickup?
Re: SampSharp - Write gamemodes in .NET -
HardWar - 06.10.2015
Quote:
Originally Posted by Buero
Player.cs haven't OnPlayerPickUpPickup?
|
Yeah, he forgot this.
In TextLabel's constructor if you use -1 for virtualworld it won't appears.
Re: SampSharp - Write gamemodes in .NET -
Buero - 09.10.2015
PHP код:
foreach (Player player in Player.GetAll<Player>())
{
if (player.Test)
{
player.SendClientMessage(Color.Blue, "test");
}
}
Each time the number of messages increases by one..How to fix?
Re: SampSharp - Write gamemodes in .NET -
ikkentim - 10.10.2015
Tested that and it works just fine for me. Do you use 'new Player' or 'Player.Create' anywhere? Because shouldn't use those functions.
Re: SampSharp - Write gamemodes in .NET -
Buero - 11.10.2015
Quote:
Originally Posted by ikkentim
Do you use 'new Player' or 'Player.Create' anywhere?
|
Yes,how to remove or when you fix?
Quote:
Originally Posted by Buero
Player.cs haven't OnPlayerPickUpPickup?
|