[Plugin] SampSharp - Write gamemodes in .NET
#81

Great work
Reply
#82

Quote:
Originally Posted by kaZax
View Post
How to set encoding to "1251 windows-1251 ANSI Cyrillic; Cyrillic (Windows)" ?
In server.cfg add
Code:
codepage [number]
Where [number] is the codepage identifier you'd like to use

http://sampsharp.timpotze.nl/configuration#encoding
Reply
#83

Quote:
Originally Posted by ikkentim
View Post
In server.cfg add
Code:
codepage [number]
Where [number] is the codepage identifier you'd like to use

http://sampsharp.timpotze.nl/configuration#encoding
Thank you!! Great work.
Reply
#84

Quote:
Originally Posted by kaZax
View Post
Thank you!! Great work.
You can also call Server.SetCodepage within the code.
Reply
#85

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.
Reply
#86

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
Reply
#87

Quote:
Originally Posted by ikkentim
View Post
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!
Reply
#88

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.
Reply
#89

Good job
Reply
#90

How get\set time on the server?
Reply
#91

Quote:
Originally Posted by Buero
View Post
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.
Reply
#92

Great!
Reply
#93

Can we use tasks/threads on this?
Reply
#94

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.
Reply
#95

Do I need to change GtaPlayer.Max value or is there no problem?
Reply
#96

Player.cs haven't OnPlayerPickUpPickup?
Reply
#97

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.
Reply
#98

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?
Reply
#99

Tested that and it works just fine for me. Do you use 'new Player' or 'Player.Create' anywhere? Because shouldn't use those functions.
Reply

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?
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)