28.06.2020, 15:13
Some notices:
- That script would only show the admin with the highest playerid.
- If SemiAdmin for someone is not 1,2 or 3, it would:
* Show nothing at all if the lowest playerid has that level
* Show the last admin with SemiAdmin or Rank having value 1,2 or 3
- ^ Same goes for array Rank
- Since SemiAdmin and Rank only hold value 0, 1, 2 or 3, you might wanna pack those arrays / accessing a single byte instead of a whole cell to save some space (x4 per array).
- Instead of switching between Rank/SemiAdmin and then formatting the string, you might aswell create arrays holding the names of the levels.
It first formats the string if SemiAdmin is 1,2 or 3. Then, it checks Rank. If it is not 1, 2 or 3 (default) you use 'return false'. When using return, you break the entire function (in this case, the command). SemiAdmin is 1, 2 or 3 but Rank is 0 so it breaks the entire command, and probably shows you a "SERVER: Unknown command" aswell since you returned false (= 0).
- That script would only show the admin with the highest playerid.
- If SemiAdmin for someone is not 1,2 or 3, it would:
* Show nothing at all if the lowest playerid has that level
* Show the last admin with SemiAdmin or Rank having value 1,2 or 3
- ^ Same goes for array Rank
- Since SemiAdmin and Rank only hold value 0, 1, 2 or 3, you might wanna pack those arrays / accessing a single byte instead of a whole cell to save some space (x4 per array).
- Instead of switching between Rank/SemiAdmin and then formatting the string, you might aswell create arrays holding the names of the levels.
Quote:
Why after entering /semi1 does not appear to me that I am a semi-administrator? |
Quote:
- If SemiAdmin for someone is not 1,2 or 3, it would: * Show nothing at all if the lowest playerid has that level * Show the last admin with SemiAdmin or Rank having value 1,2 or 3 - ^ Same goes for array Rank |