diff --git a/ZombieRiot/scripting/unloze_zr.sp b/ZombieRiot/scripting/unloze_zr.sp index ee0d3005..983031d2 100644 --- a/ZombieRiot/scripting/unloze_zr.sp +++ b/ZombieRiot/scripting/unloze_zr.sp @@ -291,7 +291,7 @@ public Action ApplySettings(Event event, const char[] name, bool dontBroadcast) } else if (IsFakeClient(client)) //bot getting respawned as zm { - CreateTimer(1.0, Timer_delayedSelectWaveBasedZM, GetClientUserId(client)); + CreateTimer(0.3, Timer_delayedSelectWaveBasedZM, GetClientUserId(client)); } else { @@ -996,10 +996,13 @@ public Action Timer_FixKNife(Handle timer, any userid) CS_SetClientClanTag(client, tag); } - if (GetPlayerWeaponSlot(client, CS_SLOT_KNIFE) == -1) //just making sure everybody has a knife. otherwise giving them one + if (GetClientTeam(client) == CS_TEAM_T) { - GivePlayerItem(client, "weapon_knife"); - CreateTimer(1.0, Timer_SwitchKnife, GetClientOfUserId(client)); + if (GetPlayerWeaponSlot(client, CS_SLOT_KNIFE) == -1) //just making sure everybody has a knife. otherwise giving them one + { + GivePlayerItem(client, "weapon_knife"); + CreateTimer(1.0, Timer_SwitchKnife, GetClientOfUserId(client)); + } } } } @@ -1093,7 +1096,7 @@ public void Event_roundStart(Handle event, const char[] name, bool dontBroadcast { if (IsFakeClient(i)) { - CreateTimer(1.0, Timer_delayedSelectWaveBasedZM, GetClientUserId(i)); + CreateTimer(0.3, Timer_delayedSelectWaveBasedZM, GetClientUserId(i)); continue; } g_iClientRespawnCount[i] = g_iClientRespawnCountNum; //even if not spawned in yet it should be set for every real player. @@ -1327,6 +1330,7 @@ public void LoadWave(int wave) g_iWave = 1; PrintToChatAll("Finished last Day! Forcing map change..."); ServerCommand("sm_forcertv"); //old zombieRiot did this so just copying it + CS_TerminateRound(4.0, CSRoundEnd_CTWin, true); //without this it wont change map i guess? or at least without it they get a wave without settings set. } delete kv; delete kv1; @@ -1490,7 +1494,7 @@ public Action SelectWaveBasedZM(int client, int state) if (GetClientTeam(client) == CS_TEAM_CT) { ChangeClientTeam(client, CS_TEAM_T); //default putting bots to t - CreateTimer(1.0, Timer_delayedRespawn, GetClientUserId(client)); + CreateTimer(0.3, Timer_delayedRespawn, GetClientUserId(client)); return Plugin_Handled; } //state 0 was bot, state 1 was real player. @@ -1538,7 +1542,7 @@ public Action SelectWaveBasedZM(int client, int state) } //im just getting desperate at this point for fixing the client crash by adding random ass delays. - CreateTimer(1.0, Timer_delayedModelSelection, GetClientUserId(client)); + CreateTimer(0.3, Timer_delayedModelSelection, GetClientUserId(client)); return Plugin_Handled; } @@ -1748,11 +1752,17 @@ public Action Timer_StopProtection(Handle timer, any userid) if (IsValidClient(client) && IsPlayerAlive(client)) { g_bClientProtection[client] = false; - Client_ChangeWeapon(client, "weapon_knife"); + if (GetClientTeam(client) == CS_TEAM_T) + { + Client_ChangeWeapon(client, "weapon_knife"); + } if (GetPlayerWeaponSlot(client, CS_SLOT_KNIFE) == -1) //just making sure everybody has a knife. otherwise giving them one { GivePlayerItem(client, "weapon_knife"); - CreateTimer(1.0, Timer_SwitchKnife, GetClientOfUserId(client)); + if (GetClientTeam(client) == CS_TEAM_T) + { + CreateTimer(1.0, Timer_SwitchKnife, GetClientOfUserId(client)); + } } } return Plugin_Handled;