From c860aeb57f7bc3a8ea65e42572ef80fe64d706c4 Mon Sep 17 00:00:00 2001 From: Specifer <64122067+Specifer@users.noreply.github.com> Date: Sat, 23 Jan 2021 22:48:33 +0530 Subject: [PATCH 1/4] Update OnPlayerCommandText.pwn Change in /admins and addition of /vips. Tested.. --- .../OnPlayer/OnPlayerCommandText.pwn | 58 +++++++++++++++++-- 1 file changed, 54 insertions(+), 4 deletions(-) diff --git a/pawn/Resources/Callbacks/OnPlayer/OnPlayerCommandText.pwn b/pawn/Resources/Callbacks/OnPlayer/OnPlayerCommandText.pwn index 074f226ef..837a162cd 100644 --- a/pawn/Resources/Callbacks/OnPlayer/OnPlayerCommandText.pwn +++ b/pawn/Resources/Callbacks/OnPlayer/OnPlayerCommandText.pwn @@ -863,8 +863,12 @@ public OnPlayerCommandText(playerid, cmdtext[]) { if (!Player(player)->isAdministrator()) continue; if (IsPlayerAdmin(player)) continue; + + + if (Player(player)->isDeveloper()) + format(playerLevel, sizeof(playerLevel), "Developer"); if (Player(player)->isAdministrator() && !Player(player)->isManagement()) - format(playerLevel, sizeof(playerLevel), "Administrator"); + format(playerLevel, sizeof(playerLevel), "Administrator"); else if (Player(player)->isManagement()) format(playerLevel, sizeof(playerLevel), "Manager"); @@ -873,10 +877,18 @@ public OnPlayerCommandText(playerid, cmdtext[]) { player, playerLevel); // If the user was temp'd, show admins who temp'd the player. - if (tempLevel[player] == 1 || tempLevel[player] == 2) { - if (Player(playerid)->isAdministrator()) + { + if (Player(playerid)->isAdministrator() && Player(playerid)->isManagement()) + { + if (tempLevel[player] == 1 || tempLevel[player] == 2) format(message, sizeof(message), " %s {CCCCCC}(temp'd by %s){FFFFFF} (Id:%d) - {FF8E02}%s", - Player(player)->nicknameString(), UserTemped[player], player, playerLevel); + Player(player)->nicknameString(), UserTemped[player], player, playerLevel); + } + else { + if (tempLevel[player] == 2) + format(message, sizeof(message), " %s (Id:%d) - {FF8E02}Temp.Admin", + Player(player)->nicknameString(), player); + } } // If a player is undercover, show this to other admins. @@ -906,6 +918,44 @@ public OnPlayerCommandText(playerid, cmdtext[]) { return 1; } + if (strcmp(cmd, "/vips", true) == 0) { + 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++) { + if (!Player(player)->isConnected()) continue; + if (!Player(player)->isVip()) continue; + if (IsPlayerAdmin(player)) continue; + + + + if (Player(player)->isVip()) + format(playerLevel, sizeof(playerLevel), "VIP"); + if (Player(player)->isDeveloper()) + format(playerLevel, sizeof(playerLevel), "VIP / Developer"); + if (Player(player)->isAdministrator() && !Player(player)->isManagement()) + format(playerLevel, sizeof(playerLevel), "VIP / Administrator"); + if (Player(player)->isManagement()) + format(playerLevel, sizeof(playerLevel), "Manager"); + + // Format the message for any general player. + format(message, sizeof(message), " %s (Id:%d) - {FFFF00}%s", Player(player)->nicknameString(), + player, playerLevel); + + + + + SendClientMessage(playerid, Color::Information, message); + vipCount++; + } + + if (vipCount == 0) + SendClientMessage(playerid, Color::Information, "No VIPs are currently online in LVP."); + + return 1; + } + + if (strcmp(cmd, "/cardive", true) == 0) { if ((Time->currentTime() - iDiveTime[playerid]) < 3 * 60 && !Player(playerid)->isAdministrator()) { SendClientMessage(playerid, Color::Error, "Error: You can use this command once every 3 minutes."); From 5234dba31e373d04b2326339d21b34fb45c5bd35 Mon Sep 17 00:00:00 2001 From: Specifer <64122067+Specifer@users.noreply.github.com> Date: Sat, 23 Jan 2021 22:57:23 +0530 Subject: [PATCH 2/4] Update OnPlayerCommandText.pwn --- pawn/Resources/Callbacks/OnPlayer/OnPlayerCommandText.pwn | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pawn/Resources/Callbacks/OnPlayer/OnPlayerCommandText.pwn b/pawn/Resources/Callbacks/OnPlayer/OnPlayerCommandText.pwn index 837a162cd..070a7f7fc 100644 --- a/pawn/Resources/Callbacks/OnPlayer/OnPlayerCommandText.pwn +++ b/pawn/Resources/Callbacks/OnPlayer/OnPlayerCommandText.pwn @@ -928,7 +928,6 @@ public OnPlayerCommandText(playerid, cmdtext[]) { if (IsPlayerAdmin(player)) continue; - if (Player(player)->isVip()) format(playerLevel, sizeof(playerLevel), "VIP"); if (Player(player)->isDeveloper()) @@ -943,8 +942,7 @@ public OnPlayerCommandText(playerid, cmdtext[]) { player, playerLevel); - - + SendClientMessage(playerid, Color::Information, message); vipCount++; } From 1bf56cce212fb27ad37d126c18af99eb7751f835 Mon Sep 17 00:00:00 2001 From: Specifer <64122067+Specifer@users.noreply.github.com> Date: Sun, 24 Jan 2021 18:12:59 +0530 Subject: [PATCH 3/4] Update OnPlayerCommandText.pwn --- .../Callbacks/OnPlayer/OnPlayerCommandText.pwn | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pawn/Resources/Callbacks/OnPlayer/OnPlayerCommandText.pwn b/pawn/Resources/Callbacks/OnPlayer/OnPlayerCommandText.pwn index 070a7f7fc..5c42d8cec 100644 --- a/pawn/Resources/Callbacks/OnPlayer/OnPlayerCommandText.pwn +++ b/pawn/Resources/Callbacks/OnPlayer/OnPlayerCommandText.pwn @@ -868,7 +868,7 @@ public OnPlayerCommandText(playerid, cmdtext[]) { if (Player(player)->isDeveloper()) format(playerLevel, sizeof(playerLevel), "Developer"); if (Player(player)->isAdministrator() && !Player(player)->isManagement()) - format(playerLevel, sizeof(playerLevel), "Administrator"); + format(playerLevel, sizeof(playerLevel), "Administrator"); else if (Player(player)->isManagement()) format(playerLevel, sizeof(playerLevel), "Manager"); @@ -877,8 +877,8 @@ public OnPlayerCommandText(playerid, cmdtext[]) { player, playerLevel); // If the user was temp'd, show admins who temp'd the player. - { - if (Player(playerid)->isAdministrator() && Player(playerid)->isManagement()) + + if (Player(playerid)->isAdministrator()) { if (tempLevel[player] == 1 || tempLevel[player] == 2) format(message, sizeof(message), " %s {CCCCCC}(temp'd by %s){FFFFFF} (Id:%d) - {FF8E02}%s", @@ -886,10 +886,10 @@ public OnPlayerCommandText(playerid, cmdtext[]) { } else { if (tempLevel[player] == 2) - format(message, sizeof(message), " %s (Id:%d) - {FF8E02}Temp.Admin", + format(message, sizeof(message), " %s (Id:%d) - {FF8E02}Temporary Administrator", Player(player)->nicknameString(), player); } - } + // If a player is undercover, show this to other admins. if (UndercoverAdministrator(player)->isUndercoverAdministrator()) { From 3b5aae1443059c26079791869b3a40a402dbebfb Mon Sep 17 00:00:00 2001 From: Specifer <64122067+Specifer@users.noreply.github.com> Date: Sun, 31 Jan 2021 20:08:23 +0530 Subject: [PATCH 4/4] Update OnPlayerCommandText.pwn --- .../OnPlayer/OnPlayerCommandText.pwn | 28 ++++++++----------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/pawn/Resources/Callbacks/OnPlayer/OnPlayerCommandText.pwn b/pawn/Resources/Callbacks/OnPlayer/OnPlayerCommandText.pwn index 5c42d8cec..b429e4ae6 100644 --- a/pawn/Resources/Callbacks/OnPlayer/OnPlayerCommandText.pwn +++ b/pawn/Resources/Callbacks/OnPlayer/OnPlayerCommandText.pwn @@ -863,10 +863,7 @@ public OnPlayerCommandText(playerid, cmdtext[]) { if (!Player(player)->isAdministrator()) continue; if (IsPlayerAdmin(player)) continue; - - - if (Player(player)->isDeveloper()) - format(playerLevel, sizeof(playerLevel), "Developer"); + if (Player(player)->isAdministrator() && !Player(player)->isManagement()) format(playerLevel, sizeof(playerLevel), "Administrator"); else if (Player(player)->isManagement()) @@ -876,8 +873,7 @@ public OnPlayerCommandText(playerid, cmdtext[]) { format(message, sizeof(message), " %s (Id:%d) - {FF8E02}%s", Player(player)->nicknameString(), player, playerLevel); - // If the user was temp'd, show admins who temp'd the player. - + // If the user was temp'd, show admins who temp'd the player. if (Player(playerid)->isAdministrator()) { if (tempLevel[player] == 1 || tempLevel[player] == 2) @@ -922,24 +918,24 @@ public OnPlayerCommandText(playerid, cmdtext[]) { 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++) { - if (!Player(player)->isConnected()) continue; - if (!Player(player)->isVip()) continue; - if (IsPlayerAdmin(player)) continue; + for (new playerId = 0; playerId <= PlayerManager->highestPlayerId(); playerId++) { + if (!Player(playerId)->isConnected()) continue; + if (!Player(playerId)->isVip()) continue; + if (IsPlayerAdmin(playerId)) continue; - if (Player(player)->isVip()) + if (Player(playerId)->isVip()) format(playerLevel, sizeof(playerLevel), "VIP"); - if (Player(player)->isDeveloper()) - format(playerLevel, sizeof(playerLevel), "VIP / Developer"); - if (Player(player)->isAdministrator() && !Player(player)->isManagement()) + if (Player(playerId)->isDeveloper()) + format(playerLevel, sizeof(playerLevel), "Developer"); + if (Player(playerId)->isAdministrator() && !Player(player)->isManagement()) format(playerLevel, sizeof(playerLevel), "VIP / Administrator"); - if (Player(player)->isManagement()) + if (Player(playerId)->isManagement()) format(playerLevel, sizeof(playerLevel), "Manager"); // Format the message for any general player. format(message, sizeof(message), " %s (Id:%d) - {FFFF00}%s", Player(player)->nicknameString(), - player, playerLevel); + playerId, playerLevel);