Help /admins
#5

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.

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

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).
Reply


Messages In This Thread
Help /admins - by KamilPolska - 27.06.2020, 15:31
Re: Help /admins - by ilogbc - 27.06.2020, 15:39
Re: Help /admins - by Lexless - 27.06.2020, 15:44
Re: Help /admins - by KamilPolska - 28.06.2020, 13:28
Re: Help /admins - by Kwarde - 28.06.2020, 15:13
Re: Help /admins - by KamilPolska - 28.06.2020, 17:55
Re: Help /admins - by Kwarde - 28.06.2020, 18:13
Re: Help /admins - by Chams - 28.06.2020, 18:47
Re: Help /admins - by KamilPolska - 05.07.2020, 17:39
Re: Help /admins - by DarkMaster - 09.07.2020, 11:13

Forum Jump:


Users browsing this thread: 8 Guest(s)