A framework for writing game modes for SA-MP in C#. SA-MP is a free Massively Multiplayer Online game mod for the PC version of Rockstar Games Grand Theft Auto: San Andreas.
SampSharp.Core
SAMPSHARP_RUNTIME
environment variableuse_multi_process_mode=1
server settingCallRemoveFunction
native (#363)GameModeBuilder.UseEncodingCodePage
method. The codepage files are available in the codepages repository if you still need these files for some reason.IGameModeClient.NativeObjectProxyFactory
NativeMethodAttribute.ReferenceIndices
which provides the option to invoke a native with input parameters which should be passed by reference.GameModeBuilder.UseEncodingCodePage(string pageName)
IGameModeClient.NativeLoader
OnDestroyComponent
not being called when the component is destroyed, but the entities remains alive (#358)null
button2 text (#376)BasePlayer.CancelEdit
(#362)BasePlayer.SetMapIcon
and BasePlayer.RemoveMapIcon
(#364)ListDialog<T>
(#383, #395)PlayerTextLabel.Text
, PlayerTextLabel.AttachedPlayer
and PlayerTextLabel.AttachedVehicle
not being setBasePlayer.IsNPC
not returning true
when the NPC has not yet connected (#346)Server.GetWeaponName
result for Weapon.ThermalGoggles
(#380)ShowAsync
not to show the dialog (#384, #389)SAMPSHARP_RUNTIME
environment variableListDialog<T>
(#383, #395)use_multi_process_mode=1
server settingCallRemoteFunction
native (#363)GameModeBuilder.UseEncodingCodePage
method. The codepage files are available in the codepages repository if you still need these files for some reason.IGameModeClient.NativeObjectProxyFactory
NativeMethodAttribute.ReferenceIndices
which provides the option to invoke a native with input parameters which should be passed by reference.GameModeBuilder.UseEncodingCodePage(string pageName)
IGameModeClient.NativeLoader
OnDestroyComponent
not being called when the component is destroyed, but the entities remains alive (#358)null
button2 text (#376)BasePlayer.CancelEdit
(#362)BasePlayer.SetMapIcon
and BasePlayer.RemoveMapIcon
(#364)PlayerTextLabel.Text
, PlayerTextLabel.AttachedPlayer
and PlayerTextLabel.AttachedVehicle
not being setBasePlayer.IsNPC
not returning true
when the NPC has not yet connected (#346)Server.GetWeaponName
result for Weapon.ThermalGoggles
(#380)ShowAsync
not to show the dialog (#384, #389)note: I forgot to update the version number printed to the console when you start your game mode, this will still say 0.9.0
PlayerDisconnectReason
enum in favour of DisconnectReason
enum (#330)PlayerDisconnectReason
enum in favour of DisconnectReason
enum (#330)note: no changes were made to the SampSharp plugin for 0.9.1
IGameModeClient.RegisterCallback
overloads which allows the arguments of the callback to be provided as an object[]
to the specified methodIGameModeClient.UnhandledException
eventIfHosted
and IfMultiProcess
methods to GameModeBuilder
GameModeBuilder.RedirectConsoleOutput()
to reenable logging to the server logGameModeBuilder.BuildWith
GameModeBuilder.RedirectConsoleOutput
causing errors during startup in multi-process modeVector3.XY
which returns a Vector2
with the x and y components (#299/#300)Color.Brightness
property (#309)Color.AddGrammaCorrection
, Color.RemoveGammaCorrection
, Color.Grayscale
methods (#309)blendAlpha
option to Color.Lerp
, Color.Darken
and Color.Lighten
(#305/#310)Timer.Run
and Timer.RunOnce
overloads with an int
or double
internal in miliseconds. (#315)BasePlayer.PickUpPickup
event (#319)BasePlayer.CameraTargetPlayerObject
(#320)BasePlayer.SurfingPlayerObject
(#324)Server.GetServerTickRate
(#295)NullableParam
to indicate a BasePlayer
or BaseVehicle
argument is allowed to be null, enum values can be marked as nullable by using nullable enums like VehicleModelType?
(#268/#290)Server.GetWeaponName
(#311)CommandAttribute.IsGroupHelp
, if this value is true, the command will run if the command group is entered by the player without a specified command in the command groupPlayerCancelClickTextDraw
event which is called when player presses ESC while selecting textdraws, PlayerClickTextDraw
is no longer called when ESC is pressed (#304/#321)VehicleModelInfo
to include seat count and a missing entry for ID 611, Utility Trailer (#302)BasePlayer.CameraTargetObject
to BasePlayer.CameraTargetGlobalObject
(#320)BasePlayer.SurfingObject
to BasePlayer.SurfingGlobalObject
(#324)BaseMode.PlayerPickUp
event to have event arguments of type PickUpPickupEventArgs
and changed the sender of event from the pickup to the player (#319)Pickup.PickUp
event to have event arguments of type PickUpPickupEventArgs
(#319)Quaternion
coordinate system not matching SA-MP coordinate systemEdited
and Selected
on GlobalObject
and PlayerObject
not being fired (#303/#306)Color.FromInteger
with ColorFormat.RGB
returning a value with 0 alphaColor
to Vector3
not returning decimal valuesObjectModel
enum because it was too big and might not be completeWeapon.Suicide
definitionColor(byte, byte, byte, float)
constructorBasePlayer
class (#238)VehicleColor
enum and Color.FromVehicleColor
(#270)BaseVehicle
or derived types in command parameters (#276)MapIcon
enum (#206/#288)ObjectModel
enum and PickupType
enum (#291)PlayerDisconnectedException
instead of TaskCancelledException
Dialog.Hide
not working (#212)BaseVehicle.CreateStatic(VehicleModelType, Vector3, float, int, int)
overload not creating static vehicleOnPlayerEnterCheckpoint
callback not being processedIGameModeClient.ServerPath
(#292)VehicleColor
enum and Color.FromVehicleColor
(#270)BaseVehicle
or derived types in command parameters (#276)MapIcon
enum (#206/#288)ObjectModel
enum and `PickupType enum (#291)OnPlayerEnterCheckpoint
callback not being processed