BaseModeAddPlayerClass Method (Int32, Vector3, Single, Weapon, Int32) |
Adds a class to class selection. Classes are used so players may spawn with a skin of their choice.
Namespace:
SampSharp.GameMode
Assembly:
SampSharp.GameMode (in SampSharp.GameMode.dll) Version: 0.0.0-localbuild+05637d43e9f34d872e453289d4e240c843e43b09
Syntax public virtual int AddPlayerClass(
int modelid,
Vector3 position,
float zAngle,
Weapon weapon,
int weaponAmmo
)
Parameters
- modelid
- Type: SystemInt32
The skin which the player will spawn with. - position
- Type: SampSharp.GameModeVector3
The coordinate of the spawn point of this class. - zAngle
- Type: SystemSingle
The direction in which the player should face after spawning. - weapon
- Type: SampSharp.GameMode.DefinitionsWeapon
The spawn-weapon for the player. - weaponAmmo
- Type: SystemInt32
The amount of ammunition for the spawn weapon.
Return Value
Type:
Int32
The ID of the class which was just added. 300 if the class limit (300) was reached. The highest possible class
ID is 299.
See Also