Raised This Month: $32 Target: $400
 8% 

(L4D2)Need some help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
a7878463
Junior Member
Join Date: Jun 2018
Old 08-09-2018 , 09:16   (L4D2)Need some help
Reply With Quote #1

Can be changed this plugin to no any public word. thanks




public PlVers:__version =
{
version = 5,
filevers = "1.7.0-dev+4894",
date = "05/23/2016",
time = "19:018"
};
new Float:NULL_VECTOR[3];
new String:NULL_STRING[4];
public Extension:__ext_core =
{
name = "Core",
file = "core",
autoload = 0,
required = 0,
};
new MaxClients;
public Extension:__ext_sdktools =
{
name = "SDKTools",
file = "sdktools.ext",
autoload = 1,
required = 1,
};
new bool:CEventIsHooked;
new bool:CSkipList[66];
new String:CTag[6][] =
{
"",
"",
"",
"",
"",
""
};
new String:CTagCode[6][16];
new bool:CTagReqSayText2[6];
new bool:CProfile_Colors[6] =
{
1, 1, 0, 0, 0, 0
};
new CProfile_TeamIndex[6] =
{
-1, ...
};
new bool:CProfile_SayText2;
new Handle:hTimerAchieved[66];
new Handle:hTimerMiniFireworks[66];
new Handle:hTimerLoopEffect[66];
new Handle:MSG_CISHU;
new Handle:KillTeGan;
new HeadShot[66];
new HUDON[66];
new ZoomZedTime[66];
new bool:Enable[66];
new bool:ZoomOn[66];
new fovmin = 10;
new fovmax = 90;
new String:CurrentWeapon[20][32];
new String:CurrentWeaponName[20][32];
public Plugin:myinfo =
{
name = "L4D2_KillTeGanSMG",
description = "-",
author = "-",
version = "-",
url = "http://pan.baidu.com/s/1c0CNIxU"
};
public __ext_core_SetNTVOptional()
{
MarkNativeAsOptional("GetFeatureStatus");
MarkNativeAsOptional("RequireFeature");
MarkNativeAsOptional("AddCommandListener");
MarkNativeAsOptional("RemoveCommandListener") ;
MarkNativeAsOptional("BfWriteBool");
MarkNativeAsOptional("BfWriteByte");
MarkNativeAsOptional("BfWriteChar");
MarkNativeAsOptional("BfWriteShort");
MarkNativeAsOptional("BfWriteWord");
MarkNativeAsOptional("BfWriteNum");
MarkNativeAsOptional("BfWriteFloat");
MarkNativeAsOptional("BfWriteString");
MarkNativeAsOptional("BfWriteEntity");
MarkNativeAsOptional("BfWriteAngle");
MarkNativeAsOptional("BfWriteCoord");
MarkNativeAsOptional("BfWriteVecCoord");
MarkNativeAsOptional("BfWriteVecNormal");
MarkNativeAsOptional("BfWriteAngles");
MarkNativeAsOptional("BfReadBool");
MarkNativeAsOptional("BfReadByte");
MarkNativeAsOptional("BfReadChar");
MarkNativeAsOptional("BfReadShort");
MarkNativeAsOptional("BfReadWord");
MarkNativeAsOptional("BfReadNum");
MarkNativeAsOptional("BfReadFloat");
MarkNativeAsOptional("BfReadString");
MarkNativeAsOptional("BfReadEntity");
MarkNativeAsOptional("BfReadAngle");
MarkNativeAsOptional("BfReadCoord");
MarkNativeAsOptional("BfReadVecCoord");
MarkNativeAsOptional("BfReadVecNormal");
MarkNativeAsOptional("BfReadAngles");
MarkNativeAsOptional("BfGetNumBytesLeft");
MarkNativeAsOptional("PbReadInt");
MarkNativeAsOptional("PbReadFloat");
MarkNativeAsOptional("PbReadBool");
MarkNativeAsOptional("PbReadString");
MarkNativeAsOptional("PbReadColor");
MarkNativeAsOptional("PbReadAngle");
MarkNativeAsOptional("PbReadVector");
MarkNativeAsOptional("PbReadVector2D");
MarkNativeAsOptional("PbGetRepeatedFieldCount ");
MarkNativeAsOptional("PbSetInt");
MarkNativeAsOptional("PbSetFloat");
MarkNativeAsOptional("PbSetBool");
MarkNativeAsOptional("PbSetString");
MarkNativeAsOptional("PbSetColor");
MarkNativeAsOptional("PbSetAngle");
MarkNativeAsOptional("PbSetVector");
MarkNativeAsOptional("PbSetVector2D");
MarkNativeAsOptional("PbAddInt");
MarkNativeAsOptional("PbAddFloat");
MarkNativeAsOptional("PbAddBool");
MarkNativeAsOptional("PbAddString");
MarkNativeAsOptional("PbAddColor");
MarkNativeAsOptional("PbAddAngle");
MarkNativeAsOptional("PbAddVector");
MarkNativeAsOptional("PbAddVector2D");
MarkNativeAsOptional("PbRemoveRepeatedFieldVa lue");
MarkNativeAsOptional("PbReadMessage");
MarkNativeAsOptional("PbReadRepeatedMessage") ;
MarkNativeAsOptional("PbAddMessage");
VerifyCoreVersion();
return 0;
}

