Addition and Modification in OnPlayerCommandText.pwn#842
Conversation
Change in /admins and addition of /vips. Tested..
|
My opinions
|
| format(playerLevel, sizeof(playerLevel), "Developer"); | ||
| if (Player(player)->isAdministrator() && !Player(player)->isManagement()) | ||
| format(playerLevel, sizeof(playerLevel), "Administrator"); | ||
| format(playerLevel, sizeof(playerLevel), "Administrator"); |
There was a problem hiding this comment.
NIT: You added a enter here
| // If the user was temp'd, show admins who temp'd the player. | ||
| if (tempLevel[player] == 1 || tempLevel[player] == 2) { | ||
| if (Player(playerid)->isAdministrator()) | ||
| { |
There was a problem hiding this comment.
What happened here? There's brackets without an if statement or whatso ever.
You might've made a mistake?
| if (tempLevel[player] == 1 || tempLevel[player] == 2) { | ||
| if (Player(playerid)->isAdministrator()) | ||
| { | ||
| if (Player(playerid)->isAdministrator() && Player(playerid)->isManagement()) |
There was a problem hiding this comment.
This isAdministrator is redundant here. If you're management you're always an admin
| } | ||
| else { | ||
| if (tempLevel[player] == 2) | ||
| format(message, sizeof(message), " %s (Id:%d) - {FF8E02}Temp.Admin", |
There was a problem hiding this comment.
Do we really want to display that they're temporary?
If so we'd want to spell it out fully.
|
|
||
|
|
||
| if (Player(player)->isDeveloper()) | ||
| format(playerLevel, sizeof(playerLevel), "Developer"); |
There was a problem hiding this comment.
Do we really want to have Developers among this list?
It'll probably be unclear to players that they do not have administrator rights and thus can't help them with houses reports and such
There was a problem hiding this comment.
Ah, but they can report bugs to devs directly?
There was a problem hiding this comment.
If you want, I can remove it.
There was a problem hiding this comment.
A developer has no administrative capability so I think adding them to /admins would be missleading.
|
Thank you for your modification as always! Are you sure you fully tested this @Specifer? (With all levels mentioned?) I think there might be some minor issues. Also please see inline comments. |
|
Yes Tested fully by myself. |
|
Everything good? |
| if (!Player(player)->isAdministrator()) continue; | ||
| if (IsPlayerAdmin(player)) continue; | ||
|
|
||
|
|
There was a problem hiding this comment.
NIT: Some redundantent enters here
|
|
||
|
|
||
| if (Player(player)->isDeveloper()) | ||
| format(playerLevel, sizeof(playerLevel), "Developer"); |
There was a problem hiding this comment.
A developer has no administrative capability so I think adding them to /admins would be missleading.
| player, playerLevel); | ||
|
|
||
| // If the user was temp'd, show admins who temp'd the player. | ||
| if (tempLevel[player] == 1 || tempLevel[player] == 2) { |
There was a problem hiding this comment.
What is your reason to swap these ifs arounds?
| Player(player)->nicknameString(), UserTemped[player], player, playerLevel); | ||
| } | ||
| else { | ||
| if (tempLevel[player] == 2) |
There was a problem hiding this comment.
This condition is caught in the if statement above. This code should never be reached as I'm reading it?
| return 1; | ||
| } | ||
|
|
||
| if (strcmp(cmd, "/vips", true) == 0) { |
There was a problem hiding this comment.
Wouldn't it be nice to have this in JavaScript instead?
We'd like to move all code to JavaScript
There was a problem hiding this comment.
Um maybe for the moment? can we keep pwn. I'll make js for both /admins and /vip altogether.
| if (Player(player)->isVip()) | ||
| format(playerLevel, sizeof(playerLevel), "VIP"); | ||
| if (Player(player)->isDeveloper()) | ||
| format(playerLevel, sizeof(playerLevel), "VIP / Developer"); |
There was a problem hiding this comment.
A Developer doesn't always have to be a VIP. I believe showing "Developer" would be enough
| SendClientMessage(playerid, COLOR_ORANGE, "List of VIPs online in Las Venturas Playground"); | ||
|
|
||
| new message[128], vipCount = 0, playerLevel[30]; | ||
| for (new player = 0; player <= PlayerManager->highestPlayerId(); player++) { |
There was a problem hiding this comment.
I believe calling the variable "playerId" would be more suitable.
"player" would assume that it's the entity player.
|
Dude holsje? Reply if this new commit has resolved the errors. |
|
It would be good if we make this /vips cmd simple as possible. Even if the players are administrators, managers or a developers. The /vips command should show only -VIP after the player name example:- Vip connected: |
Change in /admins and addition of /vips.
Tested.
Change in /admins
I have added a level Temp. Admin in /admins for players to differentiate full-time admins and part-time, Since temp admins operate at limited power. I felt this knowledge should be transparent to fellow players. Tested it thoroughly. And admins can see who temp'ed the person while players only see temp-admin. Also, added Developers to this list since it was long overdue? What do you think?
Addition of /vips
Just similar to /admins but shows also higher level (i.e) VIP, Developer, Administrator, and Manager.