[ND] Commander Restrictions

This plugin blocks the command "applyforcommander" if the client's level is not between a minimum and maximum. It does not interfere with the promote command from Commander Management.


  • sm_com_restrictions | Default = 0 | "Enables/Disables ND Commander Restrictions"

  • sm_com_min_level | Default = 1 | "Minimum level allowed to apply for commander."

  • sm_com_max_level | Default = 60 | "Maximum level allowed to apply for commander."

  • sm_com_restrict_time | Default = 60 | "Number of seconds after round start remove restrictions. [0 == Never Remove]" This exists in case no one on [min,max] applies for commander. If set greater than 0, the restrictions will be removed after t seconds.

Known Issues:

  • Players must have spawned at least once before they can apply. I don't see any way around this since levels are not loaded until they have spawned.

  • Spam clicking apply would cause "ND_GetPlayerRank" to crash, so I added a 1.5 second timer to prevent it from restarting while the previous instance has not yet finished running. Unfortunately, this means that all clients cannot apply within 1.5 seconds of each other, so if you can think of a better way to code this, please let me know.

Special thanks to psychonic for helping me retrieve players' ranks.

Attached Files

File Type: smx

commander_restrictions.smx (5.0 KB)

File Type: sp

Get Plugin or
Get Source (commander_restrictions.sp - 4.3 KB)

Orignal From: [ND] Commander Restrictions

No comments

Not a single link is allowed to submit in comment :o