Revision Difference
Player:CheckLimit#560270
<function name="CheckLimit" parent="Player" type="classfunc">
<description>Checks if the limit is hit or not. If it is, it will throw a notification saying so.</description>
<description><note>This function is only available in Sandbox and its derivatives.</note><note>This will always return `true` in singleplayer, as singleplayer does not have limits.</note>Checks if the limit of an entity type added by <page>Player:AddCount</page> is hit or not. If it's hit, it will call the <page>GM:PlayerCheckLimit</page> hook, and call <page>Player:LimitHit</page> if the hook doesn't return `false`.</description>
<realm>Shared</realm>
<file line="9-L32">gamemodes/sandbox/gamemode/player_extension.lua</file>
<args>
<arg name="limitType" type="string">Limit type. In unmodified Sandbox possible values are:⤶
<arg name="str" type="string">The entity type to check the limit for. Default types:⤶
* "props"
* "ragdolls"
* "vehicles"
* "effects"
* "balloons"
* "cameras"
* "npcs"
* "sents"
* "dynamite"
* "lamps"
* "lights"
* "wheels"
* "thrusters"
* "hoverballs"
* "buttons"
* "emitters"</arg>
</args>
<rets>
<ret name="" type="boolean">Returns true if limit is not hit, false if it is hit</ret>⤶
<ret name="" type="boolean">Returns `true` if the limit of this type is not hit, `false` otherwise.</ret>⤶
</rets>
</function>