Skip to content

Instantly share code, notes, and snippets.

@LivingInPortal
LivingInPortal / grenade_count.sp
Last active August 3, 2017 11:36
Sourcemod Get Grenade Count in CS:GO
stock GetGrenadeCount(client, const String:classname[])
{
new ent;
new ammotype;
new String:entClsname[30];
new size = GetEntPropArraySize(client, Prop_Send, "m_hMyWeapons");
for(new i = 0; i < size; i++) {
ent = GetEntPropEnt(client, Prop_Send, "m_hMyWeapons", i);
if(ent == -1) continue;