Skip to content

Commit 9b77a38

Browse files
committed
Inform people when someone is using SAMPCAC
1 parent 9dab903 commit 9b77a38

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

pawn/Features/Gameplay/Communication/Announcements.pwn

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,18 @@ class Announcements {
7676
*/
7777
public announcePlayerConnected(playerId) {
7878
// Announce this player's connection to other in-game players.
79+
#if Feature::EnableSAMPCAC == 1
80+
if (CAC_GetStatus(playerId)) {
81+
format(m_formatBuffer, sizeof(m_formatBuffer), "* %s (Id:%d) has joined {A9C4E4}Las Venturas Playground {A5D6A7}(sampcac){CCCCCC}.",
82+
Player(playerId)->nicknameString(), playerId);
83+
} else {
84+
format(m_formatBuffer, sizeof(m_formatBuffer), "* %s (Id:%d) has joined {A9C4E4}Las Venturas Playground{CCCCCC}.",
85+
Player(playerId)->nicknameString(), playerId);
86+
}
87+
#else
7988
format(m_formatBuffer, sizeof(m_formatBuffer), "* %s (Id:%d) has joined {A9C4E4}Las Venturas Playground{CCCCCC}.",
8089
Player(playerId)->nicknameString(), playerId);
90+
#endif
8191

8292
this->distributeAnnouncement(ConnectionMessageAnnouncement, Color::ConnectionMessage, m_formatBuffer);
8393

pawn/Interface/Server.pwn

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
native gpci(playerid, serial[], len);
77
native IsValidVehicle(vehicleid);
88

9+
// Provided by the SAMPCAC plugin.
10+
#if Feature::EnableSAMPCAC == 1
11+
native CAC_GetStatus(player_id);
12+
#endif
13+
914
// Provided by the PlaygroundJS plugin.
1015
native IsPlayerEligibleForBenefit(playerid, benefit);
1116
native IsPlayerMinimized(playerId);

0 commit comments

Comments
 (0)