Scripting/Server/Traffic/ped.SetWeapon
Each returns true if the ped exists.
Contents
Syntax
ped.SetWeapon(weapon [, ammo])ped.Kill()ped.Remove()Arguments
- int weapon
- int ammo (optional)
Example
function onPlayerCommand( player, cmd, params )
{
if ( cmd == "setweapon" )
{
// ped is a ped handle (see TrafficPed)
ped.SetWeapon( WEP_AK47 );
}
}This sample was generated from the signature – adapt the values to your gamemode.
Section: TrafficPed
Categories: Server functions | TrafficPed