SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Reply
 
Thread Tools Display Modes
Old 05/07/2015, 09:10 PM   #111
ikkentim
High-roller
 
ikkentim's Avatar
 
Join Date: Jan 2010
Location: Kampen, The Netherlands
Posts: 1,047
Reputation: 205
Default Re: SampSharp - Write gamemodes in .NET

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
__________________
Greetings,
Tim Potze

Projects
GAMEDEV | Part-time developer working on Parkitect. | Steampage
LSRES | A SA:MP server from the past, and hopefully, back in the future.
SampSharp | Plugin for writing SA:MP gamemodes in C#. | Topic Website Github
SanMap | San Andreas in G00GLE MAPS! | Topic Github Sample
ikkentim is offline   Reply With Quote
Old 06/07/2015, 08:31 AM   #112
kaZax
Big Clucker
 
kaZax's Avatar
 
Join Date: Jan 2013
Location: Kazakhstan
Posts: 63
Reputation: 12
Default Re: SampSharp - Write gamemodes in .NET

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.
__________________
vk.com
kaZax is offline   Reply With Quote
Old 06/07/2015, 10:50 AM   #113
ikkentim
High-roller
 
ikkentim's Avatar
 
Join Date: Jan 2010
Location: Kampen, The Netherlands
Posts: 1,047
Reputation: 205
Default Re: SampSharp - Write gamemodes in .NET

Quote:
Originally Posted by kaZax View Post
Thank you!! Great work.
You can also call Server.SetCodepage within the code.
__________________
Greetings,
Tim Potze

Projects
GAMEDEV | Part-time developer working on Parkitect. | Steampage
LSRES | A SA:MP server from the past, and hopefully, back in the future.
SampSharp | Plugin for writing SA:MP gamemodes in C#. | Topic Website Github
SanMap | San Andreas in G00GLE MAPS! | Topic Github Sample
ikkentim is offline   Reply With Quote
Old 07/07/2015, 12:53 PM   #114
Bravo81
Little Clucker
 
Bravo81's Avatar
 
Join Date: Jul 2011
Location: UK
Posts: 15
Reputation: 1
Default Re: SampSharp - Write gamemodes in .NET

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.
__________________
Founder of Greenlight Games
Fort Carson Roleplay
Bravo81 is offline   Reply With Quote
Old 07/07/2015, 01:01 PM   #115
ikkentim
High-roller
 
ikkentim's Avatar
 
Join Date: Jan 2010
Location: Kampen, The Netherlands
Posts: 1,047
Reputation: 205
Default Re: SampSharp - Write gamemodes in .NET

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
__________________
Greetings,
Tim Potze

Projects
GAMEDEV | Part-time developer working on Parkitect. | Steampage
LSRES | A SA:MP server from the past, and hopefully, back in the future.
SampSharp | Plugin for writing SA:MP gamemodes in C#. | Topic Website Github
SanMap | San Andreas in G00GLE MAPS! | Topic Github Sample
ikkentim is offline   Reply With Quote
Old 07/07/2015, 01:22 PM   #116
Bravo81
Little Clucker
 
Bravo81's Avatar
 
Join Date: Jul 2011
Location: UK
Posts: 15
Reputation: 1
Default Re: SampSharp - Write gamemodes in .NET

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!
__________________
Founder of Greenlight Games
Fort Carson Roleplay
Bravo81 is offline   Reply With Quote
Old 08/07/2015, 03:03 PM   #117
Bravo81
Little Clucker
 
Bravo81's Avatar
 
Join Date: Jul 2011
Location: UK
Posts: 15
Reputation: 1
Default Re: SampSharp - Write gamemodes in .NET

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.
__________________
Founder of Greenlight Games
Fort Carson Roleplay
Bravo81 is offline   Reply With Quote
Old 08/07/2015, 05:22 PM   #118
KingServerIRAN
Banned
 
Join Date: Aug 2013
Location: SarBNR, IRAN!. Reputation:9999. . Posts2: 160754
Posts: 360
Reputation: 45
Default Re: SampSharp - Write gamemodes in .NET

Good job
KingServerIRAN is offline   Reply With Quote
Old 24/07/2015, 07:38 PM   #119
Buero
Little Clucker
 
Join Date: Jul 2015
Posts: 18
Reputation: 0
Default Re: SampSharp - Write gamemodes in .NET

How get\set time on the server?
Buero is offline   Reply With Quote
Old 24/07/2015, 08:01 PM   #120
WopsS
Huge Clucker
 
WopsS's Avatar
 
Join Date: Nov 2011
Posts: 491
Reputation: 70
Default Re: SampSharp - Write gamemodes in .NET

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.
WopsS is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Write on the map hejsan123 Scripting Help 3 23/09/2012 09:35 AM
How to write something in a VAR? Ihsan_Cingisiz Help Archive 4 29/05/2010 08:24 PM
How Do You Write This? sidhu123 Everything and Nothing 2 12/09/2009 05:05 AM
Write something in big and to the top TimBuk.Ekh Help Archive 3 18/04/2009 08:19 PM


All times are GMT. The time now is 02:48 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.