Floatperator+(Float:,_(Floatper1, oper2)
{
return oper1 + float(oper2);
}

boolperator>(Float:,_(Floatper1, oper2)
{
return oper1 > float(oper2);
}

bool:StrEqual(String:str1[], String:str2[], bool:caseSensitive)
{
return strcmp(str1, str2, caseSensitive) == 0;
}

Handle:CreateDataTimer(Float:interval, Timer:func, &Handle:datapack, flags)
{
datapack = CreateDataPack();
flags |= 512;
return CreateTimer(interval, func, datapack, flags);
}

PrintToChatAll(String:format[])
{
decl String:buffer[192];
new i = 1;
while (i <= MaxClients)
{
if (IsClientInGame(i))
{
SetGlobalTransTarget(i);
VFormat(buffer, 192, format, 2);
PrintToChat(i, "%s", buffer);
}
i++;
}
return 0;
}

EmitSoundToClient(client, String:sample[], entity, channel, level, flags, Float:volume, pitch, speakerentity, Floatrigin[3], Float:dir[3], bool:updatePos, Float:soundtime)
{
new clients[1];
clients[0] = client;
new var1;
if (entity == -2)
{
var1 = client;
}
else
{
var1 = entity;
}
entity = var1;
EmitSound(clients, 1, sample, entity, channel, level, flags, volume, pitch, speakerentity, origin, dir, updatePos, soundtime);
return 0;
}

CSetupProfile()
{
decl String:szGameName[32];
GetGameFolderName(szGameName, 30);
if (StrEqual(szGameName, "cstrike", false))
{
CProfile_Colors[2] = 1;
CProfile_Colors[3] = 1;
CProfile_Colors[4] = 1;
CProfile_Colors[5] = 1;
CProfile_TeamIndex[2] = 0;
CProfile_TeamIndex[3] = 2;
CProfile_TeamIndex[4] = 3;
CProfile_SayText2 = true;
}
else
{
if (StrEqual(szGameName, "tf", false))
{
CProfile_Colors[2] = 1;
CProfile_Colors[3] = 1;
CProfile_Colors[4] = 1;
CProfile_Colors[5] = 1;
CProfile_TeamIndex[2] = 0;
CProfile_TeamIndex[3] = 2;
CProfile_TeamIndex[4] = 3;
CProfile_SayText2 = true;
}
new var1;
if (StrEqual(szGameName, "left4dead", false) || StrEqual(szGameName, "left4dead2", false))
{
CProfile_Colors[2] = 1;
CProfile_Colors[3] = 1;
CProfile_Colors[4] = 1;
CProfile_Colors[5] = 1;
CProfile_TeamIndex[2] = 0;
CProfile_TeamIndex[3] = 3;
CProfile_TeamIndex[4] = 2;
CProfile_SayText2 = true;
}
if (StrEqual(szGameName, "hl2mp", false))
{
if (GetConVarBool(FindConVar("mp_teamplay")))
{
CProfile_Colors[3] = 1;
CProfile_Colors[4] = 1;
CProfile_TeamIndex[3] = 3;
CProfile_TeamIndex[4] = 2;
CProfile_SayText2 = true;
}
else
{
CProfile_SayText2 = false;
}
}
if (StrEqual(szGameName, "dod", false))
{
CProfile_Colors[5] = 1;
CProfile_SayText2 = false;
}
if (GetUserMessageId("SayText2") == -1)
{
CProfile_SayText2 = false;
}
CProfile_Colors[3] = 1;
CProfile_Colors[4] = 1;
CProfile_TeamIndex[3] = 2;
CProfile_TeamIndex[4] = 3;
CProfile_SayText2 = true;
}
return 0;
}

public Action:CEvent_MapStart(Handle:event, String:name[], bool:dontBroadcast)
{
CSetupProfile();
new i = 1;
while (i <= MaxClients)
{
CEventIsHooked[i] = false;
i++;
}
return Action:0;
}

SetupMapStrings()
{
RegConsoleCmd("sm_hud", Menu_HUD, "", 0);
HookEvent("player_spawn", PlayerSpawnEvent, EventHookMode:1);
HookEvent("player_death", Event_PlayerDeath, EventHookMode:1);
HookEvent("finale_win", Event_FinaleWin, EventHookMode:1);
HookEvent("round_start", Event_RoundStart, EventHookMode:1);
new var1 = CurrentWeapon;
Format(var1[0][var1], 32, "weapon_rifle");
Format(CurrentWeapon[1], 32, "weapon_rifle_ak47");
Format(CurrentWeapon[2], 32, "weapon_rifle_desert");
Format(CurrentWeapon[3], 32, "weapon_smg");
Format(CurrentWeapon[4], 32, "weapon_smg_mp5");
Format(CurrentWeapon[5], 32, "weapon_smg_silenced");
Format(CurrentWeapon[6], 32, "weapon_rifle_sg552");
Format(CurrentWeapon[7], 32, "weapon_sniper_awp");
Format(CurrentWeapon[8], 32, "weapon_sniper_scout");
Format(CurrentWeapon[9], 32, "weapon_hunting_rifle");
Format(CurrentWeapon[10], 32, "weapon_sniper_military");
Format(CurrentWeapon[11], 32, "weapon_pumpshotgun");
Format(CurrentWeapon[12], 32, "weapon_shotgun_chrome");
Format(CurrentWeapon[13], 32, "weapon_autoshotgun");
Format(CurrentWeapon[14], 32, "weapon_shotgun_spas");
Format(CurrentWeapon[15], 32, "weapon_pistol");
Format(CurrentWeapon[16], 32, "weapon_pistol_magnum");
Format(CurrentWeapon[17], 32, "weapon_grenade_launcher");
Format(CurrentWeapon[18], 32, "weapon_rifle_m60");
Format(CurrentWeapon[19], 32, "weapon_melee");
new var2 = CurrentWeaponName;
Format(var2[0][var2], 32, "M16");
Format(CurrentWeaponName[1], 32, "AK47");
Format(CurrentWeaponName[2], 32, "沙漠步枪");
Format(CurrentWeaponName[3], 32, "冲锋枪");
Format(CurrentWeaponName[4], 32, "MP5");
Format(CurrentWeaponName[5], 32, "消音冲锋枪");
Format(CurrentWeaponName[6], 32, "SG552");
Format(CurrentWeaponName[7], 32, "重阻AWP");
Format(CurrentWeaponName[8], 32, "轻阻Scout");
Format(CurrentWeaponName[9], 32, "一代连阻");
Format(CurrentWeaponName[10], 32, "二代连狙");
Format(CurrentWeaponName[11], 32, "一代单喷");
Format(CurrentWeaponName[12], 32, "二代单喷");
Format(CurrentWeaponName[13], 32, "一代连喷");
Format(CurrentWeaponName[14], 32, "二代连喷");
Format(CurrentWeaponName[15], 32, "手枪");
Format(CurrentWeaponName[16], 32, "沙漠之鹰");
Format(CurrentWeaponName[17], 32, "榴弹炮");
Format(CurrentWeaponName[18], 32, "机枪M60");
Format(CurrentWeaponName[19], 32, "近战");
return 0;
}

public Action:MSGAllPlayer(Handle:timer, any:Client)
{
static TiShiNum;
if (GetConVarInt(MSG_CISHU) <= TiShiNum)
{
TiShiNum = 0;
KillTimer(timer, false);
}
new var1;
if (IsValidPlayer(Client, true, true) && !IsFakeClient(Client) && GetClientTeam(Client) == 2)
{
new SMGSJ = GetRandomInt(1, 4);
switch (SMGSJ)
{
case 1:
{
PrintToChat(Client, "\x03【指令】\x01[杀敌提示-!hud]");
}
case 2:
{
PrintToChat(Client, "\x05【指令】\x04[杀敌提示-!hud]");
}
case 3:
{
PrintToChat(Client, "\x04【指令】\x03[杀敌提示-!hud]");
}
case 4:
{
PrintToChat(Client, "\x01【指令】\x05[杀敌提示-!hud]");
}
default:
{
}
}
}
TiShiNum += 1;
return Action:0;
}

bool:IsValidPlayer(Client, bool:AllowBot, bool:AllowDeath)
{
new var1;
if (Client < 1 || Client > MaxClients)
{
return false;
}
new var2;
if (!IsClientConnected(Client) || !IsClientInGame(Client))
{
return false;
}
if (!AllowBot)
{
if (IsFakeClient(Client))
{
return false;
}
}
if (!AllowDeath)
{
if (!IsPlayerAlive(Client))
{
return false;
}
}
return true;
}

public Action:tmrRemoveInstructorHint(Handle:h_Timer , any:entity)
{
if (entity != any:-1)
{
AcceptEntityInput(entity, "kill", -1, -1, 0);
}
return Action:0;
}

ChongZhi()
{
new i = 1;
while (i <= MaxClients)
{
HUDON[i] = 0;
ZoomZedTime[i] = 0;
i++;
}
return 0;
}

public Action:Menu_HUD(Client, args)
{
new var1;
if (IsPlayerAlive(Client) && IsClientInGame(Client))
{
MenuFunc_HUDMSG(Client);
}
else
{
PrintHintText(Client, "角色死亡或旁观\n无法打开菜单");
EmitSoundToClient(Client, "ui/beep_error01.wav", -2, 0, 75, 0, 1.0, 100, -1, NULL_VECTOR, NULL_VECTOR, true, 0.0);
}
return Action;
}

public Action:MenuFunc_HUDMSG(Client)
{
new Handle:menu = CreateMenu(MenuHandler_HUDMSG, MenuAction:2;
decl String:line[1024];
SetMenuTitle(menu, "【杀敌提示】\n只对自己提示\n如开启提示,将\n自动关闭HUD爆头显示");
Format(line, 1024, "开启彩色大字\n显示(武器|距离)");
AddMenuItem(menu, "Option1", line, 0);
Format(line, 1024, "开启提示框\n显示(武器|距离)");
AddMenuItem(menu, "Option2", line, 0);
Format(line, 1024, "开启准心处\n显示(武器|距离)");
AddMenuItem(menu, "Option3", line, 0);
AddMenuItem(menu, "Option4", "关闭以上提示", 0);
AddMenuItem(menu, "Option5", "开启爆头镜头", 0);
AddMenuItem(menu, "Option6", "关闭爆头镜头", 0);
SetMenuExitButton(menu, true);
DisplayMenu(menu, Client, 0);
return Action;
}

public MenuHandler_HUDMSG(Handle:menu, MenuAction:action, Client, itemNum)
{
if (action == MenuAction:4)
{
switch (itemNum)
{
case 0:
{
if (HUDON[Client])
{
PrintHintText(Client, "提示已开启\n如需重新选择\n请关闭再选择");
EmitSoundToClient(Client, "ui/beep_error01.wav", -2, 0, 75, 0, 1.0, 100, -1, NULL_VECTOR, NULL_VECTOR, true, 0.0);
}
else
{
HUD_ON(Client);
HUDON[Client] += 1;
MenuFunc_HUDMSG(Client);
EmitSoundToClient(Client, "npc/moustachio/strengthattract02.wav", -2, 0, 75, 0, 1.0, 100, -1, NULL_VECTOR, NULL_VECTOR, true, 0.0);
}
}
case 1:
{
if (HUDON[Client])
{
PrintHintText(Client, "提示已开启\n如需重新选择\n请关闭再选择");
EmitSoundToClient(Client, "ui/beep_error01.wav", -2, 0, 75, 0, 1.0, 100, -1, NULL_VECTOR, NULL_VECTOR, true, 0.0);
}
else
{
HUD_ON(Client);
HUDON[Client] += 2;
MenuFunc_HUDMSG(Client);
EmitSoundToClient(Client, "npc/moustachio/strengthattract02.wav", -2, 0, 75, 0, 1.0, 100, -1, NULL_VECTOR, NULL_VECTOR, true, 0.0);
}
}
case 2:
{
if (HUDON[Client])
{
PrintHintText(Client, "提示已开启\n如需重新选择\n请关闭再选择");
EmitSoundToClient(Client, "ui/beep_error01.wav", -2, 0, 75, 0, 1.0, 100, -1, NULL_VECTOR, NULL_VECTOR, true, 0.0);
}
else
{
HUD_ON(Client);
HUDON[Client] += 3;
MenuFunc_HUDMSG(Client);
EmitSoundToClient(Client, "npc/moustachio/strengthattract02.wav", -2, 0, 75, 0, 1.0, 100, -1, NULL_VECTOR, NULL_VECTOR, true, 0.0);
}
}
case 3:
{
if (0 < HUDON[Client])
{
HUD_OFF(Client);
HUDON[Client] = 0;
MenuFunc_HUDMSG(Client);
EmitSoundToClient(Client, "ui/pickup_secret01.wav", -2, 0, 75, 0, 1.0, 100, -1, NULL_VECTOR, NULL_VECTOR, true, 0.0);
}
else
{
PrintHintText(Client, "提示已关闭\n无需重复");
EmitSoundToClient(Client, "ui/beep_error01.wav", -2, 0, 75, 0, 1.0, 100, -1, NULL_VECTOR, NULL_VECTOR, true, 0.0);
}
}
case 4:
{
if (ZoomZedTime[Client])
{
MenuFunc_HUDMSG(Client);
PrintHintText(Client, "爆头镜头已开启\n无需重复");
EmitSoundToClient(Client, "ui/beep_error01.wav", -2, 0, 75, 0, 1.0, 100, -1, NULL_VECTOR, NULL_VECTOR, true, 0.0);
}
else
{
ZoomZedTime[Client] += 1;
EmitSoundToClient(Client, "npc/moustachio/strengthattract02.wav", -2, 0, 75, 0, 1.0, 100, -1, NULL_VECTOR, NULL_VECTOR, true, 0.0);
PrintHintText(Client, "已开启爆头镜头");
MenuFunc_HUDMSG(Client);
}
}
case 5:
{
if (ZoomZedTime[Client] == 1)
{
EmitSoundToClient(Client, "ui/pickup_secret01.wav", -2, 0, 75, 0, 1.0, 100, -1, NULL_VECTOR, NULL_VECTOR, true, 0.0);
ZoomZedTime[Client] = 0;
MenuFunc_HUDMSG(Client);
PrintHintText(Client, "已关闭爆头镜头");
}
else
{
MenuFunc_HUDMSG(Client);
PrintHintText(Client, "爆头镜头已关闭\n无需重复");
EmitSoundToClient(Client, "ui/beep_error01.wav", -2, 0, 75, 0, 1.0, 100, -1, NULL_VECTOR, NULL_VECTOR, true, 0.0);
}
}
default:
{
}
}
}
return 0;
}

public HUD_ON(Client)
{
decl String:sBuffer[100];
decl String:sTargetName[32];
Format(sBuffer, 100, "[杀敌提示]已开启,如果不需要,请选择关闭");
ReplaceString(sBuffer, 100, "\n", " ", true);
new entity = CreateEntityByName("env_instructor_hint", -1);
FormatEx(sTargetName, 32, "hint%d", Client);
DispatchKeyValue(Client, "targetname", sTargetName);
DispatchKeyValue(entity, "hint_target", sTargetName);
DispatchKeyValue(entity, "hint_timeout", "8");
DispatchKeyValue(entity, "hint_range", "0.01");
DispatchKeyValue(entity, "hint_icon_onscreen", "icon_info");
DispatchKeyValue(entity, "hint_caption", sBuffer);
DispatchKeyValue(entity, "hint_color", "255, 255, 0");
DispatchSpawn(entity);
AcceptEntityInput(entity, "ShowHint", -1, -1, 0);
CreateTimer(8.0, tmrRemoveInstructorHint, EntIndexToEntRef(entity), 0);
return 0;
}

public HUD_OFF(Client)
{
decl String:sBuffer[100];
decl String:sTargetName[32];
Format(sBuffer, 100, "[杀敌提示]已关闭,如果需要,请重新开启");
ReplaceString(sBuffer, 100, "\n", " ", true);
new entity = CreateEntityByName("env_instructor_hint", -1);
FormatEx(sTargetName, 32, "hint%d", Client);
DispatchKeyValue(Client, "targetname", sTargetName);
DispatchKeyValue(entity, "hint_target", sTargetName);
DispatchKeyValue(entity, "hint_timeout", "8");
DispatchKeyValue(entity, "hint_range", "0.01");
DispatchKeyValue(entity, "hint_icon_onscreen", "icon_info");
DispatchKeyValue(entity, "hint_caption", sBuffer);
DispatchKeyValue(entity, "hint_color", "255, 255, 0");
DispatchSpawn(entity);
AcceptEntityInput(entity, "ShowHint", -1, -1, 0);
CreateTimer(8.0, tmrRemoveInstructorHint, EntIndexToEntRef(entity), 0);
return 0;
}

Handle:AttachParticle(ent, String:particleType[], Float:time)
{
if (ent < 1)
{
return Handle:0;
}
new particle = CreateEntityByName("info_particle_system", -1);
if (IsValidEdict(particle))
{
decl String:tName[32];
new Float:pos[3] = 0.0;
GetEntPropVector(ent, PropType:0, "m_vecOrigin", pos, 0);
pos[2] += 60;
Format(tName, 32, "target%i", ent);
DispatchKeyValue(ent, "targetname", tName);
DispatchKeyValue(particle, "targetname", "tf2particle");
DispatchKeyValue(particle, "parentname", tName);
DispatchKeyValue(particle, "effect_name", particleType);
if (DispatchSpawn(particle))
{
TeleportEntity(particle, pos, NULL_VECTOR, NULL_VECTOR);
SetVariantString(tName);
AcceptEntityInput(particle, "SetParent", particle, particle, 0);
SetVariantString("OnUser1 !self,Start,,0.0,-1");
AcceptEntityInput(particle, "AddOutput", -1, -1, 0);
SetVariantString("OnUser2 !self,Stop,,4.0,-1");
AcceptEntityInput(particle, "AddOutput", -1, -1, 0);
ActivateEntity(particle);
AcceptEntityInput(particle, "FireUser1", -1, -1, 0);
AcceptEntityInput(particle, "FireUser2", -1, -1, 0);
new Handle:pack;
new Handle:hTimer = CreateDataTimer(time, DeleteParticle2, pack, 0);
WritePackCell(pack, particle);
WritePackString(pack, particleType);
WritePackCell(pack, ent);
new Handle:packLoop;
hTimerLoopEffect[ent] = CreateDataTimer(4.2, LoopParticleEffect, packLoop, 1);
WritePackCell(packLoop, particle);
WritePackCell(packLoop, ent);
return hTimer;
}
if (IsValidEdict(particle))
{
RemoveEdict(particle);
}
return Handle:0;
}
return Handle:0;
}

public ActioneleteParticle2(Handle:timer, Handle:pack)
{
decl String:particleType[32];
ResetPack(pack, false);
new particle = ReadPackCell(pack);
ReadPackString(pack, particleType, 32);
new client = ReadPackCell(pack);
if (hTimerLoopEffect[client])
{
KillTimer(hTimerLoopEffect[client], false);
hTimerLoopEffect[client] = 0;
}
if (IsValidEntity(particle))
{
decl String:classname[128];
GetEdictClassname(particle, classname, 12;
if (StrEqual(classname, "info_particle_system", false))
{
RemoveEdict(particle);
}
}
if (StrEqual(particleType, "achieved", true))
{
hTimerAchieved[client] = 0;
}
else
{
if (StrEqual(particleType, "mini_fireworks", true))
{
hTimerMiniFireworks[client] = 0;
}
}
return Action:0;
}

public Action:LoopParticleEffect(Handle:timer, Handle:pack)
{
ResetPack(pack, false);
new particle = ReadPackCell(pack);
new client = ReadPackCell(pack);
if (IsValidEntity(particle))
{
decl String:classname[128];
GetEdictClassname(particle, classname, 12;
if (StrEqual(classname, "info_particle_system", false))
{
AcceptEntityInput(particle, "FireUser1", -1, -1, 0);
AcceptEntityInput(particle, "FireUser2", -1, -1, 0);
return Action:0;
}
}
hTimerLoopEffect[client] = 0;
return Action:4;
}

public Action:Timer_KillZoom(Handle:timer, any:attacker)
{
Zoom(attacker, 90);
return Action:0;
}

Zoom(client, step)
{
new fov;
decl String:weapo[32];
GetClientWeapon(client, weapo, 32);
new var1;
if (StrEqual(weapo, "weapon_hunting_rifle", true) || StrContains(weapo, "sniper", true) >= 0)
{
fov = GetEntProp(client, PropType:0, "m_iFOV", 4, 0);
if (!fov)
{
fov = 90;
}
fov = step + fov;
if (fov > fovmax)
{
fov = fovmax;
}
if (fov < fovmin)
{
fov = fovmin;
}
SetEntProp(client, PropType:0, "m_iFOV", fov, 4, 0);
ZoomOn[client] = 0;
}
else
{
fov = GetEntProp(client, PropType:0, "m_iFOV", 4, 0);
if (!fov)
{
fov = 90;
}
fov = step + fov;
if (fov > fovmax)
{
fov = fovmax;
}
if (fov < fovmin)
{
fov = fovmin;
}
if (fov == 90)
{
SetEntProp(client, PropType:0, "m_bDrawViewmodel", any:1, 4, 0);
}
else
{
SetEntProp(client, PropType:0, "m_bDrawViewmodel", any:0, 4, 0);
}
SetEntProp(client, PropType:0, "m_iFOV", fov, 4, 0);
ZoomOn[client] = 1;
}
return 0;
}

public HeadShot_HUD(attacker)
{
decl String:sBuffer[100];
decl String:sTargetName[32];
Format(sBuffer, 100, "爆头+%d", HeadShot[attacker]);
ReplaceString(sBuffer, 100, "\n", " ", true);
new entity = CreateEntityByName("env_instructor_hint", -1);
FormatEx(sTargetName, 32, "hint%d", attacker);
DispatchKeyValue(attacker, "targetname", sTargetName);
DispatchKeyValue(entity, "hint_target", sTargetName);
DispatchKeyValue(entity, "hint_timeout", "8");
DispatchKeyValue(entity, "hint_range", "0.01");
DispatchKeyValue(entity, "hint_icon_onscreen", "icon_skull");
DispatchKeyValue(entity, "hint_caption", sBuffer);
new SJYS = GetRandomInt(1, 5);
switch (SJYS)
{
case 1:
{
DispatchKeyValue(entity, "hint_color", "255, 128, 0");
}
case 2:
{
DispatchKeyValue(entity, "hint_color", "255, 255, 128");
}
case 3:
{
DispatchKeyValue(entity, "hint_color", "255, 255, 255");
}
case 4:
{
DispatchKeyValue(entity, "hint_color", "255, 255, 0");
}
case 5:
{
DispatchKeyValue(entity, "hint_color", "0, 255, 0");
}
default:
{
}
}
DispatchSpawn(entity);
AcceptEntityInput(entity, "ShowHint", -1, -1, 0);
CreateTimer(8.0, tmrRemoveInstructorHint, EntIndexToEntRef(entity), 0);
return 0;
}

RoundStart_DelData()
{
new i = 1;
while (i <= MaxClients)
{
HeadShot[i] = 0;
i++;
}
return 0;
}

public void:OnPluginStart()
{
KillTeGan = CreateConVar("Kill_TeGan", "1", "提示干掉特感信息(0 = 关闭(仅关闭聊天栏提示) 1 = 聊天栏提示(武器|距离|名字|爆头声)", 262464, false, 0.0, false, 0.0);
MSG_CISHU = CreateConVar("MSG_CISHU", "10", "每40秒发送一条菜单指令提示,总共提示多少次", 262464, true, 1.0, false, 0.0);
AutoExecConfig(true, "L4D2_KillTeGanSMG", "sourcemod");
SetupMapStrings();
return void:0;
}

public void:OnMapStart()
{
PrecacheSound("ui/beep_error01.wav", true);
PrecacheSound("ui/pickup_secret01.wav", true);
PrecacheSound("npc/moustachio/strengthattract02.wav", true);
PrecacheSound("player/survivor/voice/TeenGirl/NiceShot05.wav", true);
PrecacheSound("player/survivor/voice/gambler/battlecry03.wav", true);
return void:0;
}

public void:OnClientPutInServer(Client)
{
CreateTimer(40.0, MSGAllPlayer, Client, 3);
return void:0;
}

public Action:Event_FinaleWin(Handle:Event, String:strName[], bool:bDontBroadcast)
{
ChongZhi();
return Action:0;
}

public Action:Event_RoundStart(Handle:event, String:event_name[], bool:dontBroadcast)
{
RoundStart_DelData();
return Action:0;
}

public PlayerSpawnEvent(Handle:event, String:name[], bool:dontBroadcast)
{
new client = GetClientOfUserId(GetEventInt(event, "userid"));
if (Enable[client])
{
new var1;
if (1 <= client <= MaxClients && IsClientInGame(client) && IsPlayerAlive(client))
{
SetEntProp(client, PropType:0, "m_bDrawViewmodel", any:1, 4, 0);
SetEntProp(client, PropType:0, "m_iFOV", any:90, 4, 0);
}
ZoomOn[client] = 0;
return 0;
}
return 0;
}

public Action:Event_PlayerDeath(Handle:event, String:name[], bool:dontBroadcast)
{
new victim = GetClientOfUserId(GetEventInt(event, "userid"));
new attacker = GetClientOfUserId(GetEventInt(event, "attacker"));
decl String:sBuffer[100];
decl String:sTargetName[32];
decl String:Weapon[32];
decl String:sModel[48];
GetEntPropString(attacker, PropType:1, "m_ModelName", sModel, 48, 0);
new var1;
if (0 < attacker <= MaxClients && victim)
{
if (GetClientTeam(victim) == 3)
{
new iClass = GetEntProp(victim, PropType:0, "m_zombieClass", 4, 0);
new Float:victim_pos[3] = 0.0;
new Float:attacker_pos[3] = 0.0;
GetClientAbsOrigin(victim, victim_pos);
GetClientAbsOrigin(attacker, attacker_pos);
new Float:distance = GetVectorDistance(victim_pos, attacker_pos, false);
new var2;
if ((1 <= attacker <= MaxClients && IsClientInGame(attacker) && IsPlayerAlive(attacker)) && !IsFakeClient(attacker))
{
if (GetClientTeam(attacker) == 2)
{
if (!IsFakeClient(attacker))
{
switch (iClass)
{
case 1:
{
if (HUDON[attacker] == 1)
{
if (distance > 0.0)
{
GetClientWeapon(attacker, Weapon, 32);
new Wea;
while (Wea < 20)
{
if (StrEqual(Weapon, CurrentWeapon[Wea], true) == 1)
{
if (GetEventBool(event, "headshot"))
{
Format(sBuffer, 100, "手持%s在<%.fm>处爆掉<Smoker>头颅", CurrentWeaponName[Wea], distance);
ReplaceString(sBuffer, 100, "\n", " ", true);
new entity = CreateEntityByName("env_instructor_hint", -1);
FormatEx(sTargetName, 32, "hint%d", attacker);
DispatchKeyValue(attacker, "targetname", sTargetName);
DispatchKeyValue(entity, "hint_target", sTargetName);
DispatchKeyValue(entity, "hint_timeout", "8");
DispatchKeyValue(entity, "hint_range", "0.01");
DispatchKeyValue(entity, "hint_icon_onscreen", "icon_skull");
DispatchKeyValue(entity, "hint_caption", sBuffer);
DispatchKeyValue(entity, "hint_color", "255, 255, 0");
DispatchSpawn(entity);
AcceptEntityInput(entity, "ShowHint", -1, -1, 0);
CreateTimer(8.0, tmrRemoveInstructorHint, EntIndexToEntRef(entity), 0);
}
Format(sBuffer, 100, "手持%s在<%.fm>处干掉<Smoker>", CurrentWeaponName[Wea], distance);
ReplaceString(sBuffer, 100, "\n", " ", true);
new entity = CreateEntityByName("env_instructor_hint", -1);
FormatEx(sTargetName, 32, "hint%d", attacker);
DispatchKeyValue(attacker, "targetname", sTargetName);
DispatchKeyValue(entity, "hint_target", sTargetName);
DispatchKeyValue(entity, "hint_timeout", "8");
DispatchKeyValue(entity, "hint_range", "0.01");
DispatchKeyValue(entity, "hint_caption", sBuffer);
DispatchKeyValue(entity, "hint_color", "255, 255, 0");
DispatchSpawn(entity);
AcceptEntityInput(entity, "ShowHint", -1, -1, 0);
CreateTimer(8.0, tmrRemoveInstructorHint, EntIndexToEntRef(entity), 0);
}
Wea++;
}
}
}
if (GetConVarInt(KillTeGan) == 1)
{
if (distance > 0.0)
{
GetClientWeapon(attacker, Weapon, 32);
new Wea;
while (Wea < 20)
{
if (StrEqual(Weapon, CurrentWeapon[Wea], true) == 1)
{
if (GetEventBool(event, "headshot"))
{
PrintToChatAll("\x03%N \x01手持-->\x05%s在<%.fm>处\x01爆掉\x04【Smoker】\x01头颅", attacker, CurrentWeaponName[Wea], distance);
AttachParticle(victim, "fire_jet_01", 3.0);
if (ZoomZedTime[attacker] == 1)
{
Zoom(attacker, -90);
CreateTimer(0.5, Timer_KillZoom, attacker, 2);
}
HeadShot[attacker] += 1;
if (!HUDON[attacker])
{
HeadShot_HUD(attacker);
}
new var14;
if (strcmp(sModel, "models/survivors/survivor_coach.mdl", true) && strcmp(sModel, "models/survivors/survivor_gambler.mdl", true) && strcmp(sModel, "models/survivors/survivor_mechanic.mdl", true) && strcmp(sModel, "models/survivors/survivor_namvet.mdl", true) && strcmp(sModel, "models/survivors/survivor_biker.mdl", true) && strcmp(sModel, "models/survivors/survivor_manager.mdl", true))
{
EmitSoundToClient(attacker, "player/survivor/voice/TeenGirl/NiceShot05.wav", -2, 0, 75, 0, 1.0, 100, -1, NULL_VECTOR, NULL_VECTOR, true, 0.0);
}
else
{
new var15;
if (strcmp(sModel, "models/survivors/survivor_producer.mdl", true) && strcmp(sModel, "models/survivors/survivor_teenangst.mdl", true))
{
EmitSoundToClient(attacker, "player/survivor/voice/gambler/battlecry03.wav", -2, 0, 75, 0, 1.0, 100, -1, NULL_VECTOR, NULL_VECTOR, true, 0.0);
}
}
}
PrintToChatAll("\x03%N \x01手持-->\x05%s在<%.fm>处\x01干掉\x04【Smoker】", attacker, CurrentWeaponName[Wea], distance);
}
Wea++;
}
}
}
if (HUDON[attacker] == 2)
{
if (distance > 0.0)
{
GetClientWeapon(attacker, Weapon, 32);
new Wea;
while (Wea < 20)
{
if (StrEqual(Weapon, CurrentWeapon[Wea], true) == 1)
{
if (GetEventBool(event, "headshot"))
{
PrintHintText(attacker, "手持%s\n在<%.fm>处爆掉【Smoker】头颅", CurrentWeaponName[Wea], distance);
}
PrintHintText(attacker, "手持%s在<%.fm>处干掉【Smoker】", CurrentWeaponName[Wea], distance);
}
Wea++;
}
}
}
if (HUDON[attacker] == 3)
{
if (distance > 0.0)
{
GetClientWeapon(attacker, Weapon, 32);
new Wea;
while (Wea < 20)
{
if (StrEqual(Weapon, CurrentWeapon[Wea], true) == 1)
{
if (GetEventBool(event, "headshot"))
{
PrintCenterText(attacker, "手持%s在<%.fm>处爆掉【Smoker】头颅", CurrentWeaponName[Wea], distance);
}
PrintCenterText(attacker, "手持%s在<%.fm>处干掉【Smoker】", CurrentWeaponName[Wea], distance);
}
Wea++;
}
}
}
}
case 2:
{
if (HUDON[attacker] == 1)
{
if (distance > 0.0)
{
GetClientWeapon(attacker, Weapon, 32);
new Wea;
while (Wea < 20)
{
if (StrEqual(Weapon, CurrentWeapon[Wea], true) == 1)
{
if (GetEventBool(event, "headshot"))
{
Format(sBuffer, 100, "手持%s在<%.fm>处爆掉<Boomer>头颅", CurrentWeaponName[Wea], distance);
ReplaceString(sBuffer, 100, "\n", " ", true);
new entity = CreateEntityByName("env_instructor_hint", -1);
FormatEx(sTargetName, 32, "hint%d", attacker);
DispatchKeyValue(attacker, "targetname", sTargetName);
DispatchKeyValue(entity, "hint_target", sTargetName);
DispatchKeyValue(entity, "hint_timeout", "8");
DispatchKeyValue(entity, "hint_range", "0.01");
DispatchKeyValue(entity, "hint_icon_onscreen", "icon_skull");
DispatchKeyValue(entity, "hint_caption", sBuffer);
DispatchKeyValue(entity, "hint_color", "255, 255, 0");
DispatchSpawn(entity);
AcceptEntityInput(entity, "ShowHint", -1, -1, 0);
CreateTimer(8.0, tmrRemoveInstructorHint, EntIndexToEntRef(entity), 0);
}
Format(sBuffer, 100, "手持%s在<%.fm>处干掉<Boomer>", CurrentWeaponName[Wea], distance);
ReplaceString(sBuffer, 100, "\n", " ", true);
new entity = CreateEntityByName("env_instructor_hint", -1);
FormatEx(sTargetName, 32, "hint%d", attacker);
DispatchKeyValue(attacker, "targetname", sTargetName);
DispatchKeyValue(entity, "hint_target", sTargetName);
DispatchKeyValue(entity, "hint_timeout", "8");
DispatchKeyValue(entity, "hint_range", "0.01");
DispatchKeyValue(entity, "hint_caption", sBuffer);
DispatchKeyValue(entity, "hint_color", "255, 255, 0");
DispatchSpawn(entity);
AcceptEntityInput(entity, "ShowHint", -1, -1, 0);
CreateTimer(8.0, tmrRemoveInstructorHint, EntIndexToEntRef(entity), 0);
}
Wea++;
}
}
}
if (GetConVarInt(KillTeGan) == 1)
{
if (distance > 0.0)
{
GetClientWeapon(attacker, Weapon, 32);
new Wea;
while (Wea < 20)
{
if (StrEqual(Weapon, CurrentWeapon[Wea], true) == 1)
{
if (GetEventBool(event, "headshot"))
{
PrintToChatAll("\x03%N \x01手持-->\x05%s在<%.fm>处\x01爆掉\x04【Boomer】\x01头颅", attacker, CurrentWeaponName[Wea], distance);
AttachParticle(victim, "fire_jet_01", 3.0);
if (ZoomZedTime[attacker] == 1)
{
Zoom(attacker, -90);
CreateTimer(0.5, Timer_KillZoom, attacker, 2);
}
HeadShot[attacker] += 1;
if (!HUDON[attacker])
{
HeadShot_HUD(attacker);
}
new var12;
if (strcmp(sModel, "models/survivors/survivor_coach.mdl", true) && strcmp(sModel, "models/survivors/survivor_gambler.mdl", true) && strcmp(sModel, "models/survivors/survivor_mechanic.mdl", true) && strcmp(sModel, "models/survivors/survivor_namvet.mdl", true) && strcmp(sModel, "models/survivors/survivor_biker.mdl", true) && strcmp(sModel, "models/survivors/survivor_manager.mdl", true))
{
EmitSoundToClient(attacker, "player/survivor/voice/TeenGirl/NiceShot05.wav", -2, 0, 75, 0, 1.0, 100, -1, NULL_VECTOR, NULL_VECTOR, true, 0.0);
}
else
{
new var13;
if (strcmp(sModel, "models/survivors/survivor_producer.mdl", true) && strcmp(sModel, "models/survivors/survivor_teenangst.mdl", true))
{
EmitSoundToClient(attacker, "player/survivor/voice/gambler/battlecry03.wav", -2, 0, 75, 0, 1.0, 100, -1, NULL_VECTOR, NULL_VECTOR, true, 0.0);
}
}
}
PrintToChatAll("\x03%N \x01手持-->\x05%s在<%.fm>处\x01干掉\x04【Boomer】", attacker, CurrentWeaponName[Wea], distance);
}
Wea++;
}
}
}
if (HUDON[attacker] == 2)
{
if (distance > 0.0)
{
GetClientWeapon(attacker, Weapon, 32);
new Wea;
while (Wea < 20)
{
if (StrEqual(Weapon, CurrentWeapon[Wea], true) == 1)
{
if (GetEventBool(event, "headshot"))
{
PrintHintText(attacker, "手持%s\n在<%.fm>处爆掉【Boomer】头颅", CurrentWeaponName[Wea], distance);
}
PrintHintText(attacker, "手持%s在<%.fm>处干掉【Boomer】", CurrentWeaponName[Wea], distance);
}
Wea++;
}
}
}
if (HUDON[attacker] == 3)
{
if (distance > 0.0)
{
GetClientWeapon(attacker, Weapon, 32);
new Wea;
while (Wea < 20)
{
if (StrEqual(Weapon, CurrentWeapon[Wea], true) == 1)
{
if (GetEventBool(event, "headshot"))
{
PrintCenterText(attacker, "手持%s在<%.fm>处爆掉【Boomer】头颅", CurrentWeaponName[Wea], distance);
}
PrintCenterText(attacker, "手持%s在<%.fm>处干掉【Boomer】", CurrentWeaponName[Wea], distance);
}
Wea++;
}
}
}
}
case 3:
{
if (HUDON[attacker] == 1)
{
if (distance > 0.0)
{
GetClientWeapon(attacker, Weapon, 32);
new Wea;
while (Wea < 20)
{
if (StrEqual(Weapon, CurrentWeapon[Wea], true) == 1)
{
if (GetEventBool(event, "headshot"))
{
Format(sBuffer, 100, "手持%s在<%.fm>处爆掉<Hunter>头颅", CurrentWeaponName[Wea], distance);
ReplaceString(sBuffer, 100, "\n", " ", true);
new entity = CreateEntityByName("env_instructor_hint", -1);
FormatEx(sTargetName, 32, "hint%d", attacker);
DispatchKeyValue(attacker, "targetname", sTargetName);
DispatchKeyValue(entity, "hint_target", sTargetName);
DispatchKeyValue(entity, "hint_timeout", "8");
DispatchKeyValue(entity, "hint_range", "0.01");
DispatchKeyValue(entity, "hint_icon_onscreen", "icon_skull");
DispatchKeyValue(entity, "hint_caption", sBuffer);
DispatchKeyValue(entity, "hint_color", "255, 255, 0");
DispatchSpawn(entity);
AcceptEntityInput(entity, "ShowHint", -1, -1, 0);
CreateTimer(8.0, tmrRemoveInstructorHint, EntIndexToEntRef(entity), 0);
}
Format(sBuffer, 100, "手持%s在<%.fm>处干掉<Hunter>", CurrentWeaponName[Wea], distance);
ReplaceString(sBuffer, 100, "\n", " ", true);
new entity = CreateEntityByName("env_instructor_hint", -1);
FormatEx(sTargetName, 32, "hint%d", attacker);
DispatchKeyValue(attacker, "targetname", sTargetName);
DispatchKeyValue(entity, "hint_target", sTargetName);
DispatchKeyValue(entity, "hint_timeout", "8");
DispatchKeyValue(entity, "hint_range", "0.01");
DispatchKeyValue(entity, "hint_caption", sBuffer);
DispatchKeyValue(entity, "hint_color", "255, 255, 0");
DispatchSpawn(entity);
AcceptEntityInput(entity, "ShowHint", -1, -1, 0);
CreateTimer(8.0, tmrRemoveInstructorHint, EntIndexToEntRef(entity), 0);
}
Wea++;
}
}
}
if (GetConVarInt(KillTeGan) == 1)
{
if (distance > 0.0)
{
GetClientWeapon(attacker, Weapon, 32);
new Wea;
while (Wea < 20)
{
if (StrEqual(Weapon, CurrentWeapon[Wea], true) == 1)
{
if (GetEventBool(event, "headshot"))
{
PrintToChatAll("\x03%N \x01手持-->\x05%s在<%.fm>处\x01爆掉\x04【Hunter】\x01头颅", attacker, CurrentWeaponName[Wea], distance);
AttachParticle(victim, "fire_jet_01", 3.0);
if (ZoomZedTime[attacker] == 1)
{
Zoom(attacker, -90);
CreateTimer(0.5, Timer_KillZoom, attacker, 2);
}
HeadShot[attacker] += 1;
if (!HUDON[attacker])
{
HeadShot_HUD(attacker);
}
new var10;
if (strcmp(sModel, "models/survivors/survivor_coach.mdl", true) && strcmp(sModel, "models/survivors/survivor_gambler.mdl", true) && strcmp(sModel, "models/survivors/survivor_mechanic.mdl", true) && strcmp(sModel, "models/survivors/survivor_namvet.mdl", true) && strcmp(sModel, "models/survivors/survivor_biker.mdl", true) && strcmp(sModel, "models/survivors/survivor_manager.mdl", true))
{
EmitSoundToClient(attacker, "player/survivor/voice/TeenGirl/NiceShot05.wav", -2, 0, 75, 0, 1.0, 100, -1, NULL_VECTOR, NULL_VECTOR, true, 0.0);
}
else
{
new var11;
if (strcmp(sModel, "models/survivors/survivor_producer.mdl", true) && strcmp(sModel, "models/survivors/survivor_teenangst.mdl", true))
{
EmitSoundToClient(attacker, "player/survivor/voice/gambler/battlecry03.wav", -2, 0, 75, 0, 1.0, 100, -1, NULL_VECTOR, NULL_VECTOR, true, 0.0);
}
}
}
PrintToChatAll("\x03%N \x01手持-->\x05%s在<%.fm>处\x01干掉\x04【Hunter】", attacker, CurrentWeaponName[Wea], distance);
}
Wea++;
}
}
}
if (HUDON[attacker] == 2)
{
if (distance > 0.0)
{
GetClientWeapon(attacker, Weapon, 32);
new Wea;
while (Wea < 20)
{
if (StrEqual(Weapon, CurrentWeapon[Wea], true) == 1)
{
if (GetEventBool(event, "headshot"))
{
PrintHintText(attacker, "手持%s\n在<%.fm>处爆掉【Hunter】头颅", CurrentWeaponName[Wea], distance);
}
PrintHintText(attacker, "手持%s在<%.fm>处干掉【Hunter】", CurrentWeaponName[Wea], distance);
}
Wea++;
}
}
}
if (HUDON[attacker] == 3)
{
if (distance > 0.0)
{
GetClientWeapon(attacker, Weapon, 32);
new Wea;
while (Wea < 20)
{
if (StrEqual(Weapon, CurrentWeapon[Wea], true) == 1)
{
if (GetEventBool(event, "headshot"))
{
PrintCenterText(attacker, "手持%s在<%.fm>处爆掉【Hunter】头颅", CurrentWeaponName[Wea], distance);
}
PrintCenterText(attacker, "手持%s在<%.fm>处干掉【Hunter】", CurrentWeaponName[Wea], distance);
}
Wea++;
}
}
}
}
case 4:
{
if (HUDON[attacker] == 1)
{
if (distance > 0.0)
{
GetClientWeapon(attacker, Weapon, 32);
new Wea;
while (Wea < 20)
{
if (StrEqual(Weapon, CurrentWeapon[Wea], true) == 1)
{
if (GetEventBool(event, "headshot"))
{
Format(sBuffer, 100, "手持%s在<%.fm>处爆掉<Spitter>头颅", CurrentWeaponName[Wea], distance);
ReplaceString(sBuffer, 100, "\n", " ", true);
new entity = CreateEntityByName("env_instructor_hint", -1);
FormatEx(sTargetName, 32, "hint%d", attacker);
DispatchKeyValue(attacker, "targetname", sTargetName);
DispatchKeyValue(entity, "hint_target", sTargetName);
DispatchKeyValue(entity, "hint_timeout", "8");
DispatchKeyValue(entity, "hint_range", "0.01");
DispatchKeyValue(entity, "hint_icon_onscreen", "icon_skull");
DispatchKeyValue(entity, "hint_caption", sBuffer);
DispatchKeyValue(entity, "hint_color", "255, 255, 0");
DispatchSpawn(entity);
AcceptEntityInput(entity, "ShowHint", -1, -1, 0);
CreateTimer(8.0, tmrRemoveInstructorHint, EntIndexToEntRef(entity), 0);
}
Format(sBuffer, 100, "手持%s在<%.fm>处干掉<Spitter>", CurrentWeaponName[Wea], distance);
ReplaceString(sBuffer, 100, "\n", " ", true);
new entity = CreateEntityByName("env_instructor_hint", -1);
FormatEx(sTargetName, 32, "hint%d", attacker);
DispatchKeyValue(attacker, "targetname", sTargetName);
DispatchKeyValue(entity, "hint_target", sTargetName);
DispatchKeyValue(entity, "hint_timeout", "8");
DispatchKeyValue(entity, "hint_range", "0.01");
DispatchKeyValue(entity, "hint_caption", sBuffer);
DispatchKeyValue(entity, "hint_color", "255, 255, 0");
DispatchSpawn(entity);
AcceptEntityInput(entity, "ShowHint", -1, -1, 0);
CreateTimer(8.0, tmrRemoveInstructorHint, EntIndexToEntRef(entity), 0);
}
Wea++;
}
}
}
if (GetConVarInt(KillTeGan) == 1)
{
if (distance > 0.0)
{
GetClientWeapon(attacker, Weapon, 32);
new Wea;
while (Wea < 20)
{
if (StrEqual(Weapon, CurrentWeapon[Wea], true) == 1)
{
if (GetEventBool(event, "headshot"))
{
PrintToChatAll("\x03%N \x01手持-->\x05%s在<%.fm>处\x01爆掉\x04【Spitter】\x01头颅", attacker, CurrentWeaponName[Wea], distance);
AttachParticle(victim, "fire_jet_01", 3.0);
if (ZoomZedTime[attacker] == 1)
{
Zoom(attacker, -90);
CreateTimer(0.5, Timer_KillZoom, attacker, 2);
}
HeadShot[attacker] += 1;
if (!HUDON[attacker])
{
HeadShot_HUD(attacker);
}
new var8;
if (strcmp(sModel, "models/survivors/survivor_coach.mdl", true) && strcmp(sModel, "models/survivors/survivor_gambler.mdl", true) && strcmp(sModel, "models/survivors/survivor_mechanic.mdl", true) && strcmp(sModel, "models/survivors/survivor_namvet.mdl", true) && strcmp(sModel, "models/survivors/survivor_biker.mdl", true) && strcmp(sModel, "models/survivors/survivor_manager.mdl", true))
{
EmitSoundToClient(attacker, "player/survivor/voice/TeenGirl/NiceShot05.wav", -2, 0, 75, 0, 1.0, 100, -1, NULL_VECTOR, NULL_VECTOR, true, 0.0);
}
else
{
new var9;
if (strcmp(sModel, "models/survivors/survivor_producer.mdl", true) && strcmp(sModel, "models/survivors/survivor_teenangst.mdl", true))
{
EmitSoundToClient(attacker, "player/survivor/voice/gambler/battlecry03.wav", -2, 0, 75, 0, 1.0, 100, -1, NULL_VECTOR, NULL_VECTOR, true, 0.0);
}
}
}
PrintToChatAll("\x03%N \x01手持-->\x05%s在<%.fm>处\x01干掉\x04【Spitter】", attacker, CurrentWeaponName[Wea], distance);
}
Wea++;
}
}
}
if (HUDON[attacker] == 2)
{
if (distance > 0.0)
{
GetClientWeapon(attacker, Weapon, 32);
new Wea;
while (Wea < 20)
{
if (StrEqual(Weapon, CurrentWeapon[Wea], true) == 1)
{
if (GetEventBool(event, "headshot"))
{
PrintHintText(attacker, "手持%s\n在<%.fm>处爆掉【Spitter】头颅", CurrentWeaponName[Wea], distance);
}
PrintHintText(attacker, "手持%s在<%.fm>处干掉【Spitter】", CurrentWeaponName[Wea], distance);
}
Wea++;
}
}
}
if (HUDON[attacker] == 3)
{
if (distance > 0.0)
{
GetClientWeapon(attacker, Weapon, 32);
new Wea;
while (Wea < 20)
{
if (StrEqual(Weapon, CurrentWeapon[Wea], true) == 1)
{
if (GetEventBool(event, "headshot"))
{
PrintCenterText(attacker, "手持%s在<%.fm>处爆掉【Spitter】头颅", CurrentWeaponName[Wea], distance);
}
PrintCenterText(attacker, "手持%s在<%.fm>处干掉【Spitter】", CurrentWeaponName[Wea], distance);
}
Wea++;
}
}
}
}
case 5:
{
if (HUDON[attacker] == 1)
{
if (distance > 0.0)
{
GetClientWeapon(attacker, Weapon, 32);
new Wea;
while (Wea < 20)
{
if (StrEqual(Weapon, CurrentWeapon[Wea], true) == 1)
{
if (GetEventBool(event, "headshot"))
{
Format(sBuffer, 100, "手持%s在<%.fm>处爆掉<Jockey>头颅", CurrentWeaponName[Wea], distance);
ReplaceString(sBuffer, 100, "\n", " ", true);
new entity = CreateEntityByName("env_instructor_hint", -1);
FormatEx(sTargetName, 32, "hint%d", attacker);
DispatchKeyValue(attacker, "targetname", sTargetName);
DispatchKeyValue(entity, "hint_target", sTargetName);
DispatchKeyValue(entity, "hint_timeout", "8");
DispatchKeyValue(entity, "hint_range", "0.01");
DispatchKeyValue(entity, "hint_icon_onscreen", "icon_skull");
DispatchKeyValue(entity, "hint_caption", sBuffer);
DispatchKeyValue(entity, "hint_color", "255, 255, 0");
DispatchSpawn(entity);
AcceptEntityInput(entity, "ShowHint", -1, -1, 0);
CreateTimer(8.0, tmrRemoveInstructorHint, EntIndexToEntRef(entity), 0);
}
Format(sBuffer, 100, "手持%s在<%.fm>处干掉<Jockey>", CurrentWeaponName[Wea], distance);
ReplaceString(sBuffer, 100, "\n", " ", true);
new entity = CreateEntityByName("env_instructor_hint", -1);
FormatEx(sTargetName, 32, "hint%d", attacker);
DispatchKeyValue(attacker, "targetname", sTargetName);
DispatchKeyValue(entity, "hint_target", sTargetName);
DispatchKeyValue(entity, "hint_timeout", "8");
DispatchKeyValue(entity, "hint_range", "0.01");
DispatchKeyValue(entity, "hint_caption", sBuffer);
DispatchKeyValue(entity, "hint_color", "255, 255, 0");
DispatchSpawn(entity);
AcceptEntityInput(entity, "ShowHint", -1, -1, 0);
CreateTimer(8.0, tmrRemoveInstructorHint, EntIndexToEntRef(entity), 0);
}
Wea++;
}
}
}
if (GetConVarInt(KillTeGan) == 1)
{
if (distance > 0.0)
{
GetClientWeapon(attacker, Weapon, 32);
new Wea;
while (Wea < 20)
{
if (StrEqual(Weapon, CurrentWeapon[Wea], true) == 1)
{
if (GetEventBool(event, "headshot"))
{
PrintToChatAll("\x03%N \x01手持-->\x05%s在<%.fm>处\x01爆掉\x04【Jockey】\x01头颅", attacker, CurrentWeaponName[Wea], distance);
AttachParticle(victim, "fire_jet_01", 3.0);
if (ZoomZedTime[attacker] == 1)
{
Zoom(attacker, -90);
CreateTimer(0.5, Timer_KillZoom, attacker, 2);
}
HeadShot[attacker] += 1;
if (!HUDON[attacker])
{
HeadShot_HUD(attacker);
}
new var6;
if (strcmp(sModel, "models/survivors/survivor_coach.mdl", true) && strcmp(sModel, "models/survivors/survivor_gambler.mdl", true) && strcmp(sModel, "models/survivors/survivor_mechanic.mdl", true) && strcmp(sModel, "models/survivors/survivor_namvet.mdl", true) && strcmp(sModel, "models/survivors/survivor_biker.mdl", true) && strcmp(sModel, "models/survivors/survivor_manager.mdl", true))
{
EmitSoundToClient(attacker, "player/survivor/voice/TeenGirl/NiceShot05.wav", -2, 0, 75, 0, 1.0, 100, -1, NULL_VECTOR, NULL_VECTOR, true, 0.0);
}
else
{
new var7;
if (strcmp(sModel, "models/survivors/survivor_producer.mdl", true) && strcmp(sModel, "models/survivors/survivor_teenangst.mdl", true))
{
EmitSoundToClient(attacker, "player/survivor/voice/gambler/battlecry03.wav", -2, 0, 75, 0, 1.0, 100, -1, NULL_VECTOR, NULL_VECTOR, true, 0.0);
}
}
}
PrintToChatAll("\x03%N \x01手持-->\x05%s在<%.fm>处\x01干掉\x04【Jockey】", attacker, CurrentWeaponName[Wea], distance);
}
Wea++;
}
}
}
if (HUDON[attacker] == 2)
{
if (distance > 0.0)
{
GetClientWeapon(attacker, Weapon, 32);
new Wea;
while (Wea < 20)
{
if (StrEqual(Weapon, CurrentWeapon[Wea], true) == 1)
{
if (GetEventBool(event, "headshot"))
{
PrintHintText(attacker, "手持%s\n在<%.fm>处爆掉【Jockey】头颅", CurrentWeaponName[Wea], distance);
}
PrintHintText(attacker, "手持%s在<%.fm>处干掉【Jockey】", CurrentWeaponName[Wea], distance);
}
Wea++;
}
}
}
if (HUDON[attacker] == 3)
{
if (distance > 0.0)
{
GetClientWeapon(attacker, Weapon, 32);
new Wea;
while (Wea < 20)
{
if (StrEqual(Weapon, CurrentWeapon[Wea], true) == 1)
{
if (GetEventBool(event, "headshot"))
{
PrintCenterText(attacker, "手持%s在<%.fm>处爆掉【Jockey】头颅", CurrentWeaponName[Wea], distance);
}
PrintCenterText(attacker, "手持%s在<%.fm>处干掉【Jockey】", CurrentWeaponName[Wea], distance);
}
Wea++;
}
}
}
}
case 6:
{
if (HUDON[attacker] == 1)
{
if (distance > 0.0)
{
GetClientWeapon(attacker, Weapon, 32);
new Wea;
while (Wea < 20)
{
if (StrEqual(Weapon, CurrentWeapon[Wea], true) == 1)
{
if (GetEventBool(event, "headshot"))
{
Format(sBuffer, 100, "手持%s在<%.fm>处爆掉<Charger>头颅", CurrentWeaponName[Wea], distance);
ReplaceString(sBuffer, 100, "\n", " ", true);
new entity = CreateEntityByName("env_instructor_hint", -1);
FormatEx(sTargetName, 32, "hint%d", attacker);
DispatchKeyValue(attacker, "targetname", sTargetName);
DispatchKeyValue(entity, "hint_target", sTargetName);
DispatchKeyValue(entity, "hint_timeout", "8");
DispatchKeyValue(entity, "hint_range", "0.01");
DispatchKeyValue(entity, "hint_icon_onscreen", "icon_skull");
DispatchKeyValue(entity, "hint_caption", sBuffer);
DispatchKeyValue(entity, "hint_color", "255, 255, 0");
DispatchSpawn(entity);
AcceptEntityInput(entity, "ShowHint", -1, -1, 0);
CreateTimer(8.0, tmrRemoveInstructorHint, EntIndexToEntRef(entity), 0);
}
Format(sBuffer, 100, "手持%s在<%.fm>处干掉<Charger>", CurrentWeaponName[Wea], distance);
ReplaceString(sBuffer, 100, "\n", " ", true);
new entity = CreateEntityByName("env_instructor_hint", -1);
FormatEx(sTargetName, 32, "hint%d", attacker);
DispatchKeyValue(attacker, "targetname", sTargetName);
DispatchKeyValue(entity, "hint_target", sTargetName);
DispatchKeyValue(entity, "hint_timeout", "8");
DispatchKeyValue(entity, "hint_range", "0.01");
DispatchKeyValue(entity, "hint_caption", sBuffer);
DispatchKeyValue(entity, "hint_color", "255, 255, 0");
DispatchSpawn(entity);
AcceptEntityInput(entity, "ShowHint", -1, -1, 0);
CreateTimer(8.0, tmrRemoveInstructorHint, EntIndexToEntRef(entity), 0);
}
Wea++;
}
}
}
if (GetConVarInt(KillTeGan) == 1)
{
if (distance > 0.0)
{
GetClientWeapon(attacker, Weapon, 32);
new Wea;
while (Wea < 20)
{
if (StrEqual(Weapon, CurrentWeapon[Wea], true) == 1)
{
if (GetEventBool(event, "headshot"))
{
PrintToChatAll("\x03%N \x01手持-->\x05%s在<%.fm>处\x01爆掉\x04【Charger】\x01头颅", attacker, CurrentWeaponName[Wea], distance);
AttachParticle(victim, "fire_jet_01", 3.0);
if (ZoomZedTime[attacker] == 1)
{
Zoom(attacker, -90);
CreateTimer(0.5, Timer_KillZoom, attacker, 2);
}
HeadShot[attacker] += 1;
if (!HUDON[attacker])
{
HeadShot_HUD(attacker);
}
new var4;
if (strcmp(sModel, "models/survivors/survivor_coach.mdl", true) && strcmp(sModel, "models/survivors/survivor_gambler.mdl", true) && strcmp(sModel, "models/survivors/survivor_mechanic.mdl", true) && strcmp(sModel, "models/survivors/survivor_namvet.mdl", true) && strcmp(sModel, "models/survivors/survivor_biker.mdl", true) && strcmp(sModel, "models/survivors/survivor_manager.mdl", true))
{
EmitSoundToClient(attacker, "player/survivor/voice/TeenGirl/NiceShot05.wav", -2, 0, 75, 0, 1.0, 100, -1, NULL_VECTOR, NULL_VECTOR, true, 0.0);
}
else
{
new var5;
if (strcmp(sModel, "models/survivors/survivor_producer.mdl", true) && strcmp(sModel, "models/survivors/survivor_teenangst.mdl", true))
{
EmitSoundToClient(attacker, "player/survivor/voice/gambler/battlecry03.wav", -2, 0, 75, 0, 1.0, 100, -1, NULL_VECTOR, NULL_VECTOR, true, 0.0);
}
}
}
PrintToChatAll("\x03%N \x01手持-->\x05%s在<%.fm>处\x01干掉\x04【Charger】", attacker, CurrentWeaponName[Wea], distance);
}
Wea++;
}
}
}
if (HUDON[attacker] == 2)
{
if (distance > 0.0)
{
GetClientWeapon(attacker, Weapon, 32);
new Wea;
while (Wea < 20)
{
if (StrEqual(Weapon, CurrentWeapon[Wea], true) == 1)
{
if (GetEventBool(event, "headshot"))
{
PrintHintText(attacker, "手持%s\n在<%.fm>处爆掉【Charger】头颅", CurrentWeaponName[Wea], distance);
}
PrintHintText(attacker, "手持%s在<%.fm>处干掉【Charger】", CurrentWeaponName[Wea], distance);
}
Wea++;
}
}
}
if (HUDON[attacker] == 3)
{
if (distance > 0.0)
{
GetClientWeapon(attacker, Weapon, 32);
new Wea;
while (Wea < 20)
{
if (StrEqual(Weapon, CurrentWeapon[Wea], true) == 1)
{
if (GetEventBool(event, "headshot"))
{
PrintCenterText(attacker, "手持%s在<%.fm>处爆掉【Charger】头颅", CurrentWeaponName[Wea], distance);
}
PrintCenterText(attacker, "手持%s在<%.fm>处干掉【Charger】", CurrentWeaponName[Wea], distance);
}
Wea++;
}
}
}
}
default:
{
}
}
}
}
}
new var16;
if (iClass == 8 && !IsFakeClient(attacker) && IsPlayerAlive(attacker))
{
if (HUDON[attacker] == 1)
{
if (distance > 0.0)
{
GetClientWeapon(attacker, Weapon, 32);
new Wea;
while (Wea < 20)
{
if (StrEqual(Weapon, CurrentWeapon[Wea], true) == 1)
{
if (GetEventBool(event, "headshot"))
{
Format(sBuffer, 100, "手持%s在<%.fm>处爆掉<Tank>头颅", CurrentWeaponName[Wea], distance);
ReplaceString(sBuffer, 100, "\n", " ", true);
new entity = CreateEntityByName("env_instructor_hint", -1);
FormatEx(sTargetName, 32, "hint%d", attacker);
DispatchKeyValue(attacker, "targetname", sTargetName);
DispatchKeyValue(entity, "hint_target", sTargetName);
DispatchKeyValue(entity, "hint_timeout", "8");
DispatchKeyValue(entity, "hint_range", "0.01");
DispatchKeyValue(entity, "hint_icon_onscreen", "icon_skull");
DispatchKeyValue(entity, "hint_caption", sBuffer);
DispatchKeyValue(entity, "hint_color", "255, 255, 0");
DispatchSpawn(entity);
AcceptEntityInput(entity, "ShowHint", -1, -1, 0);
CreateTimer(8.0, tmrRemoveInstructorHint, EntIndexToEntRef(entity), 0);
}
Format(sBuffer, 100, "手持%s在<%.fm>处干掉<Tank>", CurrentWeaponName[Wea], distance);
ReplaceString(sBuffer, 100, "\n", " ", true);
new entity = CreateEntityByName("env_instructor_hint", -1);
FormatEx(sTargetName, 32, "hint%d", attacker);
DispatchKeyValue(attacker, "targetname", sTargetName);
DispatchKeyValue(entity, "hint_target", sTargetName);
DispatchKeyValue(entity, "hint_timeout", "8");
DispatchKeyValue(entity, "hint_range", "0.01");
DispatchKeyValue(entity, "hint_caption", sBuffer);
DispatchKeyValue(entity, "hint_color", "255, 255, 0");
DispatchSpawn(entity);
AcceptEntityInput(entity, "ShowHint", -1, -1, 0);
CreateTimer(8.0, tmrRemoveInstructorHint, EntIndexToEntRef(entity), 0);
}
Wea++;
}
}
}
if (GetConVarInt(KillTeGan) == 1)
{
if (distance > 0.0)
{
GetClientWeapon(attacker, Weapon, 32);
new Wea;
while (Wea < 20)
{
if (StrEqual(Weapon, CurrentWeapon[Wea], true) == 1)
{
if (GetEventBool(event, "headshot"))
{
PrintToChatAll("\x03%N \x01手持-->\x05%s在<%.fm>处\x01爆掉\x04【TANK】\x01头颅", attacker, CurrentWeaponName[Wea], distance);
AttachParticle(victim, "fire_jet_01", 3.0);
if (ZoomZedTime[attacker] == 1)
{
Zoom(attacker, -90);
CreateTimer(0.5, Timer_KillZoom, attacker, 2);
}
HeadShot[attacker] += 1;
if (!HUDON[attacker])
{
HeadShot_HUD(attacker);
}
new var17;
if (strcmp(sModel, "models/survivors/survivor_coach.mdl", true) && strcmp(sModel, "models/survivors/survivor_gambler.mdl", true) && strcmp(sModel, "models/survivors/survivor_mechanic.mdl", true) && strcmp(sModel, "models/survivors/survivor_namvet.mdl", true) && strcmp(sModel, "models/survivors/survivor_biker.mdl", true) && strcmp(sModel, "models/survivors/survivor_manager.mdl", true))
{
EmitSoundToClient(attacker, "player/survivor/voice/TeenGirl/NiceShot05.wav", -2, 0, 75, 0, 1.0, 100, -1, NULL_VECTOR, NULL_VECTOR, true, 0.0);
}
else
{
new var18;
if (strcmp(sModel, "models/survivors/survivor_producer.mdl", true) && strcmp(sModel, "models/survivors/survivor_teenangst.mdl", true))
{
EmitSoundToClient(attacker, "player/survivor/voice/gambler/battlecry03.wav", -2, 0, 75, 0, 1.0, 100, -1, NULL_VECTOR, NULL_VECTOR, true, 0.0);
}
}
}
PrintToChatAll("\x03%N \x01手持-->\x05%s在<%.fm>处\x01干掉\x04【TANK】", attacker, CurrentWeaponName[Wea], distance);
}
Wea++;
}
}
}
if (HUDON[attacker] == 2)
{
if (distance > 0.0)
{
GetClientWeapon(attacker, Weapon, 32);
new Wea;
while (Wea < 20)
{
if (StrEqual(Weapon, CurrentWeapon[Wea], true) == 1)
{
if (GetEventBool(event, "headshot"))
{
PrintHintText(attacker, "手持%s\n在<%.fm>处爆掉【Tank】头颅", CurrentWeaponName[Wea], distance);
}
PrintHintText(attacker, "手持%s在<%.fm>处干掉【Tank】", CurrentWeaponName[Wea], distance);
}
Wea++;
}
}
}
if (HUDON[attacker] == 3)
{
if (distance > 0.0)
{
GetClientWeapon(attacker, Weapon, 32);
new Wea;
while (Wea < 20)
{
if (StrEqual(Weapon, CurrentWeapon[Wea], true) == 1)
{
if (GetEventBool(event, "headshot"))
{
PrintCenterText(attacker, "手持%s在<%.fm>处爆掉【Tank】头颅", CurrentWeaponName[Wea], distance);
}
PrintCenterText(attacker, "手持%s在<%.fm>处干掉【Tank】", CurrentWeaponName[Wea], distance);
}
Wea++;
}
}
}
}
}
}
return Action:0;
}
a7878463 is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 08-09-2018 , 09:28   Re: (L4D2)Need some help
Reply With Quote #2

Use pastebin for such long code. And for shorter stuff put it within [PHP] or [CODE] tags. Also this looks like Lysis decompiled, no original source? Won't compile without lots of editing and I for one am not going to bother.
__________________
Silvers is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:25.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode