Skip to content

Commit

Permalink
Disable tp'ing to player who used /fight watch
Browse files Browse the repository at this point in the history
Fixes #137: Could be (ab)used to earn money and other dirty stuff.
  • Loading branch information
xhoogland committed Apr 2, 2016
1 parent 43ec98b commit 54dd30f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions pawn/Features/Gameplay/Teleportation/TeleportationManager.pwn
Expand Up @@ -204,6 +204,11 @@ class TeleportationManager {
SendClientMessage(playerId, Color::Error, "This player is currently in the Fightclub, use \"/fight watch\".");
return false;
}

if (LegacyIsPlayerWatchingFC(subjectId)) {
SendClientMessage(playerId, Color::Error, "This player is watching someone in the Fightclub.");
return false;
}
#endif

if (JailController->isPlayerJailed(subjectId) == true) {
Expand Down
9 changes: 8 additions & 1 deletion pawn/Resources/Games/FightClub.pwn
Expand Up @@ -1629,4 +1629,11 @@ CFightClub__ShowFCMessage(playerid, messageid)
return 1;
}
return 1;
}
}

bool: LegacyIsPlayerWatchingFC(playerId) {
if (IsPlayerWatchingFC[playerId])
return true;

return false;
}

0 comments on commit 54dd30f

Please sign in to comment.