ftt: Minor bug fixes

This commit is contained in:
Jackzie 2021-09-24 08:07:40 -05:00
parent 4002487677
commit 32dace5bf6
No known key found for this signature in database
GPG key ID: 1E834FE36520537A
3 changed files with 13 additions and 6 deletions

Binary file not shown.

View file

@ -114,12 +114,12 @@ void ApplyTroll(int victim, const char[] name, int activator, trollModifier modi
if(!silent) {
if(IsTrollActive(victim, name)) {
ShowActivity(victim, "deactivated troll \"%s\" on %N. ", troll.name, victim);
ShowActivity(activator, "deactivated troll \"%s\" on %N. ", troll.name, victim);
} else {
if(modifier == TrollMod_Constant)
ShowActivity(victim, "activated constant troll \"%s\" for %N. ", troll.name, victim);
ShowActivity(activator, "activated constant troll \"%s\" for %N. ", troll.name, victim);
else
ShowActivity(victim, "activated troll \"%s\" for %N. ", troll.name, victim);
ShowActivity(activator, "activated troll \"%s\" for %N. ", troll.name, victim);
}
}
if(modifier == TrollMod_Constant) {

View file

@ -263,8 +263,12 @@ public Action Command_ListTheTrolls(int client, int args) {
int count = 0;
char[][] modeListArr = new char[MAX_TROLLS+1][MAX_TROLL_NAME_LENGTH];
static char modeList[255];
for(int i = 1; i < MaxClients; i++) {
if(IsClientConnected(i) && IsClientInGame(i) && IsPlayerAlive(i) && ActiveTrolls[i] > 0) {
for(int i = 1; i <= MaxClients; i++) {
if(IsClientConnected(i) && IsClientInGame(i) && GetClientTeam(i) > 1 && ActiveTrolls[i] > 0) {
if(IsFakeClient(i)) {
int player = GetRealClient(i);
if(player != -1) i = player;
}
int modeCount = 0;
static char name[MAX_TROLL_NAME_LENGTH];
for(int j = 1; j <= MAX_TROLLS; j++) {
@ -276,7 +280,10 @@ public Action Command_ListTheTrolls(int client, int args) {
}
ImplodeStrings(modeListArr, modeCount, ", ", modeList, sizeof(modeList));
ReplyToCommand(client, "%N | %s", i, modeList);
if(IsPlayerAlive(i))
ReplyToCommand(client, "%N | %s", i, modeList);
else
ReplyToCommand(client, "%N (Paused) | %s", i, modeList);
count++;
}
}