ServerServiceAddPlayerClass Method (Int32, Int32, Vector3, Single, Weapon, Int32, Weapon, Int32, Weapon, Int32) |
Adds a class to class selection. Classes are used so players may spawn with a skin of their choice.
Namespace:
SampSharp.Entities.SAMP
Assembly:
SampSharp.Entities (in SampSharp.Entities.dll) Version: 0.0.0-localbuild+05637d43e9f34d872e453289d4e240c843e43b09
Syntax public int AddPlayerClass(
int teamId,
int modelId,
Vector3 spawnPosition,
float angle,
Weapon weapon1 = Weapon.None,
int weapon1Ammo = 0,
Weapon weapon2 = Weapon.None,
int weapon2Ammo = 0,
Weapon weapon3 = Weapon.None,
int weapon3Ammo = 0
)
Parameters
- teamId
- Type: SystemInt32
The team for the player to spawn with. - modelId
- Type: SystemInt32
The skin for the player to spawn with. - spawnPosition
- Type: SampSharp.Entities.SAMPVector3
The position for the player to spawn at. - angle
- Type: SystemSingle
The angle of the player to spawn at. - weapon1 (Optional)
- Type: SampSharp.Entities.SAMPWeapon
The first weapon for the player to spawn with. - weapon1Ammo (Optional)
- Type: SystemInt32
The amount of ammunition of the first weapon for the player to spawn with. - weapon2 (Optional)
- Type: SampSharp.Entities.SAMPWeapon
The second weapon for the player to spawn with. - weapon2Ammo (Optional)
- Type: SystemInt32
The amount of ammunition of the second weapon for the player to spawn with. - weapon3 (Optional)
- Type: SampSharp.Entities.SAMPWeapon
The third weapon for the player to spawn with. - weapon3Ammo (Optional)
- Type: SystemInt32
The amount of ammunition of the third weapon for the player to spawn with.
Return Value
Type:
Int32The identifier of the class which was added.
Implements
IServerServiceAddPlayerClass(Int32, Int32, Vector3, Single, Weapon, Int32, Weapon, Int32, Weapon, Int32)Remarks
The maximum class ID is 319 (starting from 0, so a total of 320 classes). When this limit is reached, any more
classes that are added will replace ID 319.
See Also