Scripting/Server/Classes/Player/SetWeapon
Gives a weapon (WEP_*, ids 0-12) and ammo, and makes it the active weapon.
Syntax
player.SetWeapon(weapon, ammo)Arguments
- int weapon
- int ammo
Example
function onPlayerSpawn( player, classID )
{
player.SetWeapon( WEP_AK47, 250 );
}Related pages
- player.ClearWeapons
- player.GetWeaponAmmoAtSlot
- player.SetAnim
- player.RemoveLimb
- player.RemoveFromVehicle
- player.Spawn
- player.RespawnAt
- player.ForceToSpawnScreen
- player.CheckFileHash
Section: Player
Categories: Server methods | Player