Browse Source

Added fake client checks to include

nosoop 7 years ago
parent
commit
c98dd51585
1 changed files with 3 additions and 3 deletions
  1. 3 3
      scripting/include/custom_achievements.inc

+ 3 - 3
scripting/include/custom_achievements.inc

@@ -42,7 +42,7 @@ methodmap CustomAchievement {
 	 * Flags the achievement as completed for this client.
 	 */
 	public void Award(int client, bool notify = true) {
-		if (IsClientAuthorized(client)) {
+		if (!IsFakeClient(client) && IsClientAuthorized(client)) {
 			this.AwardToAccountID(GetSteamAccountID(client), notify);
 		}
 	}
@@ -62,7 +62,7 @@ methodmap CustomAchievement {
 	 */
 	public void FetchMetadata(int client, AchievementMetadataCallback callback,
 			any data) {
-		if (IsClientAuthorized(client)) {
+		if (!IsFakeClient(client) && IsClientAuthorized(client)) {
 			this.FetchMetadataByAccountID(GetSteamAccountID(client), callback, data);
 		}
 	}
@@ -77,7 +77,7 @@ methodmap CustomAchievement {
 	 * client.
 	 */
 	public bool StoreMetadata(int client, const char[] metadata) {
-		if (IsClientAuthorized(client)) {
+		if (!IsFakeClient(client) && IsClientAuthorized(client)) {
 			return this.StoreMetadataByAccountID(GetSteamAccountID(client), metadata);
 		}
 		return false;