State of 0.5

This commit is contained in:
Oliver Booth 2022-08-27 18:18:04 +01:00
parent 9708d78aa2
commit 6ddaca774c
No known key found for this signature in database
GPG Key ID: 32A00B35503AF634
46 changed files with 1306 additions and 1677 deletions

View File

@ -1,20 +1,99 @@
-=Version 0.2 alpha (LATEST)=- Version 0.5 Alpha (2012-05-23) *Latest*
+ Added 6 events:
> Vehicle.OnStreamIn
> Vehicle.OnStreamOut
> Player.OnStreamIn
> Player.OnStreamOut
> Player.OnUpdate
> Server.OnRconLoginAttempt
+ Added 4 functions:
> Player.PlaySound (int)
(+1 overload: Player.PlaySound (int, Vector3))
> Player.PlayCrimeReport (Player, int)
> Player.SetSkillLevel (WeaponType, int)
> Player.ShowNameTag (Player, bool)
+ Added 13 properties:
> Player.Color
> Player.Clock
> Player.DrunkLevel
> Player.Ping
> Player.Score
> Player.SpecialAction
> Player.Team
> Player.Time
> Player.WantedLevel
> Player.Weapon
> Player.WeaponState
> Player.Weather
> World.NameTags
+ Added 5 enums:
> ComponentSlot
> SpecialAction
> Weapon
> WeaponState
> WeaponType
+ Updated the mscorlib.dll library
(This should fix some big problems. Mainly the problem of the server "not working" or crashing if you use the 'exit' command)
+ Included the mono-2.0.dll library in the server directory
* Changed static Vehicle.GetComponentType to return type SAMP.API.ComponentSlot
(SAMP.API.ComponentSlot is simply an enum containing the slots and their integer values)
* Cleaned up source code a bit
* Fixed an issue where Vector2 and Vector3 weren't part of the API namespace
* Fixed an issue with the hook GetPlayerColor was returning an int instead of unsigned int
(NOTE: Also changed the .NET API from int to uint)
- Removed Player.OnText on the VB.NET example
(I was testing something. Removed for pointlessness)
- Deprecated the World.SendMessageToAll overload which took a 'uint' argument.
(Use SAMP.API.Color instead)
--------------------------------------------------------------------------------------------------------------------------------------------
Version 0.2 Alpha (2012-05-22)
+ Added callback hooks for OnPlayerEditObject and OnPlayerEditAttachedObject for a possiblity to be implemented later + Added callback hooks for OnPlayerEditObject and OnPlayerEditAttachedObject for a possiblity to be implemented later
+ License included in binary download archive + License included in binary download archive
+ Added a Vehicle property for the Player class. Removes and places the player in a vehicle + Added a Vehicle property for the Player class. Removes and places the player in a vehicle
+ Added a Seat property for the Player class. Changes and determines the seat number the player is in.
+ Added a Seat property for the Player class. Changes and determines the seat number the player is in
(NOTE: If the player is not currently in a vehicle, this value is stored and will be used when next placing the player in a vehicle) (NOTE: If the player is not currently in a vehicle, this value is stored and will be used when next placing the player in a vehicle)
+ Added vehicle component functionality + Added vehicle component functionality
+ Added source archive available for download from the forum post + Added source archive available for download from the forum post
* Fixed a bug with the Util class not being part of the API namespace * Fixed a bug with the Util class not being part of the API namespace
* Fixed a bug where the native GetVehicleComponentInSlot wouldn't return an int * Fixed a bug where the native GetVehicleComponentInSlot wouldn't return an int
- Removed console output of the Function not found upon loading - Removed console output of the Function not found upon loading
-=Version 0.1.1 alpha=- --------------------------------------------------------------------------------------------------------------------------------------------
+ Added Example scripts
Version 0.1.1 Alpha (2012-05-18)
+ Added Example scripts to archive
--------------------------------------------------------------------------------------------------------------------------------------------
Version 0.1 Alpha (2012-05-18)
-=Version 0.1 alpha=-
+ Majority of callbacks + Majority of callbacks
+ All a_samp.inc 0.3e functions
(every function from a_objects, and various functions from other files are to be implemented soon) + All a_samp.inc 0.3e functions ported to .NET
+ XML documentation (NOTE: Other functions from other files will be added progressively soon)
+ XML documentation for .NET usability

View File

@ -1,7 +1,7 @@
 
