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. ...")
 
 
(One intermediate revision by one other user not shown)
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:'''
   ID (Byte): Player ID to change weapon. 0 for all.
+
   ID (Byte): Player ID to change weapon.
 
   Primary (Byte): Weapon Number to set primary weapon to.
 
   Primary (Byte): Weapon Number to set primary weapon to.
 
   Secondary (Byte): Weapon Number to set secondary weapon to.
 
   Secondary (Byte): Weapon Number to set secondary weapon to.
Line 15: Line 15:
 
<source lang="pascal">
 
<source lang="pascal">
 
begin
 
begin
     ForceWeaponEx( 0, 3, 0, 0, 1 );
+
     ForceWeaponEx(ID, 3, 0, 0, 1);
     // Forces all players to use AK as primary and a USSOCOM with 1 ammo as secondary.
+
     // Forces ID to use AK as primary and a USSOCOM with 1 ammo as secondary.
 
end;
 
end;
 
</source>
 
</source>
  
 
[[Category:Server Scripting]][[Category:Server Scripting Functions]]
 
[[Category:Server Scripting]][[Category:Server Scripting Functions]]

Latest revision as of 15:51, 23 September 2012

Scripting Manual

procedure ForceWeaponEx(ID, Primary, Secondary, Ammo, SecAmmo: 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): 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(ID, 3, 0, 0, 1);
    // Forces ID to use AK as primary and a USSOCOM with 1 ammo as secondary.
end;