diff --git a/plugins/200IQBots_FlyYouFools.smx b/plugins/200IQBots_FlyYouFools.smx index c95a7e0..f36a18d 100644 Binary files a/plugins/200IQBots_FlyYouFools.smx and b/plugins/200IQBots_FlyYouFools.smx differ diff --git a/plugins/l4d2_avoid_minigun.smx b/plugins/l4d2_avoid_minigun.smx index 5bd50c8..49b9ea6 100644 Binary files a/plugins/l4d2_avoid_minigun.smx and b/plugins/l4d2_avoid_minigun.smx differ diff --git a/plugins/l4d2_feedthetrolls.smx b/plugins/l4d2_feedthetrolls.smx index f775751..303e067 100644 Binary files a/plugins/l4d2_feedthetrolls.smx and b/plugins/l4d2_feedthetrolls.smx differ diff --git a/plugins/l4d2_swarm.smx b/plugins/l4d2_swarm.smx index 7a8cfd7..60bb2bd 100644 Binary files a/plugins/l4d2_swarm.smx and b/plugins/l4d2_swarm.smx differ diff --git a/scripting/200IQBots_FlyYouFools.sp b/scripting/200IQBots_FlyYouFools.sp index 77f8fe9..286c07e 100644 --- a/scripting/200IQBots_FlyYouFools.sp +++ b/scripting/200IQBots_FlyYouFools.sp @@ -51,7 +51,7 @@ public void Event_TankSpawn(Event event, const char[] name, bool dontBroadcast) int userID = GetClientOfUserId(GetEventInt(event, "userid")); bIsTank[userID] = true; if(iAliveTanks == 0 && !bEscapeReady) { - CreateTimer(0.1, BotControlTimerV2, _, TIMER_REPEAT); + CreateTimer(0.1, BotControlTimerV2, _, TIMER_REPEAT | TIMER_FLAG_NO_MAPCHANGE); } iAliveTanks++; } @@ -154,7 +154,7 @@ public void FindExistingTank() { } if(iAliveTanks > 0) { - CreateTimer(0.1, BotControlTimerV2, _, TIMER_REPEAT); + CreateTimer(0.1, BotControlTimerV2, _, TIMER_REPEAT | TIMER_FLAG_NO_MAPCHANGE); } } diff --git a/scripting/l4d2_avoid_minigun.sp b/scripting/l4d2_avoid_minigun.sp index 84380cb..566bc6c 100644 --- a/scripting/l4d2_avoid_minigun.sp +++ b/scripting/l4d2_avoid_minigun.sp @@ -34,7 +34,7 @@ public void OnPluginStart() { SetFailState("This plugin is for L4D/L4D2 only."); } - CreateTimer(2.0, CheckTimer, _, TIMER_REPEAT); + CreateTimer(5.0, CheckTimer, _, TIMER_REPEAT); HookEvent("player_team", Event_PlayerTeamSwitch); } @@ -68,7 +68,7 @@ public void Event_PlayerTeamSwitch(Event event, const char[] name, bool dontBroa public Action CheckTimer(Handle timer) { //Don't do any processing if no one is connected. - //optimization: Only update player-based positions ever 5 loops (2 * 5 = 10 seconds) + //optimization: Only update player-based positions ever 5 loops (5 * 5 = 25 seconds) static int timer_update_pos; if(GetClientCount(true) == 0) return Plugin_Continue; float pos[3], ang[3], botPos[3], center_distance; diff --git a/scripting/l4d2_feedthetrolls.sp b/scripting/l4d2_feedthetrolls.sp index d3a14cb..895645c 100644 --- a/scripting/l4d2_feedthetrolls.sp +++ b/scripting/l4d2_feedthetrolls.sp @@ -20,11 +20,12 @@ 3 -> Set primary reserve ammo in half 4 -> UziRules (Pickup weapon defaults to uzi) 5 -> PrimaryDisable (Cannot pickup primary weapons at all) -6 -> Slow Drain -7 -> Clusmy -8 -> IcantSpellNoMore -9 -> CameTooEarly -10 -> KillMeSoftly +6 -> Slow Drain (Slowly drains hp over time) +7 -> Clusmy (Drops their melee weapon) +8 -> IcantSpellNoMore (Chat messages letter will randomly changed with wrong letters ) +9 -> CameTooEarly (When they shoot, they empty the whole clip at once.) +10 -> KillMeSoftly (Make player eat or waste pills whenever) +11 -> ThrowItAll (Makes player just throw all their items at a nearby player, and periodically) */ #define TROLL_MODE_COUNT 12 static const char TROLL_MODES_NAMES[TROLL_MODE_COUNT][32] = { @@ -52,7 +53,7 @@ public Plugin myinfo = }; Handle hThrowTimer; ConVar hVictimsList, hThrowItemInterval; -bool bTrollTargets[MAXPLAYERS+1], lateLoaded, bTimerEnabled = false; +bool bTrollTargets[MAXPLAYERS+1], lateLoaded; int iTrollMode = 0; //troll mode. 0 -> Slosdown | 1 -> Higher Gravity | 2 -> CameTooEarly | 3 -> UziRules int g_iAmmoTable; @@ -108,7 +109,7 @@ public void Change_ThrowInterval(ConVar convar, const char[] oldValue, const cha if(hThrowTimer != INVALID_HANDLE) { delete hThrowTimer; PrintToServer("Reset new throw item timer"); - hThrowTimer = CreateTimer(convar.FloatValue, Timer_ThrowTimer, _, TIMER_REPEAT); + hThrowTimer = CreateTimer(convar.FloatValue, Timer_ThrowTimer, _, TIMER_REPEAT | TIMER_FLAG_NO_MAPCHANGE); } } // #endregion @@ -329,17 +330,16 @@ void ApplyModeToClient(int client, int victim, int mode) { int clientCount = GetClientsInRange(pos, RangeType_Visibility, clients, sizeof(clients)); for(int i = 0; i < clientCount; i++) { if(clients[i] != victim) { - PrintToChatAll("client %d throw to %d", victim, clients[i]); float targPos[3]; GetClientAbsOrigin(clients[i], targPos); SDKHooks_DropWeapon(victim, wpn, targPos); iTrollUsers[victim] = mode; + CreateTimer(0.2, Timer_GivePistol); return; } } SDKHooks_DropWeapon(victim, wpn); } - ReplyToCommand(client, "res = %d" , hasMelee ? 1 : 0); } case 8: ReplyToCommand(client, "This troll mode is not implemented."); @@ -469,10 +469,6 @@ bool TestForTarget(int client, const char[] auth) { PrintToServer("[Debug] Troll target detected with id %d and steamid %s", client, auth); #endif bTrollTargets[client] = true; - if(!bTimerEnabled) { - bTimerEnabled = true; - - } return true; } } diff --git a/scripting/l4d2_swarm.sp b/scripting/l4d2_swarm.sp index df38916..76f8c16 100644 --- a/scripting/l4d2_swarm.sp +++ b/scripting/l4d2_swarm.sp @@ -159,7 +159,7 @@ public Action Cmd_SwarmToggle(int client, int args) { SwarmUser(GetClientUserId(target_list[0]), range); ReplyToCommand(client, "Now continously swarming victim %N. Radius: %d", target_list[0], range); if(timer == INVALID_HANDLE) - timer = CreateTimer(1.0, Timer_Swarm, _, TIMER_REPEAT); + timer = CreateTimer(1.0, Timer_Swarm, _, TIMER_REPEAT | TIMER_FLAG_NO_MAPCHANGE); } } return Plugin_Handled; @@ -230,7 +230,7 @@ public int Handle_SwarmMenuToggle(Menu menu, MenuAction action, int client, int int clientID = GetClientOfUserId(SwarmTarget); PrintToChat(client, "Toggled swarm on for %N (#%d). Radius: %d", clientID, SwarmTarget, SwarmRadius); if(timer == INVALID_HANDLE) - timer = CreateTimer(1.0, Timer_Swarm, _, TIMER_REPEAT); + timer = CreateTimer(1.0, Timer_Swarm, _, TIMER_REPEAT | TIMER_FLAG_NO_MAPCHANGE); }else{ SwarmTarget = -1; SwarmRadius = hSwarmDefaultRange.IntValue;