Difference between revisions of "ForceWeapon"

From Soldat Community Wiki
Jump to: navigation, search
(Created page with "===From the Scripting Manual=== ''procedure ForceWeapon(ID, Primary, Secondary, Ammo: byte);'' '''Parameter Info:''' ID (Byte): Player ID to change weapon. Primary (By...")
 
m
Line 22: Line 22:
 
</source>
 
</source>
  
 
==External Links==
 
* [http://enesce.com/help/index.html?Functions/ForceWeapon.html Scripting Manual page for ForceWeapon]
 
  
 
[[Category:Server Scripting]][[Category:Server Scripting Functions]]
 
[[Category:Server Scripting]][[Category:Server Scripting Functions]]

Revision as of 09:45, 10 September 2012

From the Scripting Manual

procedure ForceWeapon(ID, Primary, Secondary, Ammo: byte);

Parameter Info:
 ID (Byte): Player ID to change weapon.
 Primary (Byte): Weapon Number to set primary weapon to.
 Secondary (Byte): Weapon Number to set secondary weapon to.
 Ammo (Byte): Ammo to give the player. 0 for default.

Description:
 This function will force the specified player(ID) to change their Primary and Secondary weapons.
 NOTE: Set Ammo to 0 to use the default ammo count for the (Primary) gun.

Examples

begin
    ForceWeapon( 0, 3, 0, 0 );
    // Forces all players to use AK as primary.
    ForceWeapon( ID, 3, 0, 0 );
    // Forces player 'ID' to use AK as primary.
end;