Est GetAmmo

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

Contents

Description

Gets the ammo reserve of the identifier and save it into variable

Parameters

  • variable - The variable to store the returned value in.
  • identifier - The identifier to use, must be a players:
    • userid
    • steamid
    • username - Partial or full name
  • weapon slot/name - See List_of_CSS_weapons for weapon selection help
    • 1 - Primary weapon
    • 2 - Secondary weapon
    • Weapon name - Use a weapon name. example:AWP

Example


event player_hurt
{
  es_xset myvar 0
  est_GetAmmo myvar someuser AWP
  if(server_var(myvar) == 0) then es_xtell event_var(userid) You either don't have a AWP or your out of AWP ammo
 
  es est_GetAmmo myvar event_var(userid) 1
  es_tell event_var(userid) #green Your primary weapon has server_var(myvar) much ammo left in your reserve...
}

Notes

  • None

See Also

blog comments powered by Disqus