mirror of
https://github.com/Jackzmc/sourcemod-plugins.git
synced 2025-05-08 05:43:20 +00:00
add EnableTroll
This commit is contained in:
parent
72cac56b1a
commit
2c9f8d5077
2 changed files with 10 additions and 5 deletions
|
@ -198,6 +198,12 @@ bool IsTrollActive(int client, const char[] troll) {
|
|||
return false; //errors instead but compiler no like
|
||||
}
|
||||
|
||||
void EnableTroll(int client, const char[] troll) {
|
||||
if(!IsTrollActive(client, troll)) {
|
||||
ToggleTroll(client, troll);
|
||||
}
|
||||
}
|
||||
|
||||
void DisableTroll(int client, const char[] troll) {
|
||||
if(IsTrollActive(client, troll)) {
|
||||
ToggleTroll(client, troll);
|
||||
|
|
|
@ -396,12 +396,11 @@ public Action OnPlayerRunCmd(int client, int& buttons, int& impulse, float vel[3
|
|||
}
|
||||
|
||||
public Action Event_TakeDamage(int victim, int& attacker, int& inflictor, float& damage, int& damagetype) {
|
||||
//Stop FF from marked:
|
||||
if(attacker > 0 && attacker <= MaxClients && IsClientInGame(attacker) && IsPlayerAlive(attacker)) {
|
||||
if(g_PendingBanTroll[attacker] && GetClientTeam(attacker) == 2 && GetClientTeam(victim) == 2) {
|
||||
|
||||
//Stop FF from marked:
|
||||
if(g_PendingBanTroll[attacker] && GetClientTeam(attacker) == GetClientTeam(victim))
|
||||
return Plugin_Stop;
|
||||
}
|
||||
|
||||
if(IsTrollActive(attacker, "DamageBoost")) {
|
||||
damage * 2;
|
||||
return Plugin_Changed;
|
||||
|
@ -867,7 +866,7 @@ public int Insta_PlayerHandler(Menu menu, MenuAction action, int client, int par
|
|||
|
||||
Menu spMenu = new Menu(Insta_SpecialHandler);
|
||||
spMenu.SetTitle("Choose a Insta-Special™");
|
||||
for(int i = 1; i <= 6; i++) {
|
||||
for(int i = 0; i <= sizeof(SPECIAL_NAMES); i++) {
|
||||
static char id[8];
|
||||
Format(id, sizeof(id), "%d|%d|%d", userid, instaMode, i);
|
||||
spMenu.AddItem(id, SPECIAL_NAMES[i-1]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue