Est SetAmmo

From EventScripts Community Encyclopedia
Syntax: est_SetAmmo <identifier> <weapon slot/name> <amount>
Note: Command parameters are described inside the < and > characters. Optional parameters are contained within [ and ] characters.

Contents

Description

Sets the ammo (not the clip) of the weapon specified trough slot/name to the amount. Use the identifier to set the player selection.

Parameters

  • identifier - See Est_PlayerSelection for player selection help
  • weapon slot/name - Name or slot to use. See List_of_CSS_weapons for weapon selection help
  • amount - The value you want to set the ammo to

Example


event weapon_fire
{
	// give the deagle weapon of the player 50 ammo
	es est_SetAmmo event_var(userid) weapon_deagle 50
	// give the rifle in slot3 50 ammo
	es est_SetAmmo event_var(userid) 3 50
}

Notes

  • If the player has no weapon in the specified slot, or the player doesn't have the named weapon, nothing happens

See Also

blog comments powered by Disqus