Difference between revisions of "ForceWeaponEx"

From Soldat Community Wiki
Jump to: navigation, search
(Created page with "===Scripting Manual=== ''procedure ForceWeaponEx(ID, Primary, Secondary, Ammo, SecAmmo: byte);'' '''Parameter Info:''' ID (Byte): Player ID to change weapon. 0 for all. ...")
 
m (Formatted code)
Line 1: Line 1:
 
===Scripting Manual===
 
===Scripting Manual===
  ''procedure ForceWeaponEx(ID, Primary, Secondary, Ammo, SecAmmo: byte);''
+
  ''procedure ForceWeaponEx(ID, Primary, Secondary, Ammo, SecAmmo: Byte);''
 
   
 
   
 
  '''Parameter Info:'''
 
  '''Parameter Info:'''
Line 15: Line 15:
 
<source lang="pascal">
 
<source lang="pascal">
 
begin
 
begin
     ForceWeaponEx( 0, 3, 0, 0, 1 );
+
     ForceWeaponEx(0, 3, 0, 0, 1);
 
     // Forces all players to use AK as primary and a USSOCOM with 1 ammo as secondary.
 
     // Forces all players to use AK as primary and a USSOCOM with 1 ammo as secondary.
 
end;
 
end;

Revision as of 16:03, 10 September 2012

Scripting Manual

procedure ForceWeaponEx(ID, Primary, Secondary, Ammo, SecAmmo: Byte);

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

Description:
 This function will force the specified player(ID) to change their Primary and Secondary weapons and/or ammo.

Examples

begin
    ForceWeaponEx(0, 3, 0, 0, 1);
    // Forces all players to use AK as primary and a USSOCOM with 1 ammo as secondary.
end;