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...") |
(No difference)
|
Revision as of 09:15, 15 August 2012
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): Ammo to give the player. 0 for default. 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;