ItemSpawn: Clean up code.
This commit is contained in:
parent
cb137f0cac
commit
0f5f831445
@ -39,7 +39,7 @@ public void OnPluginStart()
|
||||
RegAdminCmd("sm_humandog", Command_HumanDog, ADMFLAG_KICK);
|
||||
RegAdminCmd("sm_vortigaunt", Command_Vortigaunt, ADMFLAG_KICK);
|
||||
RegAdminCmd("sm_whiteknight", Command_WhiteKnight, ADMFLAG_KICK);
|
||||
|
||||
|
||||
LoadTranslations("common.phrases");
|
||||
}
|
||||
|
||||
@ -192,19 +192,19 @@ public void OnRoundStart(Event hEvent, const char[] sEvent, bool bDontBroadcast)
|
||||
|
||||
// player_weaponstrip.
|
||||
int iPlayerStrip = CreateEntityByName("player_weaponstrip");
|
||||
DispatchKeyFormat(iPlayerStrip, "targetname", "item_spawn_weaponstrip");
|
||||
DispatchKeyFormat(iPlayerStrip, "targetname", "item_spawn_weaponstrip");
|
||||
SpawnAndActivate(iPlayerStrip);
|
||||
|
||||
// player_speedmod.
|
||||
int iPlayerSpeed = CreateEntityByName("player_speedmod");
|
||||
DispatchKeyFormat(iPlayerSpeed, "targetname", "item_spawn_speedmod");
|
||||
DispatchKeyFormat(iPlayerSpeed, "targetname", "item_spawn_speedmod");
|
||||
SpawnAndActivate(iPlayerSpeed);
|
||||
|
||||
// filter_activator_team humans.
|
||||
int iHumanFilter = CreateEntityByName("filter_activator_team");
|
||||
DispatchKeyFormat(iHumanFilter, "targetname", "item_spawn_human_filter");
|
||||
DispatchKeyFormat(iHumanFilter, "Negated", "0");
|
||||
DispatchKeyFormat(iHumanFilter, "filterteam", "3");
|
||||
DispatchKeyFormat(iHumanFilter, "targetname", "item_spawn_human_filter");
|
||||
DispatchKeyFormat(iHumanFilter, "Negated", "0");
|
||||
DispatchKeyFormat(iHumanFilter, "filterteam", "3");
|
||||
SpawnAndActivate(iHumanFilter);
|
||||
|
||||
// filter_activator_team zombies.
|
||||
|
@ -29,7 +29,7 @@ public Action Command_WhiteKnight(int client, int argc)
|
||||
|
||||
for (int i = 0; i < iTargetCount; i++)
|
||||
{
|
||||
if(IsClientInGame(iTargets[i]) && IsPlayerAlive(iTargets[i]) && (ZR_IsClientZombie(iTargets[i])))
|
||||
if(IsClientInGame(iTargets[i]) && IsPlayerAlive(iTargets[i]) && (ZR_IsClientHuman(iTargets[i])))
|
||||
{
|
||||
GetClientEyePosition(iTargets[i], fOrigin);
|
||||
SpawnWhiteKnight(fOrigin);
|
||||
|
Loading…
Reference in New Issue
Block a user