mirror of
https://github.com/Jackzmc/sourcemod-plugins.git
synced 2025-05-06 01:53:21 +00:00
ftt: Minor bug fixes
This commit is contained in:
parent
4002487677
commit
32dace5bf6
3 changed files with 13 additions and 6 deletions
Binary file not shown.
|
@ -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) {
|
||||
|
|
|
@ -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++;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue