Difference between revisions of "SetWeaponActive"
(Created page with "===From the Scripting Manual=== ''procedure SetWeaponActive(ID, WeaponNum: byte; State: boolean);'' '''Parameter Info:''' ID (Byte): Player ID to change weapon visibilit...") |
m (→From the Scripting Manual) |
||
Line 5: | Line 5: | ||
ID (Byte): Player ID to change weapon visibility. Set to 0 for all players! | ID (Byte): Player ID to change weapon visibility. Set to 0 for all players! | ||
WeaponNum (Byte): Weapon Number to set visible/invisible in the weapon menu. | WeaponNum (Byte): Weapon Number to set visible/invisible in the weapon menu. | ||
− | State (Boolean): | + | State (Boolean): Set true=visible or false=invisible. Default: true. |
'''Description:''' | '''Description:''' |
Latest revision as of 12:18, 8 May 2014
From the Scripting Manual
procedure SetWeaponActive(ID, WeaponNum: byte; State: boolean); Parameter Info: ID (Byte): Player ID to change weapon visibility. Set to 0 for all players! WeaponNum (Byte): Weapon Number to set visible/invisible in the weapon menu. State (Boolean): Set true=visible or false=invisible. Default: true. Description: This function will set wether or not a weapon is visible to be selected, in the ingame weapon menu for a specific player. Set ID to 0 to send to all players.
Examples
begin
SetWeaponActive(1,2,false); // Player 1 will now be unable to choose the HK MP5 from the weapon menu.
end;
Notes
- All weapons are being enabled each time a player joins any team, so if you do something like that (example below), the Player will have all weapons enabled
begin
SetWeaponActive(1,2,false);
Command('/setteam2 1');
end;