mirror of
https://github.com/alliedmodders/sourcemod.git
synced 2025-12-07 02:18:35 +00:00
Add function to find a TopMenu Item
This commit is contained in:
parent
1121cb6ef0
commit
a3411df89b
@ -1239,6 +1239,18 @@ unsigned int TopMenu::FindCategory(const char *name)
|
||||
return obj->object_id;
|
||||
}
|
||||
|
||||
unsigned int TopMenu::FindItem(const char *name)
|
||||
{
|
||||
topmenu_object_t *obj;
|
||||
if (!m_ObjLookup.retrieve(name, &obj))
|
||||
return 0;
|
||||
|
||||
if (obj->type != TopMenuObject_Item)
|
||||
return 0;
|
||||
|
||||
return obj->object_id;
|
||||
}
|
||||
|
||||
void TopMenu::OnMaxPlayersChanged( int newvalue )
|
||||
{
|
||||
m_max_clients = newvalue;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user