namespace SAMP.API namespace SAMP.API
{ {
public enum ComponentSlots public enum ComponentSlot : int
{ {
Spoiler = 0, Spoiler = 0,
Hood = 1, Hood = 1,

View File

@ -1,7 +1,7 @@
 
namespace SAMP.API namespace SAMP.API
{ {
public enum Keys public enum Keys : int
{ {
Action = 1, Action = 1,
Crouch = 2, Crouch = 2,

View File

@ -0,0 +1,28 @@

namespace SAMP.API
{
public enum SpecialAction : int
{
None = 0,
UseJetpack = 2,
Dance1 = 5,
Dance2 = 6,
Dance3 = 7,
Dance4 = 8,
HandsUp = 10,
UseCellPhone = 11,
Sitting = 12,
StopUseCellPhone = 13,
Duck = 1, // Can't be set
EnterVehicle = 3, // Can't be set
ExitVehicle = 4, // Can't be set
Beer = 20,
Ciggy = 21,
Wine = 22,
Sprunk = 23,
Pissing = 68,
Cuffed = 24
};
};

View File

@ -0,0 +1,50 @@

namespace SAMP.API
{
public enum Weapon : int
{
Fist = 0,
BrassKnucles,
GolfClub,
Nightstick,
Knife,
BaseballBat,
Shovel,
PoolCue,
Katana,
Chainsaw,
DoubleEndedDildo,
Dildo,
Vibrator,
SilverVibrator,
Flowers,
Cane,
Grenade,
TearGas,
MolotovCocktail,
NineMM,
SilencedNineMM,
DesertEagle,
Shotgun,
SawnoffShotgun,
CombatShotgun,
MicroSMG,
MP5,
AK47,
M4,
Tec9,
CountryRifle,
RPG,
HSRocket,
FlameThrower,
Minigun,
SatchelCharge,
Detonator,
Spraycan,
FireExtinguisher,
Camera,
NightVisionGoggles,
ThermalGoggles,
Parachute
};
};

View File

@ -0,0 +1,12 @@

namespace SAMP.API
{
public enum WeaponState : int
{
Unknown = -1,
NoBullets = 0,
LastBullet = 1,
MoreBullets = 2,
Reloading = 3
};
};

View File

@ -0,0 +1,18 @@

namespace SAMP.API
{
public enum WeaponType : int
{
Pistol = 0,
PistolSilenced,
DesertEagle,
Shotgun,
SawnoffShotgun,
SPAS12Shotgun,
MicroUzi,
MP5,
AK47,
M4,
SniperRifle
};
};

View File

@ -1,77 +0,0 @@
K 25
svn:wc:ra_dav:version-url
V 61
/svn/!svn/ver/30/branches/0.2/sampdotnet/API/EventData/Player
END
PlayerDeathEventArgs.cs
K 25
svn:wc:ra_dav:version-url
V 85
/svn/!svn/ver/30/branches/0.2/sampdotnet/API/EventData/Player/PlayerDeathEventArgs.cs
END
PlayerStateChangeEventArgs.cs
K 25
svn:wc:ra_dav:version-url
V 91
/svn/!svn/ver/30/branches/0.2/sampdotnet/API/EventData/Player/PlayerStateChangeEventArgs.cs
END
PlayerPickUpPickupEventArgs.cs
K 25
svn:wc:ra_dav:version-url
V 92
/svn/!svn/ver/30/branches/0.2/sampdotnet/API/EventData/Player/PlayerPickUpPickupEventArgs.cs
END
PlayerSpawnEventArgs.cs
K 25
svn:wc:ra_dav:version-url
V 85
/svn/!svn/ver/30/branches/0.2/sampdotnet/API/EventData/Player/PlayerSpawnEventArgs.cs
END
PlayerExitVehicleEventArgs.cs
K 25
svn:wc:ra_dav:version-url
V 91
/svn/!svn/ver/30/branches/0.2/sampdotnet/API/EventData/Player/PlayerExitVehicleEventArgs.cs
END
PlayerDisconnectEventArgs.cs
K 25
svn:wc:ra_dav:version-url
V 90
/svn/!svn/ver/30/branches/0.2/sampdotnet/API/EventData/Player/PlayerDisconnectEventArgs.cs
END
PlayerEnterVehicleEventArgs.cs
K 25
svn:wc:ra_dav:version-url
V 92
/svn/!svn/ver/30/branches/0.2/sampdotnet/API/EventData/Player/PlayerEnterVehicleEventArgs.cs
END
PlayerRequestClassEventArgs.cs
K 25
svn:wc:ra_dav:version-url
V 92
/svn/!svn/ver/30/branches/0.2/sampdotnet/API/EventData/Player/PlayerRequestClassEventArgs.cs
END
PlayerEnterExitModShopEventArgs.cs
K 25
svn:wc:ra_dav:version-url
V 96
/svn/!svn/ver/30/branches/0.2/sampdotnet/API/EventData/Player/PlayerEnterExitModShopEventArgs.cs
END
PlayerCommandTextEventArgs.cs
K 25
svn:wc:ra_dav:version-url
V 91
/svn/!svn/ver/30/branches/0.2/sampdotnet/API/EventData/Player/PlayerCommandTextEventArgs.cs
END
PlayerClickMapEventArgs.cs
K 25
svn:wc:ra_dav:version-url
V 88
/svn/!svn/ver/30/branches/0.2/sampdotnet/API/EventData/Player/PlayerClickMapEventArgs.cs
END
PlayerTextEventArgs.cs
K 25
svn:wc:ra_dav:version-url
V 84
/svn/!svn/ver/30/branches/0.2/sampdotnet/API/EventData/Player/PlayerTextEventArgs.cs
END

View File

@ -1,436 +0,0 @@
10
dir
33
http://samp-dot-net.googlecode.com/svn/branches/0.2/sampdotnet/API/EventData/Player
http://samp-dot-net.googlecode.com/svn
2012-07-07T17:04:38.829891Z
30
yasahiro93
a955bdad-90f8-2b12-97e1-62c735084bea
PlayerCommandTextEventArgs.cs
file
2016-02-16T17:04:51.056990Z
c56d97029dbb767e20decc7e486d486d
2012-07-07T17:04:38.829891Z
30
yasahiro93
1259
PlayerClickMapEventArgs.cs
file
2016-02-16T17:04:51.056990Z
2975c5558913833994f5a2a17405be38
2012-07-07T17:04:38.829891Z
30
yasahiro93
847
PlayerTextEventArgs.cs
file
2016-02-16T17:04:51.056990Z
966641b9b066b6b40ce77592b6eea644
2012-07-07T17:04:38.829891Z
30
yasahiro93
1199
PlayerDeathEventArgs.cs
file
2016-02-16T17:04:51.056990Z
038ab995902bc34d0a7366be45e664a9
2012-07-07T17:04:38.829891Z
30
yasahiro93
1212
PlayerStateChangeEventArgs.cs
file
2016-02-16T17:04:51.056990Z
35ce0c40421ea8709bd68fca0e628481
2012-07-07T17:04:38.829891Z
30
yasahiro93
1178
PlayerPickUpPickupEventArgs.cs
file
2016-02-16T17:04:51.056990Z
4d984d32c5d5daa7a161c6da5da99f36
2012-07-07T17:04:38.829891Z
30
yasahiro93
800
PlayerSpawnEventArgs.cs
file
2016-02-16T17:04:51.056990Z
b646d31a7b3e162695e853ca7115a44b
2012-07-07T17:04:38.829891Z
30
yasahiro93
544
PlayerExitVehicleEventArgs.cs
file
2016-02-16T17:04:51.056990Z
61baf0f104f2289e1c873f319c431c27
2012-07-07T17:04:38.829891Z
30
yasahiro93
835
PlayerDisconnectEventArgs.cs
file
2016-02-16T17:04:51.056990Z
f98b0a034d15b38946714cc7bdba8d17
2012-07-07T17:04:38.829891Z
30
yasahiro93
830
PlayerEnterVehicleEventArgs.cs
file
2016-02-16T17:04:51.056990Z
55a561c55381bf3e60fb084680b99330
2012-07-07T17:04:38.829891Z
30
yasahiro93
1465
PlayerRequestClassEventArgs.cs
file
2016-02-16T17:04:51.056990Z
c31691ed428cbe7440393314ace03b4a
2012-07-07T17:04:38.829891Z
30
yasahiro93
1103
PlayerEnterExitModShopEventArgs.cs
file
2016-02-16T17:04:51.056990Z
6dc5f7e9175bb03893aa85364cec87fe
2012-07-07T17:04:38.829891Z
30
yasahiro93
1356

View File

@ -1,38 +0,0 @@
using System;
namespace SAMP.API.EventData
{
public class PlayerClickMapEventArgs : EventArgs
{
#region Class Variables
private Vector3 _qPosition;
#endregion
#region Constructor
/// <summary>
/// Creates a new PlayerClickMapEventArgs object.
/// </summary>
/// <param name="position">The coordinates of where the player clicked.</param>
public PlayerClickMapEventArgs(Vector3 position)
{
_qPosition = position;
}
#endregion
#region Accessors & Mutators
/// <summary>
/// The coordinates of where the player clicked
/// </summary>
public Vector3 Position
{
get { return _qPosition; }
}
#endregion
};
};

View File

@ -1,49 +0,0 @@
using System;
namespace SAMP.API.EventData
{
public class PlayerCommandTextEventArgs : EventArgs
{
#region Class Variables
private string _strMessage;
private bool _bHandled;
#endregion
#region Constructor
/// <summary>
/// Creates a new PlayerCommandTextEventArgs object.
/// </summary>
/// <param name="message">The chat message associated with this PlayerCommandTextEventArgs.</param>
public PlayerCommandTextEventArgs(string message)
{
_strMessage = message;
_bHandled = false;
}
#endregion
#region Accessors & Mutators
/// <summary>
/// Gets the chat message associated with this event.
/// </summary>
public string Message
{
get { return _strMessage; }
}
/// <summary>
/// Gets or sets whether the event was handled. Returning TRUE will prevent the 'SERVER: Unknown Command' message being shown.
/// </summary>
public bool Handled
{
get { return _bHandled; }
set { _bHandled = value; }
}
#endregion
};
};

View File

@ -1,49 +0,0 @@
using System;
namespace SAMP.API.EventData
{
public class PlayerDeathEventArgs : EventArgs
{
#region Class Variables
private Player _qKiller;
private int _nReason;
#endregion
#region Constructor
/// <summary>
/// Creates a new PlayerDeathEventArgs object.
/// </summary>
/// <param name="killer">The player who killed the player who died. NULL if none.</param>
/// <param name="reason">The ID of the reason for the player's death.</param>
public PlayerDeathEventArgs(Player killer, int reason)
{
_qKiller = killer;
_nReason = reason;
}
#endregion
#region Accessors & Mutators
/// <summary>
/// Gets the player who killed the player who died. NULL if none.
/// </summary>
public Player Killer
{
get { return _qKiller; }
}
/// <summary>
/// Gets the ID of the reason for the player's death.
/// </summary>
public int Reason
{
get { return _nReason; }
}
#endregion
};
};

View File

@ -1,38 +0,0 @@
using System;
namespace SAMP.API.EventData
{
public class PlayerDisconnectEventArgs : EventArgs
{
#region Class Variables
private DisconnectReason _qReason;
#endregion
#region Constructor
/// <summary>
/// Creates a new PlayerDisconnectEventArgs object.
/// </summary>
/// <param name="reason">The reason for the disconnect.</param>
public PlayerDisconnectEventArgs(DisconnectReason reason)
{
_qReason = reason;
}
#endregion
#region Accessors & Mutators
/// <summary>
/// The reason they left.
/// </summary>
public DisconnectReason Reason
{
get { return _qReason; }
}
#endregion
};
};

View File

@ -1,49 +0,0 @@
using System;
namespace SAMP.API.EventData
{
public class PlayerEnterExitModShopEventArgs : EventArgs
{
#region Class Variables
private bool _bEntering;
private int _nInterior;
#endregion
#region Constructor
/// <summary>
/// Creates a new PlayerEnterExitModShopEventArgs object.
/// </summary>
/// <param name="entering">TRUE if the player is entering, FALSE otherwise.</param>
/// <param name="interiodid">The interior ID of the modshop that the player is entering (or 0 if exiting).</param>
public PlayerEnterExitModShopEventArgs(bool entering, int interiodid)
{
_bEntering = entering;
_nInterior = interiodid;
}
#endregion
#region Accessors & Mutators
/// <summary>
/// Gets whether or not the player is Entering a mod shop.
/// </summary>
public bool Entering
{
get { return _bEntering; }
}
/// <summary>
/// Gets the interior ID of the modshop that the player is entering. This property will be 0 if the player is exiting.
/// </summary>
public int Interior
{
get { return _nInterior; }
}
#endregion
};
};

View File

@ -1,57 +0,0 @@
using System;
namespace SAMP.API.EventData
{
public class PlayerEnterVehicleEventArgs : EventArgs
{
#region Class Variables
private Vehicle _qVehicle;
private bool _bIsPassenger;
#endregion
#region Constructor
/// <summary>
/// Creates a new PlayerEnterVehicleEventArgs object.
/// </summary>
/// <param name="vehicle">The vehicle the player is attempting to enter.</param>
/// <param name="passenger">True = Driver, False = Passenger.</param>
public PlayerEnterVehicleEventArgs(Vehicle vehicle, bool passenger)
{
_qVehicle = vehicle;
_bIsPassenger = passenger;
}
#endregion
#region Accessors & Mutators
/// <summary>
/// Gets whether or not the player was entering as a driver.
/// </summary>
public bool Driver
{
get { return !_bIsPassenger; }
}
/// <summary>
/// Gets whether or not the player was entering as a passenger.
/// </summary>
public bool Passenger
{
get { return _bIsPassenger; }
}
/// <summary>
/// Gets the vehicle the player is attempting to enter.
/// </summary>
public Vehicle Vehicle
{
get { return _qVehicle; }
}
#endregion
};
};

View File

@ -1,38 +0,0 @@
using System;
namespace SAMP.API.EventData
{
public class PlayerExitVehicleEventArgs : EventArgs
{
#region Class Variables
private Vehicle _qVehicle;
#endregion
#region Constructor
/// <summary>
/// Creates a new PlayerExitVehicleEventArgs object.
/// </summary>
/// <param name="vehicle">The vehicle the player is exiting.</param>
public PlayerExitVehicleEventArgs(Vehicle vehicle)
{
_qVehicle = vehicle;
}
#endregion
#region Accessors & Mutators
/// <summary>
/// Gets the vehicle the player is exiting.
/// </summary>
public Vehicle Vehicle
{
get { return _qVehicle; }
}
#endregion
};
};

View File

@ -1,38 +0,0 @@
using System;
namespace SAMP.API.EventData
{
public class PlayerPickUpPickupEventArgs : EventArgs
{
#region Class Variables
private int _nPickupId;
#endregion
#region Constructor
/// <summary>
/// Creates a new PlayerPickUpPickupEventArgs object.
/// </summary>
/// <param name="position">The ID of the pickup.</param>
public PlayerPickUpPickupEventArgs(int pickupid)
{
_nPickupId = pickupid;
}
#endregion
#region Accessors & Mutators
/// <summary>
/// The ID of the pickup.
/// </summary>
public int PickUp
{
get { return _nPickupId; }
}
#endregion
};
};

View File

@ -1,48 +0,0 @@
using System;
namespace SAMP.API.EventData
{
public class PlayerRequestClassEventArgs : EventArgs
{
#region Class Variables
private int _nClassId;
private bool _bCancel;
#endregion
#region Constructor
/// <summary>
/// Creates a new OnPlayerDisconnectEventArgs object.
/// </summary>
/// <param name="reason">The reason for the disconnect.</param>
public PlayerRequestClassEventArgs(int classid)
{
_nClassId = classid;
}
#endregion
#region Accessors & Mutators
/// <summary>
/// The ID of the current class being viewed.
/// </summary>
public int Class
{
get { return _nClassId; }
}
/// <summary>
/// Gets or sets whether the event should cancel (class denied.)
/// </summary>
public bool Cancel
{
get { return _bCancel; }
set { _bCancel = value; }
}
#endregion
};
};

View File

@ -1,48 +0,0 @@
using System;
namespace SAMP.API.EventData
{
public class PlayerStateChangeEventArgs : EventArgs
{
#region Class Variables
private PlayerState[] state = { PlayerState.None, PlayerState.None };
#endregion
#region Constructor
/// <summary>
/// Creates a new PlayerStateChangeEventArgs object.
/// </summary>
/// <param name="newState">The player's new state.</param>
/// <param name="oldState">The player's old state.</param>
public PlayerStateChangeEventArgs(PlayerState newState, PlayerState oldState)
{
state[0] = newState;
state[1] = oldState;
}
#endregion
#region Accessors & Mutators
/// <summary>
/// Gets the player's new state.
/// </summary>
public PlayerState NewState
{
get { return state[0]; }
}
/// <summary>
/// Gets the player's old state.
/// </summary>
public PlayerState OldState
{
get { return state[1]; }
}
#endregion
};
};

View File

@ -1,50 +0,0 @@
using System;
namespace SAMP.API.EventData
{
public class PlayerTextEventArgs : EventArgs
{
#region Class Variables
private string _strMessage;
private bool _bCancel;
internal bool _bSet = false;
#endregion
#region Constructor
/// <summary>
/// Creates a new PlayerTextEventArgs object.
/// </summary>
/// <param name="message">The chat message associated with this PlayerTextEventArgs.</param>
public PlayerTextEventArgs(string message)
{
_strMessage = message;
_bCancel = false;
}
#endregion
#region Accessors & Mutators
/// <summary>
/// Gets the chat message.
/// </summary>
public string Message
{
get { return _strMessage; }
}
/// <summary>
/// Gets or sets whether the event should cancel (chat message displayed).
/// </summary>
public bool Cancel
{
get { return _bCancel; }
set { _bCancel = value; _bSet = true; }
}
#endregion
};
};

View File

@ -0,0 +1,38 @@
using System;
namespace SAMP.API.EventData
{
public class PlayerStreamEventArgs : EventArgs
{
#region Class Variables
private Player _qPlayer;
#endregion
#region Constructor
/// <summary>
/// Creates a new PlayerStreamEventArgs object.
/// </summary>
/// <param name="forplayer">The player who the player streamed in or out for.</param>
public PlayerStreamEventArgs(Player forplayer)
{
_qPlayer = forplayer;
}
#endregion
#region Accessors & Mutators
/// <summary>
/// Gets the player who the player streamed in or out for.
/// </summary>
public Player ForPlayer
{
get { return _qPlayer; }
}
#endregion
};
};

View File

@ -2,7 +2,7 @@
namespace SAMP.API.EventData namespace SAMP.API.EventData
{ {
public class PlayerSpawnEventArgs : EventArgs public class PlayerUpdateEventArgs : EventArgs
{ {
#region Class Variables #region Class Variables
@ -13,7 +13,7 @@ namespace SAMP.API.EventData
#region Accessors & Mutators #region Accessors & Mutators
/// <summary> /// <summary>
/// Gets or sets whether the event should be cancelled (send back to class selection). /// Gets or sets whether the event should cancel.
/// </summary> /// </summary>
public bool Cancel public bool Cancel
{ {

View File

@ -0,0 +1,61 @@
using System;
namespace SAMP.API.EventData
{
public class RconLoginAttemptEventArgs : EventArgs
{
#region Class Variables
private string
_strIp, // strip. lol.
_strPassword;
private bool _bSuccess;
#endregion
#region Constructor
/// <summary>
/// Creates a new RconLoginAttemptEventArgs object.
/// </summary>
/// <param name="ip">The IP of the player that tried to login to RCON.</param>
/// <param name="password">The password used to login with.</param>
/// <param name="success">False if the password was incorrect or True if it was correct.</param>
public RconLoginAttemptEventArgs(string ip, string password, bool success)
{
_strIp = ip;
_strPassword = password;
_bSuccess = success;
}
#endregion
#region Accessors & Mutators
/// <summary>
/// Gets the IP of the player that tried to login to RCON.
/// </summary>
public string IP
{
get { return _strIp; }
}
/// <summary>
/// Gets the password used to login with.
/// </summary>
public string Password
{
get { return _strPassword; }
}
/// <summary>
/// Gets whether or not the password was correct.
/// </summary>
public bool Success
{
get { return _bSuccess; }
}
#endregion
};
};

View File

@ -1,11 +0,0 @@
K 25
svn:wc:ra_dav:version-url
V 62
/svn/!svn/ver/30/branches/0.2/sampdotnet/API/EventData/Vehicle
END
VehicleDeathEventArgs.cs
K 25
svn:wc:ra_dav:version-url
V 87
/svn/!svn/ver/30/branches/0.2/sampdotnet/API/EventData/Vehicle/VehicleDeathEventArgs.cs
END

View File

@ -1,62 +0,0 @@
10
dir
33
http://samp-dot-net.googlecode.com/svn/branches/0.2/sampdotnet/API/EventData/Vehicle
http://samp-dot-net.googlecode.com/svn
2012-07-07T17:04:38.829891Z
30
yasahiro93
a955bdad-90f8-2b12-97e1-62c735084bea
VehicleDeathEventArgs.cs
file
2016-02-16T17:04:51.032999Z
8acf669b8e88ba1897b39a4ab18be97c
2012-07-07T17:04:38.829891Z
30
yasahiro93
816

View File

@ -1,38 +0,0 @@
using System;
namespace SAMP.API.EventData
{
public class VehicleDeathEventArgs : EventArgs
{
#region Class Variables
private Player _qKiller;
#endregion
#region Constructor
/// <summary>
/// Creates a new VehicleDeathEventArgs object.
/// </summary>
/// <param name="killer">The player who destroyed the vehicle.</param>
public VehicleDeathEventArgs(Player killer)
{
_qKiller = killer;
}
#endregion
#region Accessors & Mutators
/// <summary>
/// Gets the player who destroyed the vehicle.
/// </summary>
public Player Killer
{
get { return _qKiller; }
}
#endregion
};
};

View File

@ -0,0 +1,38 @@
using System;
namespace SAMP.API.EventData
{
public class VehicleStreamEventArgs : EventArgs
{
#region Class Variables
private Player _qPlayer;
#endregion
#region Constructor
/// <summary>
/// Creates a new VehicleStreamEventArgs object.
/// </summary>
/// <param name="forplayer">The player who the vehicle streamed in or out for.</param>
public VehicleStreamEventArgs(Player forplayer)
{
_qPlayer = forplayer;
}
#endregion
#region Accessors & Mutators
/// <summary>
/// Gets the player who the vehicle streamed in or out for.
/// </summary>
public Player ForPlayer
{
get { return _qPlayer; }
}
#endregion
};
};

View File

@ -93,7 +93,7 @@ namespace SAMP.API
Core.Natives.UsePlayerPedAnims(); Core.Natives.UsePlayerPedAnims();
} }
else else
throw Core.Exceptions.GameModeInitialized; throw new Exception("The GmaeMode has already been initialized.");
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -60,6 +60,28 @@ namespace SAMP.API
catch { } catch { }
} }
#endregion #endregion
#region OnStreamIn
public delegate void OnStreamInHandler(object sender, EventData.VehicleStreamEventArgs e);
public static event OnStreamInHandler OnStreamIn;
internal void _OnStreamIn(int forplayerid)
{
EventData.VehicleStreamEventArgs args = new EventData.VehicleStreamEventArgs(Player.Get(forplayerid));
try { OnStreamIn(this, args); }
catch { }
}
#endregion
#region OnStreamOut
public delegate void OnStreamOutHandler(object sender, EventData.VehicleStreamEventArgs e);
public static event OnStreamOutHandler OnStreamOut;
internal void _OnStreamOut(int forplayerid)
{
EventData.VehicleStreamEventArgs args = new EventData.VehicleStreamEventArgs(Player.Get(forplayerid));
try { OnStreamOut(this, args); }
catch { }
}
#endregion
#endregion #endregion
@ -272,10 +294,10 @@ namespace SAMP.API
/// Determines what type of component (the slot) of a component id Find out what type of component a certain ID is. /// Determines what type of component (the slot) of a component id Find out what type of component a certain ID is.
/// </summary> /// </summary>
/// <param name="component">The component ID to check.</param> /// <param name="component">The component ID to check.</param>
/// <returns>Returns the component slot ID of the specified component.</returns> /// <returns>Returns the component slot of the specified component.</returns>
public static int GetComponentType(int component) public static ComponentSlot GetComponentType(int component)
{ {
return Core.Natives.GetVehicleComponentType(component); return (ComponentSlot)Core.Natives.GetVehicleComponentType(component);
} }
/// <summary> /// <summary>

View File

@ -9,6 +9,7 @@ namespace SAMP.API
private static bool _bTirePopping = true; private static bool _bTirePopping = true;
private static bool _bInteriorWeapons = true; private static bool _bInteriorWeapons = true;
private static bool _bInteriorEnterExits = true; private static bool _bInteriorEnterExits = true;
private static bool _bNameTags = true;
private static float _fNameTagDrawDistance = 70f; private static float _fNameTagDrawDistance = 70f;
private static float _fGlobalChatRadius = 0.0f; private static float _fGlobalChatRadius = 0.0f;
private static float _fGravity = 0.008f; private static float _fGravity = 0.008f;
@ -67,6 +68,15 @@ namespace SAMP.API
set { _fPlayerMarkerRadius = value; Core.Natives.LimitPlayerMarkerRadius(value); } set { _fPlayerMarkerRadius = value; Core.Natives.LimitPlayerMarkerRadius(value); }
} }
/// <summary>
/// Gets or sets whether name tags, health bars and armor bars are visible above players.
/// </summary>
public static bool NameTags
{
get { return _bNameTags; }
set { _bNameTags = value; Core.Natives.ShowNameTags(value ? 1 : 0); }
}
/// <summary> /// <summary>
/// Gets or sets the world time to a specific hour. /// Gets or sets the world time to a specific hour.
/// </summary> /// </summary>
@ -143,7 +153,7 @@ namespace SAMP.API
{ {
int ret = Core.Natives.CreatePickup(model, type, position.X, position.Y, position.Z, virtualworld); int ret = Core.Natives.CreatePickup(model, type, position.X, position.Y, position.Z, virtualworld);
if(ret == -1) if(ret == -1)
throw Core.Exceptions.PickupMaxLimit; throw new Exception("The maximum number of pickups has been exceeded.");
return ret; return ret;
} }
@ -193,16 +203,14 @@ namespace SAMP.API
SendMessageToAll(message, Color.White); SendMessageToAll(message, Color.White);
} }
[Obsolete("Use SAMP.API.World.SendMessageToAll(string, SAMP.API.Color) instead.", true)]
/// <summary> /// <summary>
/// Sends a message to all players connected, specifying both the message the players will receive as the colour in which the message should show up. This is a multiple-user equivalent of Player.SendMessage(). /// Sends a message to all players connected, specifying both the message the players will receive as the colour in which the message should show up. This is a multiple-user equivalent of Player.SendMessage().
/// </summary> /// </summary>
/// <param name="message">The string of text you would like to send.</param> /// <param name="message">The string of text you would like to send.</param>
/// <param name="color">The color it should be in. This overload supports HEX notation.</param> /// <param name="color">The color it should be in. This overload supports HEX notation.</param>
/// <seealso cref="Player.SendMessage"/> /// <seealso cref="Player.SendMessage"/>
public static void SendMessageToAll(string message, uint color) public static void SendMessageToAll(string message, uint color) { }
{
SendMessageToAll(message, Color.FromArgb(color));
}
/// <summary> /// <summary>
/// Sends a message to all players connected, specifying both the message the players will receive as the colour in which the message should show up. This is a multiple-user equivalent of Player.SendMessage(). /// Sends a message to all players connected, specifying both the message the players will receive as the colour in which the message should show up. This is a multiple-user equivalent of Player.SendMessage().

View File

@ -14,7 +14,7 @@ namespace SAMP.API
#region Events, Delegates and Method Calls #region Events, Delegates and Method Calls
#region OnRconCommand #region OnRconCommand
public delegate void OnRconCommandHandler(object sender, System.EventArgs e); public delegate void OnRconCommandHandler(object sender, EventData.RconCommandEventArgs e);
public static event OnRconCommandHandler OnRconCommand; public static event OnRconCommandHandler OnRconCommand;
internal static int _OnRconCommand(string cmd) internal static int _OnRconCommand(string cmd)
@ -25,6 +25,17 @@ namespace SAMP.API
return args.Handled ? 1 : 0; return args.Handled ? 1 : 0;
} }
#endregion #endregion
#region OnRconLoginAttempt
public delegate void OnRconLoginAttemptHandler(object sender, EventData.RconLoginAttemptEventArgs e);
public static event OnRconLoginAttemptHandler OnRconLoginAttempt;
internal static void _OnRconLoginAttempt(string ip, string password, int success)
{
EventData.RconLoginAttemptEventArgs args = new EventData.RconLoginAttemptEventArgs(ip, password, success == 1);
try { OnRconLoginAttempt(null, args); }
catch { }
}
#endregion
#endregion #endregion

View File

@ -1,6 +1,6 @@
using System; using System;
namespace SAMP namespace SAMP.API
{ {
public struct Vector2 public struct Vector2
{ {

View File

@ -1,6 +1,6 @@
using System; using System;
namespace SAMP namespace SAMP.API
{ {
public struct Vector3 public struct Vector3
{ {

View File

@ -14,55 +14,55 @@
<FileName>API\Objects\GangZone.cs</FileName> <FileName>API\Objects\GangZone.cs</FileName>
</TypeIdentifier> </TypeIdentifier>
</Class> </Class>
<Class Name="SAMP.API.Menu" Collapsed="true" BaseTypeListCollapsed="true"> <Class Name="SAMP.API.Menu" Collapsed="true">
<Position X="2.25" Y="1.5" Width="1.5" /> <Position X="0.5" Y="1.5" Width="1.5" />
<TypeIdentifier> <TypeIdentifier>
<HashCode>BAAgAAAEAAAAgABAAAgAAAAIgABAAAAAAAAgAAAAAAA=</HashCode> <HashCode>BAAgAAAEAAAAgABAAAgAAAAIgABAAAAAAAAgAAAAAAA=</HashCode>
<FileName>API\Objects\Menu.cs</FileName> <FileName>API\Objects\Menu.cs</FileName>
</TypeIdentifier> </TypeIdentifier>
</Class> </Class>
<Class Name="SAMP.API.Player" Collapsed="true" BaseTypeListCollapsed="true"> <Class Name="SAMP.API.Player" Collapsed="true" BaseTypeListCollapsed="true">
<Position X="5.75" Y="1.5" Width="1.5" /> <Position X="4" Y="1.5" Width="1.5" />
<TypeIdentifier> <TypeIdentifier>
<HashCode>I0ASSBAQAEhCsFhgAqmEAKeACBAcgEBIBMBgpQYHpAA=</HashCode> <HashCode>I0ASSBAIAEhCuFhgKumERK+EHBMcgUhaFMDgpQcPpwA=</HashCode>
<FileName>API\Objects\Player.cs</FileName> <FileName>API\Objects\Player.cs</FileName>
</TypeIdentifier> </TypeIdentifier>
<Lollipop Position="0.2" Collapsed="true" /> <Lollipop Position="0.2" Collapsed="true" />
</Class> </Class>
<Class Name="SAMP.API.PlayerCamera" Collapsed="true" BaseTypeListCollapsed="true"> <Class Name="SAMP.API.PlayerCamera" Collapsed="true" BaseTypeListCollapsed="true">
<Position X="7.5" Y="1.5" Width="1.5" /> <Position X="5.75" Y="1.5" Width="1.5" />
<TypeIdentifier> <TypeIdentifier>
<HashCode>AAAAAAQAAIAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAI=</HashCode> <HashCode>AAAAAAQAAIAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAI=</HashCode>
<FileName>API\Objects\PlayerCamera.cs</FileName> <FileName>API\Objects\PlayerCamera.cs</FileName>
</TypeIdentifier> </TypeIdentifier>
<Lollipop Position="0.2" Collapsed="true" /> <Lollipop Position="0.2" Collapsed="true" />
</Class> </Class>
<Class Name="SAMP.API.Text3D" Collapsed="true" BaseTypeListCollapsed="true"> <Class Name="SAMP.API.Text3D" Collapsed="true">
<Position X="7.5" Y="3.5" Width="1.5" /> <Position X="7.5" Y="4.5" Width="1.5" />
<TypeIdentifier> <TypeIdentifier>
<HashCode>AAACAAAAAAAEgAAAAhAAAAAIAAEAAEBAAAAAiAAAAAA=</HashCode> <HashCode>AAACAAAAAAAEgAAAAhAAAAAIAAEAAEBAAAAAiAAAAAA=</HashCode>
<FileName>API\Objects\Text3D.cs</FileName> <FileName>API\Objects\Text3D.cs</FileName>
</TypeIdentifier> </TypeIdentifier>
</Class> </Class>
<Class Name="SAMP.API.TextDraw" Collapsed="true" BaseTypeListCollapsed="true"> <Class Name="SAMP.API.TextDraw" Collapsed="true">
<Position X="0.5" Y="4.5" Width="1.5" /> <Position X="9.25" Y="4.5" Width="1.5" />
<TypeIdentifier> <TypeIdentifier>
<HashCode>AAACAQgABBAAgABAEyCAAKhIUAFEAABAoAgACQADAAA=</HashCode> <HashCode>AAACAQgABBAAgABAEyCAAKhIUAFEAABAoAgACQADAAA=</HashCode>
<FileName>API\Objects\TextDraw.cs</FileName> <FileName>API\Objects\TextDraw.cs</FileName>
</TypeIdentifier> </TypeIdentifier>
</Class> </Class>
<Class Name="SAMP.API.Vehicle" Collapsed="true" BaseTypeListCollapsed="true"> <Class Name="SAMP.API.Vehicle" Collapsed="true" BaseTypeListCollapsed="true">
<Position X="4" Y="4.5" Width="1.5" /> <Position X="2.25" Y="5.5" Width="1.5" />
<TypeIdentifier> <TypeIdentifier>
<HashCode>AAAADAAAMRAAoABiAAECAKAIAABAAABAgEgABAACAgA=</HashCode> <HashCode>AAAADAAAMRAIqAByAAACBKANAABAAABEgEgABAAKAgA=</HashCode>
<FileName>API\Objects\Vehicle.cs</FileName> <FileName>API\Objects\Vehicle.cs</FileName>
</TypeIdentifier> </TypeIdentifier>
<Lollipop Position="0.2" Collapsed="true" /> <Lollipop Position="0.2" Collapsed="true" />
</Class> </Class>
<Class Name="SAMP.API.World" Collapsed="true"> <Class Name="SAMP.API.World" Collapsed="true">
<Position X="5.75" Y="4.5" Width="1.5" /> <Position X="7.5" Y="5.5" Width="1.5" />
<TypeIdentifier> <TypeIdentifier>
<HashCode>AAAAAAGAAIAIAIAAAAAAAAAEACjEAgCSoAAIAAAgAwQ=</HashCode> <HashCode>AAAAAAGAAIAIAIAAAAEAAAAEACjEAgCSoAAIAAAgCwQ=</HashCode>
<FileName>API\Objects\World.cs</FileName> <FileName>API\Objects\World.cs</FileName>
</TypeIdentifier> </TypeIdentifier>
</Class> </Class>
@ -74,12 +74,26 @@
</TypeIdentifier> </TypeIdentifier>
</Class> </Class>
<Class Name="SAMP.API.Server" Collapsed="true"> <Class Name="SAMP.API.Server" Collapsed="true">
<Position X="4" Y="3.5" Width="1.5" /> <Position X="4" Y="4.5" Width="1.5" />
<TypeIdentifier> <TypeIdentifier>
<HashCode>AAAQAAACAACAACAAABAAAAAAAAAAAAAAAAAAAAAACAA=</HashCode> <HashCode>AAAQAEACAACAACAAABAAAAAAAAAAAAAAAAAAAAAACAQ=</HashCode>
<FileName>API\Util\Server.cs</FileName> <FileName>API\Util\Server.cs</FileName>
</TypeIdentifier> </TypeIdentifier>
</Class> </Class>
<Class Name="SAMP.API.SpawnInfo" Collapsed="true">
<Position X="5.75" Y="4.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAgAAAAAAAYAAAgBIAAACIAAAAEBABZEEAAAAQIAAA=</HashCode>
<FileName>API\Util\SpawnInfo.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="SAMP.API.Util" Collapsed="true">
<Position X="0.5" Y="5.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAEAAAAAAAAAAAAAgAAAAAAAAACAAAAAA=</HashCode>
<FileName>API\Util\Util.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="SAMP.API.EventData.DialogResponseEventArgs" Collapsed="true"> <Class Name="SAMP.API.EventData.DialogResponseEventArgs" Collapsed="true">
<Position X="2.25" Y="0.5" Width="1.5" /> <Position X="2.25" Y="0.5" Width="1.5" />
<TypeIdentifier> <TypeIdentifier>
@ -88,179 +102,277 @@
</TypeIdentifier> </TypeIdentifier>
</Class> </Class>
<Class Name="SAMP.API.EventData.PlayerClickMapEventArgs" Collapsed="true"> <Class Name="SAMP.API.EventData.PlayerClickMapEventArgs" Collapsed="true">
<Position X="0.5" Y="2.5" Width="1.5" /> <Position X="7.5" Y="1.5" Width="1.5" />
<TypeIdentifier> <TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAgAAAAAAAA=</HashCode> <HashCode>AAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAgAAAAAAAA=</HashCode>
<FileName>API\EventData\Player\PlayerClickMapEventArgs.cs</FileName> <FileName>API\EventData\Player\PlayerClickMapEventArgs.cs</FileName>
</TypeIdentifier> </TypeIdentifier>
</Class> </Class>
<Class Name="SAMP.API.EventData.PlayerCommandTextEventArgs" Collapsed="true"> <Class Name="SAMP.API.EventData.PlayerCommandTextEventArgs" Collapsed="true">
<Position X="2.25" Y="2.5" Width="1.5" /> <Position X="9.25" Y="1.5" Width="1.5" />
<TypeIdentifier> <TypeIdentifier>
<HashCode>AAAIAAAAIAAIAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAA=</HashCode> <HashCode>AAAIAAAAIAAIAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAA=</HashCode>
<FileName>API\EventData\Player\PlayerCommandTextEventArgs.cs</FileName> <FileName>API\EventData\Player\PlayerCommandTextEventArgs.cs</FileName>
</TypeIdentifier> </TypeIdentifier>
</Class> </Class>
<Class Name="SAMP.API.EventData.PlayerDeathEventArgs" Collapsed="true">
<Position X="0.5" Y="2.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAECAAAAAAAQAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>API\EventData\Player\PlayerDeathEventArgs.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="SAMP.API.EventData.PlayerDisconnectEventArgs" Collapsed="true"> <Class Name="SAMP.API.EventData.PlayerDisconnectEventArgs" Collapsed="true">
<Position X="4" Y="2.5" Width="1.5" /> <Position X="2.25" Y="2.5" Width="1.5" />
<TypeIdentifier> <TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAACAAA=</HashCode> <HashCode>AAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAACAAA=</HashCode>
<FileName>API\EventData\Player\PlayerDisconnectEventArgs.cs</FileName> <FileName>API\EventData\Player\PlayerDisconnectEventArgs.cs</FileName>
</TypeIdentifier> </TypeIdentifier>
</Class> </Class>
<Class Name="SAMP.API.EventData.PlayerEnterExitModShopEventArgs" Collapsed="true"> <Class Name="SAMP.API.EventData.PlayerEnterExitModShopEventArgs" Collapsed="true">
<Position X="5.75" Y="2.5" Width="1.5" /> <Position X="4" Y="2.5" Width="1.5" />
<TypeIdentifier> <TypeIdentifier>
<HashCode>BAAAAAAAAAAAAAAAAAAAAAgAACAAAAAAAAAAgAAAAAA=</HashCode> <HashCode>BAAAAAAAAAAAAAAAAAAAAAgAACAAAAAAAAAAgAAAAAA=</HashCode>
<FileName>API\EventData\Player\PlayerEnterExitModShopEventArgs.cs</FileName> <FileName>API\EventData\Player\PlayerEnterExitModShopEventArgs.cs</FileName>
</TypeIdentifier> </TypeIdentifier>
</Class> </Class>
<Class Name="SAMP.API.EventData.PlayerRequestClassEventArgs" Collapsed="true"> <Class Name="SAMP.API.EventData.PlayerEnterVehicleEventArgs" Collapsed="true">
<Position X="5.75" Y="2.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAFAAAgAAAAAgAAAAAIAA=</HashCode>
<FileName>API\EventData\Player\PlayerEnterVehicleEventArgs.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="SAMP.API.EventData.PlayerExitVehicleEventArgs" Collapsed="true">
<Position X="7.5" Y="2.5" Width="1.5" /> <Position X="7.5" Y="2.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>API\EventData\Player\PlayerExitVehicleEventArgs.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="SAMP.API.EventData.PlayerPickUpPickupEventArgs" Collapsed="true">
<Position X="9.25" Y="2.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQ=</HashCode>
<FileName>API\EventData\Player\PlayerPickUpPickupEventArgs.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="SAMP.API.EventData.PlayerRequestClassEventArgs" Collapsed="true">
<Position X="0.5" Y="3.5" Width="1.5" />
<TypeIdentifier> <TypeIdentifier>
<HashCode>AAAAAAAAQAAAABAAAAIAAAAAAAAAAgAAAAAAAAAAAAA=</HashCode> <HashCode>AAAAAAAAQAAAABAAAAIAAAAAAAAAAgAAAAAAAAAAAAA=</HashCode>
<FileName>API\EventData\Player\PlayerRequestClassEventArgs.cs</FileName> <FileName>API\EventData\Player\PlayerRequestClassEventArgs.cs</FileName>
</TypeIdentifier> </TypeIdentifier>
</Class> </Class>
<Class Name="SAMP.API.EventData.PlayerSpawnEventArgs" Collapsed="true"> <Class Name="SAMP.API.EventData.PlayerSpawnEventArgs" Collapsed="true">
<Position X="0.5" Y="3.5" Width="1.5" /> <Position X="2.25" Y="3.5" Width="1.5" />
<TypeIdentifier> <TypeIdentifier>
<HashCode>AAAAAAAAQAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAA=</HashCode> <HashCode>AAAAAAAAQAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAA=</HashCode>
<FileName>API\EventData\Player\PlayerSpawnEventArgs.cs</FileName> <FileName>API\EventData\Player\PlayerSpawnEventArgs.cs</FileName>
</TypeIdentifier> </TypeIdentifier>
</Class> </Class>
<Class Name="SAMP.API.EventData.PlayerStateChangeEventArgs" Collapsed="true">
<Position X="4" Y="3.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAIAAAAAAAAAIAAAAAEAAAAAAAAAAA=</HashCode>
<FileName>API\EventData\Player\PlayerStateChangeEventArgs.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="SAMP.API.EventData.PlayerStreamEventArgs" Collapsed="true">
<Position X="5.75" Y="3.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAgAAAAAABAAAAAAAAAAAAAA=</HashCode>
<FileName>API\EventData\Player\PlayerStreamEventArgs.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="SAMP.API.EventData.PlayerTextEventArgs" Collapsed="true"> <Class Name="SAMP.API.EventData.PlayerTextEventArgs" Collapsed="true">
<Position X="2.25" Y="3.5" Width="1.5" /> <Position X="7.5" Y="3.5" Width="1.5" />
<TypeIdentifier> <TypeIdentifier>
<HashCode>AAAAAAAAQAAIAAAAAAAAAAAAAEAAAgAAAAAAIAAAAAA=</HashCode> <HashCode>AAAAAAAAQAAIAAAAAAAAAAAAAEAAAgAAAAAAIAAAAAA=</HashCode>
<FileName>API\EventData\Player\PlayerTextEventArgs.cs</FileName> <FileName>API\EventData\Player\PlayerTextEventArgs.cs</FileName>
</TypeIdentifier> </TypeIdentifier>
</Class> </Class>
<Class Name="SAMP.Util" Collapsed="true"> <Class Name="SAMP.API.EventData.PlayerUpdateEventArgs" Collapsed="true">
<Position X="9.25" Y="3.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAQAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAA=</HashCode>
<FileName>API\EventData\Player\PlayerUpdateEventArgs.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="SAMP.API.EventData.RconCommandEventArgs" Collapsed="true">
<Position X="0.5" Y="4.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAIAAAAIAAAAAAAAAAABAAAgAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>API\EventData\RconCommandEventArgs.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="SAMP.API.EventData.RconLoginAttemptEventArgs" Collapsed="true">
<Position X="2.25" Y="4.5" Width="1.5" /> <Position X="2.25" Y="4.5" Width="1.5" />
<TypeIdentifier> <TypeIdentifier>
<HashCode>AAAAAAAAAAAAEAAAAAAAAAAAAAgAAAAAAAAACAAAAAA=</HashCode> <HashCode>CACAAAAAAAAAAAAAAAAAAAAAIgAAAAAiAAAAAAAAAAA=</HashCode>
<FileName>API\Util\Util.cs</FileName> <FileName>API\EventData\RconLoginAttemptEventArgs.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="SAMP.API.EventData.VehicleDeathEventArgs" Collapsed="true">
<Position X="4" Y="5.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAECAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>API\EventData\Vehicle\VehicleDeathEventArgs.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="SAMP.API.EventData.VehicleStreamEventArgs" Collapsed="true">
<Position X="5.75" Y="5.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAgAAAAAABAAAAAAAAAAAAAA=</HashCode>
<FileName>API\EventData\Vehicle\VehicleStreamEventArgs.cs</FileName>
</TypeIdentifier> </TypeIdentifier>
</Class> </Class>
<Class Name="SAMP.Core.Exceptions" Collapsed="true"> <Class Name="SAMP.Core.Exceptions" Collapsed="true">
<Position X="4" Y="0.5" Width="1.5" /> <Position X="4" Y="0.5" Width="1.5" />
<TypeIdentifier> <TypeIdentifier>
<HashCode>AAAAAAAAgAAAAAAAAAAAgACACAAAAAAAAAAAAAAAAAA=</HashCode> <HashCode>AAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Core\Exceptions.cs</FileName> <FileName>Core\Exceptions.cs</FileName>
</TypeIdentifier> </TypeIdentifier>
</Class> </Class>
<Class Name="SAMP.Core.Internal" Collapsed="true"> <Class Name="SAMP.Core.Internal" Collapsed="true">
<Position X="0.5" Y="1.5" Width="1.5" /> <Position X="9.25" Y="0.5" Width="1.5" />
<TypeIdentifier> <TypeIdentifier>
<HashCode>RACSAFCBDAAgAKDAhQgQIAECKxhADASgQIBIRAQAEAQ=</HashCode> <HashCode>RACSAFCBDAAggKDAhQgQIAECKxhADASgSIBIRAQAEAQ=</HashCode>
<FileName>Core\Internal.cs</FileName> <FileName>Core\Internal.cs</FileName>
</TypeIdentifier> </TypeIdentifier>
</Class> </Class>
<Class Name="SAMP.Core.Natives" Collapsed="true"> <Class Name="SAMP.Core.Natives" Collapsed="true">
<Position X="4" Y="1.5" Width="1.5" /> <Position X="2.25" Y="1.5" Width="1.5" />
<TypeIdentifier> <TypeIdentifier>
<HashCode>/vcn3It/nfqy7rT3f/vN923h/+/vfv8479vea9f3f7w=</HashCode> <HashCode>/vcn3It/nfqy7rT3f/vN923h/+/vfv8479vea9f3f7w=</HashCode>
<FileName>Core\Natives.cs</FileName> <FileName>Core\Natives.cs</FileName>
</TypeIdentifier> </TypeIdentifier>
</Class> </Class>
<Class Name="SAMP.API.SpawnInfo" Collapsed="true">
<Position X="5.75" Y="3.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAgAAAAAAAYAAAgBIAAACIAAAAEBABZEEAAAAQIAAA=</HashCode>
<FileName>API\Util\SpawnInfo.cs</FileName>
</TypeIdentifier>
</Class>
<Struct Name="SAMP.API.Color" Collapsed="true"> <Struct Name="SAMP.API.Color" Collapsed="true">
<Position X="0.5" Y="5.75" Width="1.5" /> <Position X="0.5" Y="6.75" Width="1.5" />
<TypeIdentifier> <TypeIdentifier>
<HashCode>Y/s/AcRdQXu8I7OmoRkQ11WRFJBxxgSLiLRt/TUZl4E=</HashCode> <HashCode>Y/s/AcRdQXu8I7OmoRkQ11WRFJBxxgSLiLRt/TUZl4E=</HashCode>
<FileName>API\Util\Color.cs</FileName> <FileName>API\Util\Color.cs</FileName>
</TypeIdentifier> </TypeIdentifier>
</Struct> </Struct>
<Struct Name="SAMP.Vector2" Collapsed="true"> <Struct Name="SAMP.API.Vector2" Collapsed="true">
<Position X="2.25" Y="5.75" Width="1.5" /> <Position X="2.25" Y="6.75" Width="1.5" />
<TypeIdentifier> <TypeIdentifier>
<HashCode>AAAAAAAIAAQAAAAEYAUAAAAACQAAAABAAAAAAAAAYAA=</HashCode> <HashCode>AAAAAAAIAAQAAAAEYAUAAAAACQAAAABAAAAAAAAAYAA=</HashCode>
<FileName>API\Util\Vector2.cs</FileName> <FileName>API\Util\Vector2.cs</FileName>
</TypeIdentifier> </TypeIdentifier>
</Struct> </Struct>
<Struct Name="SAMP.Vector3" Collapsed="true"> <Struct Name="SAMP.API.Vector3" Collapsed="true">
<Position X="4" Y="5.75" Width="1.5" /> <Position X="4" Y="6.75" Width="1.5" />
<TypeIdentifier> <TypeIdentifier>
<HashCode>AAAAAAAIAAQAAAAEYAUAAAAACQAAAABAAAAAAAAAYAE=</HashCode> <HashCode>AAAAAAAIAAQAAAAEYAUAAAAACQAAAABAAAAAAAAAYAE=</HashCode>
<FileName>API\Util\Vector3.cs</FileName> <FileName>API\Util\Vector3.cs</FileName>
</TypeIdentifier> </TypeIdentifier>
</Struct> </Struct>
<Interface Name="SAMP.Core.ICountable" Collapsed="true"> <Interface Name="SAMP.Core.ICountable" Collapsed="true">
<Position X="0.5" Y="7" Width="1.5" /> <Position X="0.5" Y="8" Width="1.5" />
<TypeIdentifier> <TypeIdentifier>
<HashCode>AAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode> <HashCode>AAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Core\Interfaces\ICountable.cs</FileName> <FileName>Core\Interfaces\ICountable.cs</FileName>
</TypeIdentifier> </TypeIdentifier>
</Interface> </Interface>
<Interface Name="SAMP.Core.IScriptBase" Collapsed="true"> <Interface Name="SAMP.Core.IScriptBase" Collapsed="true">
<Position X="2.25" Y="7" Width="1.5" /> <Position X="2.25" Y="8" Width="1.5" />
<TypeIdentifier> <TypeIdentifier>
<HashCode>AAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode> <HashCode>AAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Core\Interfaces\IScriptBase.cs</FileName> <FileName>Core\Interfaces\IScriptBase.cs</FileName>
</TypeIdentifier> </TypeIdentifier>
</Interface> </Interface>
<Interface Name="SAMP.Core.IWorldEntity" Collapsed="true"> <Interface Name="SAMP.Core.IWorldEntity" Collapsed="true">
<Position X="4" Y="7" Width="1.5" /> <Position X="4" Y="8" Width="1.5" />
<TypeIdentifier> <TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode> <HashCode>AAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Core\Interfaces\IWorldEntity.cs</FileName> <FileName>Core\Interfaces\IWorldEntity.cs</FileName>
</TypeIdentifier> </TypeIdentifier>
</Interface> </Interface>
<Enum Name="SAMP.API.Alignment" Collapsed="true"> <Enum Name="SAMP.API.Alignment" Collapsed="true">
<Position X="0.5" Y="8" Width="1.5" /> <Position X="0.5" Y="9" Width="1.5" />
<TypeIdentifier> <TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAABAAAAAAAAAACACAAAAAAAA=</HashCode> <HashCode>AAAAAAAAAAAAAAAAAAAAABAAAAAAAAAACACAAAAAAAA=</HashCode>
<FileName>API\Enums\Alignment.cs</FileName> <FileName>API\Enums\Alignment.cs</FileName>
</TypeIdentifier> </TypeIdentifier>
</Enum> </Enum>
<Enum Name="SAMP.API.CameraMode" Collapsed="true"> <Enum Name="SAMP.API.CameraMode" Collapsed="true">
<Position X="2.25" Y="8" Width="1.5" /> <Position X="2.25" Y="9" Width="1.5" />
<TypeIdentifier> <TypeIdentifier>
<HashCode>BAAAwBAAAAAAEAIAAQQAAAQAAAEAAAAAAAACAAAEAIA=</HashCode> <HashCode>BAAAwBAAAAAAEAIAAQQAAAQAAAEAAAAAAAACAAAEAIA=</HashCode>
<FileName>API\Enums\CameraMode.cs</FileName> <FileName>API\Enums\CameraMode.cs</FileName>
</TypeIdentifier> </TypeIdentifier>
</Enum> </Enum>
<Enum Name="SAMP.API.ComponentSlot" Collapsed="true">
<Position X="4" Y="9" Width="1.5" />
<TypeIdentifier>
<HashCode>KAAAAAAAgAAAACAAAAAAAAAAEBgABAASBAAQAQAAAAE=</HashCode>
<FileName>API\Enums\ComponentSlot.cs</FileName>
</TypeIdentifier>
</Enum>
<Enum Name="SAMP.API.DialogStyle" Collapsed="true"> <Enum Name="SAMP.API.DialogStyle" Collapsed="true">
<Position X="4" Y="8" Width="1.5" /> <Position X="5.75" Y="9" Width="1.5" />
<TypeIdentifier> <TypeIdentifier>
<HashCode>AAAAAAAIAAAAAAAAAAAAAAAAEAAAAAACAAAAAAAAAAI=</HashCode> <HashCode>AAAAAAAIAAAAAAAAAAAAAAAAEAAAAAACAAAAAAAAAAI=</HashCode>
<FileName>API\Enums\DialogStyle.cs</FileName> <FileName>API\Enums\DialogStyle.cs</FileName>
</TypeIdentifier> </TypeIdentifier>
</Enum> </Enum>
<Enum Name="SAMP.API.DisconnectReason" Collapsed="true"> <Enum Name="SAMP.API.DisconnectReason" Collapsed="true">
<Position X="5.75" Y="8" Width="1.5" /> <Position X="7.5" Y="9" Width="1.5" />
<TypeIdentifier> <TypeIdentifier>
<HashCode>AAAAAAgAAAAAAAAAAAAAAAAABAAAAAAAACAAAAAAAAA=</HashCode> <HashCode>AAAAAAgAAAAAAAAAAAAAAAAABAAAAAAAACAAAAAAAAA=</HashCode>
<FileName>API\Enums\DisconnectReason.cs</FileName> <FileName>API\Enums\DisconnectReason.cs</FileName>
</TypeIdentifier> </TypeIdentifier>
</Enum> </Enum>
<Enum Name="SAMP.API.Keys" Collapsed="true"> <Enum Name="SAMP.API.Keys" Collapsed="true">
<Position X="7.5" Y="8" Width="1.5" /> <Position X="9.25" Y="9" Width="1.5" />
<TypeIdentifier> <TypeIdentifier>
<HashCode>AAAAAAIAIoAUCAAAAYQAAEAiAqAEoAAACACAAIAAAAY=</HashCode> <HashCode>AAAAAAIAIoAUCAAAAYQAAEAiAqAEoAAACACAAIAAAAY=</HashCode>
<FileName>API\Enums\Keys.cs</FileName> <FileName>API\Enums\Keys.cs</FileName>
</TypeIdentifier> </TypeIdentifier>
</Enum> </Enum>
<Enum Name="SAMP.API.PlayerState" Collapsed="true"> <Enum Name="SAMP.API.PlayerState" Collapsed="true">
<Position X="0.5" Y="8.75" Width="1.5" /> <Position X="0.5" Y="9.75" Width="1.5" />
<TypeIdentifier> <TypeIdentifier>
<HashCode>AAAAAAAQACAAAAAAACAAAAAAAAAAwCAAAAAAAIEAIAA=</HashCode> <HashCode>AAAAAAAQACAAAAAAACAAAAAAAAAAwCAAAAAAAIEAIAA=</HashCode>
<FileName>API\Enums\PlayerState.cs</FileName> <FileName>API\Enums\PlayerState.cs</FileName>
</TypeIdentifier> </TypeIdentifier>
</Enum> </Enum>
<Enum Name="SAMP.API.Skin" Collapsed="true"> <Enum Name="SAMP.API.Skin" Collapsed="true">
<Position X="2.25" Y="8.75" Width="1.5" /> <Position X="2.25" Y="9.75" Width="1.5" />
<TypeIdentifier> <TypeIdentifier>
<HashCode>t1bXfuYbJw3c99+0fb/XQdvrB4f9vt93DJHqmjNIc/0=</HashCode> <HashCode>t1bXfuYbJw3c99+0fb/XQdvrB4f9vt93DJHqmjNIc/0=</HashCode>
<FileName>API\Enums\Skin.cs</FileName> <FileName>API\Enums\Skin.cs</FileName>
</TypeIdentifier> </TypeIdentifier>
</Enum> </Enum>
<Enum Name="SAMP.API.SpecialAction" Collapsed="true">
<Position X="4" Y="9.75" Width="1.5" />
<TypeIdentifier>
<HashCode>AABAAAAAAAAAAAIMACQAAEAIAAIABAAAAACYAAEAAEA=</HashCode>
<FileName>API\Enums\SpecialAction.cs</FileName>
</TypeIdentifier>
</Enum>
<Enum Name="SAMP.API.Weapon" Collapsed="true">
<Position X="5.75" Y="9.75" Width="1.5" />
<TypeIdentifier>
<HashCode>IQOCASAAAAYAxBAAAUCABABAKoAFEIyAAFIACAgJCKA=</HashCode>
<FileName>API\Enums\Weapon.cs</FileName>
</TypeIdentifier>
</Enum>
<Enum Name="SAMP.API.WeaponState" Collapsed="true">
<Position X="7.5" Y="9.75" Width="1.5" />
<TypeIdentifier>
<HashCode>AAgAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAgBA=</HashCode>
<FileName>API\Enums\WeaponState.cs</FileName>
</TypeIdentifier>
</Enum>
<Enum Name="SAMP.API.WeaponType" Collapsed="true">
<Position X="9.25" Y="9.75" Width="1.5" />
<TypeIdentifier>
<HashCode>AEAAACBAAAIAAAEAAAAAAAAAAgAEAAQACAAAAAgAAAA=</HashCode>
<FileName>API\Enums\WeaponType.cs</FileName>
</TypeIdentifier>
</Enum>
<Font Name="Segoe UI" Size="9" /> <Font Name="Segoe UI" Size="9" />
</ClassDiagram> </ClassDiagram>

View File

@ -5,9 +5,6 @@ namespace SAMP.Core
internal class Exceptions internal class Exceptions
{ {
// API // API
public static Exception GameModeInitialized = new Exception("The GmaeMode has already been initialized.");
public static Exception TextDrawDestroyed = new Exception("The TextDraw has been destroyed."); public static Exception TextDrawDestroyed = new Exception("The TextDraw has been destroyed.");
public static Exception PlayerNotConnected = new Exception("The player isn't connected.");
public static Exception PickupMaxLimit = new Exception("The maximum number of pickups has been exceeded.");
}; };
}; };

View File

@ -2,6 +2,6 @@
{ {
public interface IWorldEntity public interface IWorldEntity
{ {
Vector3 Position { get; set; } API.Vector3 Position { get; set; }
}; };
}; };

View File

@ -133,7 +133,7 @@ namespace SAMP.Core
public static void OnPlayerObjectMoved(int playerid, int objectid) { } // TODO: Implement public static void OnPlayerObjectMoved(int playerid, int objectid) { } // TODO: Implement
public static void OnPlayerPickUpPickup(int playerid, int pickupid) public static void OnPlayerPickUpPickup(int playerid, int pickupid)
{ {
Player.Get(playerid)._OnPickupPickUp(pickupid); Player.Get(playerid)._OnPickUpPickup(pickupid);
} }
public static int OnVehicleMod(int playerid, int vehicleid, int componentid) { return 1; } // TODO: Implement public static int OnVehicleMod(int playerid, int vehicleid, int componentid) { return 1; } // TODO: Implement
public static void OnEnterExitModShop(int playerid, int enterexit, int interiorid) public static void OnEnterExitModShop(int playerid, int enterexit, int interiorid)
@ -149,12 +149,30 @@ namespace SAMP.Core
public static void OnPlayerExitedMenu(int playerid) { } // TODO: Implement public static void OnPlayerExitedMenu(int playerid) { } // TODO: Implement
public static void OnPlayerInteriorChange(int playerid, int newinteriorid, int oldinteriorid) { } // TODO: Implement public static void OnPlayerInteriorChange(int playerid, int newinteriorid, int oldinteriorid) { } // TODO: Implement
public static int OnPlayerKeyStateChange(int playerid, int newkeys, int oldkeys) { return 1; } // TODO: Implement public static int OnPlayerKeyStateChange(int playerid, int newkeys, int oldkeys) { return 1; } // TODO: Implement
public static void OnRconLoginAttempt(string ip, string password, int success) { } // TODO: Implement public static void OnRconLoginAttempt(string ip, string password, int success)
public static int OnPlayerUpdate(int playerid) { return 1; } // TODO: Implement {
public static void OnPlayerStreamIn(int playerid, int forplayerid) { } // TODO: Implement Server._OnRconLoginAttempt(ip, password, success);
public static void OnPlayerStreamOut(int playerid, int forplayerid) { } // TODO: Implement }
public static void OnVehicleStreamIn(int vehicleid, int forplayerid) { } // TODO: Implement public static int OnPlayerUpdate(int playerid)
public static void OnVehicleStreamOut(int vehicleid, int forplayerid) { } // TODO: Implement {
return Player.Get(playerid)._OnUpdate();
}
public static void OnPlayerStreamIn(int playerid, int forplayerid)
{
Player.Get(playerid)._OnStreamIn(forplayerid);
}
public static void OnPlayerStreamOut(int playerid, int forplayerid)
{
Player.Get(playerid)._OnStreamOut(forplayerid);
}
public static void OnVehicleStreamIn(int vehicleid, int forplayerid)
{
Vehicle.Get(vehicleid)._OnStreamIn(forplayerid);
}
public static void OnVehicleStreamOut(int vehicleid, int forplayerid)
{
Vehicle.Get(vehicleid)._OnStreamOut(forplayerid);
}
public static int OnDialogResponse(int playerid, int dialogid, int response, int listitem, string inputtext) public static int OnDialogResponse(int playerid, int dialogid, int response, int listitem, string inputtext)
{ {
// Predef a variable for pass-on // Predef a variable for pass-on

View File

@ -292,7 +292,7 @@ namespace SAMP.Core
[DllImport("__Internal", EntryPoint="SetPlayerColor")] [DllImport("__Internal", EntryPoint="SetPlayerColor")]
public static extern void SetPlayerColor(int playerid, uint color); public static extern void SetPlayerColor(int playerid, uint color);
[DllImport("__Internal", EntryPoint="GetPlayerColor")] [DllImport("__Internal", EntryPoint="GetPlayerColor")]
public static extern int GetPlayerColor(int playerid); public static extern uint GetPlayerColor(int playerid);
[DllImport("__Internal", EntryPoint="SetPlayerSkin")] [DllImport("__Internal", EntryPoint="SetPlayerSkin")]
public static extern void SetPlayerSkin(int playerid, int skinid); public static extern void SetPlayerSkin(int playerid, int skinid);
[DllImport("__Internal", EntryPoint="GetPlayerSkin")] [DllImport("__Internal", EntryPoint="GetPlayerSkin")]

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.2.0.0")] [assembly: AssemblyVersion("0.5.0.0")]
[assembly: AssemblyFileVersion("0.2.0.0")] [assembly: AssemblyFileVersion("0.5.0.0")]

View File

@ -42,8 +42,14 @@
<ItemGroup> <ItemGroup>
<Compile Include="API\Enums\Alignment.cs" /> <Compile Include="API\Enums\Alignment.cs" />
<Compile Include="API\Enums\CameraMode.cs" /> <Compile Include="API\Enums\CameraMode.cs" />
<Compile Include="API\Enums\ComponentSlots.cs" /> <Compile Include="API\Enums\ComponentSlot.cs" />
<Compile Include="API\Enums\SpecialAction.cs" />
<Compile Include="API\Enums\WeaponType.cs" />
<Compile Include="API\Enums\Weapon.cs" />
<Compile Include="API\Enums\WeaponState.cs" />
<Compile Include="API\Enums\Keys.cs" /> <Compile Include="API\Enums\Keys.cs" />
<Compile Include="API\EventData\RconLoginAttemptEventArgs.cs" />
<Compile Include="API\EventData\Player\PlayerUpdateEventArgs.cs" />
<Compile Include="API\EventData\Player\PlayerPickUpPickupEventArgs.cs" /> <Compile Include="API\EventData\Player\PlayerPickUpPickupEventArgs.cs" />
<Compile Include="API\EventData\Player\PlayerStateChangeEventArgs.cs" /> <Compile Include="API\EventData\Player\PlayerStateChangeEventArgs.cs" />
<Compile Include="API\EventData\Player\PlayerExitVehicleEventArgs.cs" /> <Compile Include="API\EventData\Player\PlayerExitVehicleEventArgs.cs" />
@ -54,7 +60,9 @@
<Compile Include="API\EventData\Player\PlayerClickMapEventArgs.cs" /> <Compile Include="API\EventData\Player\PlayerClickMapEventArgs.cs" />
<Compile Include="API\EventData\Player\PlayerSpawnEventArgs.cs" /> <Compile Include="API\EventData\Player\PlayerSpawnEventArgs.cs" />
<Compile Include="API\EventData\Player\PlayerRequestClassEventArgs.cs" /> <Compile Include="API\EventData\Player\PlayerRequestClassEventArgs.cs" />
<Compile Include="API\EventData\Player\PlayerStreamEventArgs.cs" />
<Compile Include="API\EventData\RconCommandEventArgs.cs" /> <Compile Include="API\EventData\RconCommandEventArgs.cs" />
<Compile Include="API\EventData\Vehicle\VehicleStreamEventArgs.cs" />
<Compile Include="API\EventData\Vehicle\VehicleDeathEventArgs.cs" /> <Compile Include="API\EventData\Vehicle\VehicleDeathEventArgs.cs" />
<Compile Include="API\Objects\GameMode.cs" /> <Compile Include="API\Objects\GameMode.cs" />
<Compile Include="API\Objects\GangZone.cs" /> <Compile Include="API\Objects\GangZone.cs" />
@ -90,7 +98,6 @@
<ItemGroup> <ItemGroup>
<None Include="ClassDiagram.cd" /> <None Include="ClassDiagram.cd" />
</ItemGroup> </ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.

View File

@ -120,7 +120,7 @@ void SetPlayerColor(int playerid, unsigned int color) {
g_Invoke->callNative(&PAWN::SetPlayerColor, playerid, color); g_Invoke->callNative(&PAWN::SetPlayerColor, playerid, color);
} }
int GetPlayerColor(int playerid) { unsigned int GetPlayerColor(int playerid) {
return g_Invoke->callNative(&PAWN::GetPlayerColor, playerid); return g_Invoke->callNative(&PAWN::GetPlayerColor, playerid);
} }

View File

@ -28,7 +28,7 @@ int GetPlayerScore(int playerid);
int GetPlayerDrunkLevel(int playerid); int GetPlayerDrunkLevel(int playerid);
void SetPlayerDrunkLevel(int playerid, int level); void SetPlayerDrunkLevel(int playerid, int level);
void SetPlayerColor(int playerid, int color); void SetPlayerColor(int playerid, int color);
int GetPlayerColor(int playerid); unsigned int GetPlayerColor(int playerid);
void SetPlayerSkin(int playerid, int skinid); void SetPlayerSkin(int playerid, int skinid);
int GetPlayerSkin(int playerid); int GetPlayerSkin(int playerid);
void GivePlayerWeapon(int playerid, int weaponid, int ammo); void GivePlayerWeapon(int playerid, int weaponid, int ammo);

View File

@ -1,3 +1,5 @@
#define VERSION ("0.5 alpha")
#include "callbacks.h" #include "callbacks.h"
#include "a_samp.h" #include "a_samp.h"
#include "Mono.h" #include "Mono.h"
@ -27,12 +29,16 @@ PLUGIN_EXPORT bool PLUGIN_CALL Load(void** ppData) {
g_Mono->init(); g_Mono->init();
// Output status // Output status
logprintf(" sampdotnethook v0.1 is OK."); char msg[50] = "";
sprintf_s(msg, sizeof(msg), " sampdotnethook v%s is OK", VERSION);
logprintf(msg);
return true; return true;
} }
PLUGIN_EXPORT void PLUGIN_CALL Unload() { PLUGIN_EXPORT void PLUGIN_CALL Unload() {
logprintf(" sampdotnethook v0.1 unloaded."); char msg[50] = "";
sprintf_s(msg, sizeof(msg), " sampdotnethook v%s unloaded", VERSION);
logprintf(msg);
} }
AMX_NATIVE_INFO PluginNatives[] = { AMX_NATIVE_INFO PluginNatives[] = {