SA-MP Forums

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

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 06/05/2014, 08:53 PM   #1
ikkentim's Avatar
Join Date: Jan 2010
Location: Kampen, The Netherlands
Posts: 1,052
Reputation: 205
Default SampSharp - Write gamemodes in .NET


SampSharp is a plugin and library which allows you to write SA-MP gamemodes in C#, VB or any other .NET language. The plugin works both on Linux and Windows. The library contains various classes for every type of resource available in SA-MP (players, vehicles, textdraws, etc). Aside from this wrapper around native functions, the library also contains a good structure to build your gamemode on.

SampSharp provides wrappers for existing plugins (currently only the streamer plugin) and a number of resources for writing wrappers for existing plugins. There are also a small number of example gamemodes available.

Feedback and suggestions are highly appreciated!
If you have any questions, please leave a message below.

The following snippet shows how easy it is to create a command which spawns a vehicle:
PHP Code:
class GameMode BaseMode
override void OnPlayerConnected(BasePlayer playerEventArgs e)

player.SendClientMessage($"Welcome {player.Name}, to a whole new world!");

    public static 
void VehicleCommand(BasePlayer playerVehicleModelType model)
Console.WriteLine($"Spawning a {model} for {player.Name}");
vehicle BaseVehicle.Create(modelplayer.Position + new Vector3(000.5f), player.Rotation.Z);
player.SendClientMessage(Color.GreenYellow, $"You have spawned a {model}!");

Download SampSharp

Current stable version:

Current unstable version:


Source code
Tim Potze

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

Last edited by ikkentim; 21/12/2019 at 04:22 PM.
ikkentim is offline   Reply With Quote

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 08:35 AM
How to write something in a VAR? Ihsan_Cingisiz Help Archive 4 29/05/2010 07:24 PM
How Do You Write This? sidhu123 Everything and Nothing 2 12/09/2009 04:05 AM
Write something in big and to the top TimBuk.Ekh Help Archive 3 18/04/2009 07:19 PM

All times are GMT. The time now is 04:01 AM.

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