ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. setCurrentWeapon

Function

setCurrentWeapon

ServerMiscellaneousTrilogy Hub only

Puts a weapon the ped already has into its hand (weapon number, e.g. 31 = M4; 0 = fists). Another name: setPedWeaponSlot.

Syntax

bool setCurrentWeapon(ped thePed, int weapon)

Arguments

thePedped
The ped.
weaponint
Weapon number.

Returns

true if the ped has that weapon.

Example

giveWeapon(player, 31, 200)
setCurrentWeapon(player, 0)

See also