Diff
checker
टेक्स्ट
टेक्स्ट
छवियां
दस्तावेज़
Excel
फ़ोल्डर्स
Legal
Enterprise
डेस्कटॉप
मूल्य
साइन इन करें
Diffchecker डेस्कटॉप डाउनलोड करें
टेक्स्ट की तुलना करें
दो टेक्स्ट फ़ाइलों के बीच अंतर ढूंढें
उपकरण
इतिहास
रियल-टाइम एडिटर
अपरिवर्तित संक्षिप्त करें
लाइन रैप बंद
लेआउट
विभाजित
संयुक्त
परिवर्तन हाइलाइट करें
स्मार्ट
शब्द
अक्षर
सिंटैक्स हाइलाइटिंग
सिंटैक्स चुनें
अनदेखा करें
टेक्स्ट बदलें
पहले अंतर पर जाएँ
इनपुट संपादित करें
Diffchecker Desktop
Diffchecker चलाने का सबसे सुरक्षित तरीका। Diffchecker Desktop ऐप पाएं: आपके diffs कभी आपके कंप्यूटर से बाहर नहीं जाते!
Desktop पाएं
Untitled diff
बनाया गया
9 वर्ष पहले
Diff कभी समाप्त नहीं होता
साफ़
निर्यात करें
शेयर करें
समझाएं
342 हटाए गए
लाइनें
कुल
हटाया गया
अक्षर
कुल
हटाया गया
इस सुविधा का उपयोग जारी रखने के लिए, अपग्रेड करें
Diff
checker
Pro
मूल्य देखें
376 लाइनें
सभी को कॉपी करें
253 जोड़े गए
लाइनें
कुल
जोड़ा गया
अक्षर
कुल
जोड़ा गया
इस सुविधा का उपयोग जारी रखने के लिए, अपग्रेड करें
Diff
checker
Pro
मूल्य देखें
311 लाइनें
सभी को कॉपी करें
#pragma semicolon 1
#pragma semicolon 1
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
Text moved from lines 26-28
#include <sourcemod>
#include <sdktools>
#include <sdkhooks>
#define DEBUG
#define DEBUG
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
#define PLUGIN_AUTHOR "DeathChaos25"
static const String:MODEL_NICK
[] = "models/survivors/survivor_gambler
.mdl";
#define PLUGIN_VERSION "1.00"
static const String:MODEL_ROCHELLE
[] = "models/survivors/survivor_producer
.mdl";
static const String:MODEL_COACH
[] = "models/survivors/survivor_coach
.mdl";
static const String:MODEL_NICK
_LEGS
[] = "models/survivors/survivor_gambler
_legs
.mdl";
static const String:MODEL_ELLIS
[] = "models/survivors/survivor_mechanic
.mdl";
static const String:MODEL_ROCHELLE
_LEGS
[] = "models/survivors/survivor_producer
_legs
.mdl";
static const String:MODEL_BILL
[] = "models/survivors/survivor_namvet
.mdl";
static const String:MODEL_COACH
_LEGS
[] = "models/survivors/survivor_coach
_legs
.mdl";
static const String:MODEL_ZOEY
[] = "models/survivors/survivor_teenangst
.mdl";
static const String:MODEL_ELLIS
_LEGS
[] = "models/survivors/survivor_mechanic
_legs
.mdl";
static const String:MODEL_FRANCIS
[] = "models/survivors/survivor_biker
.mdl";
static const String:MODEL_BILL
_LEGS
[] = "models/survivors/survivor_namvet
_legs
.mdl";
static const String:MODEL_LOUIS
[] = "models/survivors/survivor_manager
.mdl";
static const String:MODEL_ZOEY
_LEGS
[] = "models/survivors/survivor_teenangst
_legs
.mdl";
static const String:MODEL_FRANCIS
_LEGS
[] = "models/survivors/survivor_biker
_legs
.mdl";
static const String:MODEL_LOUIS
_LEGS
[] = "models/survivors/survivor_manager
_legs
.mdl";
static PreviousAnimation[MAXPLAYERS + 1] = -1;
static PreviousAnimation[MAXPLAYERS + 1] = -1;
static CloneModel[MAXPLAYERS + 1] = -1;
static CloneModel[MAXPLAYERS + 1] = -1;
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
static CloneProp[MAXPLAYERS + 1] = -1;
static bool:ThirdPerson[MAXPLAYERS + 1] = false;
static bool:ThirdPerson[MAXPLAYERS + 1] = false;
new PropOff_nSequence;
new PropOff_nSequence;
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
new Handle:hSequenceSet;
public Plugin myinfo =
static clienthook[MAXPLAYERS + 1] = -1;
Text moved to lines 2-4
#include <sourcemod>
#include <sdktools>
#include <sdkhooks>
#include <dhooks>
public Plugin myinfo =
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
name = "[L4D2]
Clone",
name = "[L4D2]
View Legs",
author =
PLUGIN_AUTHOR,
author =
"[†×Ą]AYA SUPAY[Ļר]/DeathChaos",
description = "
",
description = "
Show legs in first person",
version =
PLUGIN_VERSION,
version =
"1.0",
url = "
"
url = "
http://steamcommunity.com/id/AyaSupay/
"
};
};
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
public void OnPluginStart()
public void OnPluginStart()
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
PropOff_nSequence = FindSendPropInfo("CTerrorPlayer", "m_nSequence");
PropOff_nSequence = FindSendPropInfo("CTerrorPlayer", "m_nSequence");
CreateTimer(GetRandomFloat(0.1, 0.3), CheckClients, _, TIMER_REPEAT);
CreateTimer(GetRandomFloat(0.1, 0.3), CheckClients, _, TIMER_REPEAT);
RegConsoleCmd("sm_view", ViewAngles);
RegConsoleCmd("sm_view", ViewAngles);
RegConsoleCmd("sm_ang", ChangeAngles);
RegConsoleCmd("sm_ang", ChangeAngles);
RegConsoleCmd("sm_pos", ChangePosition);
RegConsoleCmd("sm_pos", ChangePosition);
LoadOffset();
}
public OnPluginEnd()
{
for (new i = 0; i <= MAXPLAYERS; i++)
{
if (CloneProp[i] > 0)
{
AcceptEntityInput(CloneProp[i], "Kill");
}
if (CloneModel[i] > 0)
{
AcceptEntityInput(CloneModel[i], "Kill");
}
}
}
}
public OnMapStart()
public OnMapStart()
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
CheckModelPreCache(MODEL_NICK
_LEGS
);
CheckModelPreCache(MODEL_NICK
);
CheckModelPreCache(MODEL_ROCHELLE
_LEGS
);
CheckModelPreCache(MODEL_ROCHELLE
);
CheckModelPreCache(MODEL_COACH
_LEGS
);
CheckModelPreCache(MODEL_COACH
);
CheckModelPreCache(MODEL_ELLIS
_LEGS
);
CheckModelPreCache(MODEL_ELLIS
);
CheckModelPreCache(MODEL_BILL
_LEGS
);
CheckModelPreCache(MODEL_BILL
);
CheckModelPreCache(MODEL_ZOEY
_LEGS
);
CheckModelPreCache(MODEL_ZOEY
);
CheckModelPreCache(MODEL_FRANCIS
_LEGS
);
CheckModelPreCache(MODEL_FRANCIS
);
CheckModelPreCache(MODEL_LOUIS
_LEGS
);
CheckModelPreCache(MODEL_LOUIS
);
}
}
stock CheckModelPreCache(const String:Modelfile[])
stock CheckModelPreCache(const String:Modelfile[])
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
if (!IsModelPrecached(Modelfile))
if (!IsModelPrecached(Modelfile))
{
{
PrecacheModel(Modelfile, true);
PrecacheModel(Modelfile, true);
PrintToServer("Precaching Model:%s", Modelfile);
PrintToServer("Precaching Model:%s", Modelfile);
}
}
}
public MRESReturn:OnSequenceSet(pThis, Handle:hReturn, Handle:hParams)
{
new client = pThis;
if (IsSurvivor(client) && IsPlayerAlive(client) && !IsPlayerHeld(client) && !IsFakeClient(client))
{
new sequence = DHookGetReturn(hReturn);
/*if (CloneProp[client] > 0 && IsValidEntity(CloneProp[client]))
{
new Float:Origin[3], Float:Angle[3];
GetClientAbsOrigin(client, Origin);
GetClientAbsAngles(client, Angle);
TeleportEntity(CloneProp[client], Origin, Angle, NULL_VECTOR);
}*/
if (CloneModel[client] <= 0 || !IsValidEntity(CloneModel[client]))
{
new clone = CreateEntityByName("prop_dynamic_override");
decl String:model[64];
GetEntPropString(client, Prop_Data, "m_ModelName", model, sizeof(model));
if (StrContains(model, "gambler", false) != -1)
{
SetEntityModel(clone, MODEL_NICK_LEGS);
}
else if (StrContains(model, "coach", false) != -1)
{
SetEntityModel(clone, MODEL_COACH_LEGS);
}
else if (StrContains(model, "producer", false) != -1)
{
SetEntityModel(clone, MODEL_ROCHELLE_LEGS);
}
else if (StrContains(model, "mechanic", false) != -1)
{
SetEntityModel(clone, MODEL_ELLIS_LEGS);
}
else if (StrContains(model, "namvet", false) != -1)
{
SetEntityModel(clone, MODEL_BILL_LEGS);
}
else if (StrContains(model, "teenangst", false) != -1)
{
SetEntityModel(clone, MODEL_ZOEY_LEGS);
}
else if (StrContains(model, "biker", false) != -1)
{
SetEntityModel(clone, MODEL_FRANCIS_LEGS);
}
else if (StrContains(model, "manager", false) != -1)
{
SetEntityModel(clone, MODEL_LOUIS_LEGS);
}
else
{
AcceptEntityInput(clone, "Kill");
LogError("Player Model %s is not supported!", model);
}
decl Float:vAngles[3];
decl Float:vOrigin[3];
GetClientAbsOrigin(client, vOrigin);
GetClientAbsAngles(client, vAngles);
SetEntProp(clone, Prop_Data, "m_CollisionGroup", 2);
decl String:sTemp[16];
Format(sTemp, sizeof(sTemp), "target%d", client);
DispatchKeyValue(client, "targetname", sTemp);
SetVariantString(sTemp);
AcceptEntityInput(clone, "SetParent", clone, clone, 0);
SetVariantString("bleedout");
AcceptEntityInput(clone, "SetParentAttachment");
SetEntPropFloat(clone, Prop_Send, "m_flPlaybackRate", GetEntPropFloat(client, Prop_Send, "m_flPlaybackRate"));
SetEntData(clone, PropOff_nSequence, sequence);
CloneModel[client] = clone;
//ang -80 0 -90
//pos -10 -40 -20
new Float:pos[3], Float:ang[3];
ang[0] = -80.0;
ang[1] = 0.0;
ang[2] = -90.0;
pos[0] = -10.0;
pos[1] = -40.0;
pos[2] = -20.0;
TeleportEntity(CloneModel[client], pos, ang, NULL_VECTOR);
SDKHook(clone, SDKHook_SetTransmit, Hook_SetTransmit);
}
else if (PreviousAnimation[client] != sequence)
{
SetEntPropFloat(CloneModel[client], Prop_Send, "m_flPlaybackRate", GetEntPropFloat(client, Prop_Send, "m_flPlaybackRate"));
SetEntData(CloneModel[client], PropOff_nSequence, sequence);
for (new i = 0; i < 92; i += 4)
{
new prop = FindSendPropInfo("CTerrorPlayer", "m_flPoseParameter");
new prop2 = FindSendPropInfo("CDynamicProp", "m_flPoseParameter");
new value = GetEntData(client, prop + (i));
SetEntData(CloneModel[client], prop2 + (i), value);
}
SetEntPropFloat(CloneModel[client], Prop_Send, "m_flCycle", GetEntPropFloat(client, Prop_Send, "m_flCycle"));
}
}
return MRES_Ignored;
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
public void OnGameFrame
()
LoadOffset
()
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
new Handle:temp = LoadGameConfigFile("l4d2_sequence");
for (new client = 1; client <= MaxClients; client++)
{
if (temp == INVALID_HANDLE)
if (IsSurvivor(client) && !IsFakeClient(client) && IsPlayerAlive(client))
{
{
SetFailState("Error: Gamedata not found");
new sequence = GetEntData(client, PropOff_nSequence);
}
if (CloneModel[client] <= 0 || !IsValidEntity(CloneModel[client]))
{
new offset;
new clone = CreateEntityByName("prop_dynamic_override");
offset = GameConfGetOffset(temp, "CTerrorPlayer::SelectWeightedSequence");
decl String:model[64];
if (
offset =
= -1)
GetEntPropString(client, Prop_Data, "m_ModelName", model, sizeof(model));
{
if (StrContains(model, "gambler", false) != -1)
CloseHandle(temp);
{
LogError("Unable to get offset for CTerrorPlayer::SelectWeightedSequence");
SetEntityModel(clone, MODEL_NICK);
return;
}
}
else if (StrContains(model, "coach", false) != -1)
hSequenceSet = DHookCreate(offset, HookType_Entity, ReturnType_Int, ThisPointer_CBaseEntity, OnSequenceSet);
{
DHookAddParam(hSequenceSet, HookParamType_Int);
SetEntityModel(clone, MODEL_COACH);
}
else if (StrContains(model, "producer", false) != -1)
{
SetEntityModel(clone, MODEL_ROCHELLE);
}
else if (StrContains(model, "mechanic", false) != -1)
{
SetEntityModel(clone, MODEL_ELLIS);
}
else if (StrContains(model, "namvet", false) != -1)
{
SetEntityModel(clone, MODEL_BILL);
}
else if (StrContains(model, "teenangst", false) != -1)
{
SetEntityModel(clone, MODEL_ZOEY);
}
else
if (
StrContains(model, "biker", false) !
= -1)
{
SetEntityModel(clone, MODEL_FRANCIS);
}
else if (StrContains(model, "manager", false) != -1)
{
SetEntityModel(clone, MODEL_LOUIS);
}
else
{
AcceptEntityInput(clone, "Kill");
LogError("Player Model %s is not supported!", model);
}
decl Float:vAngles[3];
decl Float:vOrigin[3];
GetClientAbsOrigin(client, vOrigin);
GetClientAbsAngles(client, vAngles);
SetEntProp(clone, Prop_Data, "m_CollisionGroup", 2);
decl String:sTemp[16];
Format(sTemp, sizeof(sTemp), "target%d", client);
DispatchKeyValue(client, "targetname", sTemp);
SetVariantString(sTemp);
AcceptEntityInput(clone, "SetParent", clone, clone, 0);
SetVariantString("bleedout");
AcceptEntityInput(clone, "SetParentAttachment");
SetEntPropFloat(clone, Prop_Send, "m_flPlaybackRate", GetEntPropFloat(client, Prop_Send, "m_flPlaybackRate"));
SetEntData(clone, PropOff_nSequence, sequence);
CloneModel[client] = clone;
//ang -80 0 -90
//pos -10 -40 -20
new Float:pos[3], Float:ang[3];
ang[0] = -80.0;
ang[1] = 0.0;
ang[2] = -90.0;
pos[0] = -10.0;
pos[1] = -40.0;
pos[2] = -20.0;
TeleportEntity(CloneModel[client], pos, ang, NULL_VECTOR);
SDKHook(clone, SDKHook_SetTransmit, Hook_SetTransmit);
}
if (!PreviousAnimation[client])
{
PreviousAnimation[client] = sequence;
}
else if (PreviousAnimation[client] != sequence && PreviousAnimation[client] > 0)
{
new Float:angs[3];
GetEntPropVector(client, Prop_Send, "m_angRotation", angs);
SetEntPropFloat(CloneModel[client], Prop_Send, "m_flPlaybackRate", GetEntPropFloat(client, Prop_Send, "m_flPlaybackRate"));
SetEntData(CloneModel[client], PropOff_nSequence, sequence);
for (new i = 0; i < 92; i += 4)
{
new prop = FindSendPropInfo("CTerrorPlayer", "m_flPoseParameter");
new prop2 = FindSendPropInfo("CDynamicProp", "m_flPoseParameter");
new value = GetEntData(client, prop + (i));
SetEntData(CloneModel[client], prop2 + (i), value);
}
SetEntPropFloat(CloneModel[client], Prop_Send, "m_flCycle", GetEntPropFloat(client, Prop_Send, "m_flCycle"));
}
}
}
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
stock bool:IsSurvivor(client)
stock bool:IsSurvivor(client)
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
return client > 0 && client <= MaxClients && IsClientInGame(client) && GetClientTeam(client) == 2;
return client > 0 && client <= MaxClients && IsClientInGame(client) && GetClientTeam(client) == 2;
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
SetVector(Float:target[3], Float:x, Float:y, Float:z)
SetVector(Float:target[3], Float:x, Float:y, Float:z)
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
target[0] = x;
target[0] = x;
target[1] = y;
target[1] = y;
target[2] = z;
target[2] = z;
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
public Action:ViewAngles(client, args)
public Action:ViewAngles(client, args)
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
new Float:angles[3];
new Float:angles[3];
GetEntPropVector(CloneModel[client], Prop_Send, "m_vecAngles", angles);
GetEntPropVector(CloneModel[client], Prop_Send, "m_vecAngles", angles);
PrintToChatAll("%f %f %f", angles[0], angles[1], angles[2]);
PrintToChatAll("%f %f %f", angles[0], angles[1], angles[2]);
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
public Action:ChangeAngles(client, args)
public Action:ChangeAngles(client, args)
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
new String:buffer[32];
new String:buffer[32];
new Float:x, Float:y, Float:z, Float:ang[3];
new Float:x, Float:y, Float:z, Float:ang[3];
GetCmdArg(1, buffer, sizeof(buffer));
GetCmdArg(1, buffer, sizeof(buffer));
x = StringToFloat(buffer);
x = StringToFloat(buffer);
GetCmdArg(2, buffer, sizeof(buffer));
GetCmdArg(2, buffer, sizeof(buffer));
y = StringToFloat(buffer);
y = StringToFloat(buffer);
GetCmdArg(3, buffer, sizeof(buffer));
GetCmdArg(3, buffer, sizeof(buffer));
z = StringToFloat(buffer);
z = StringToFloat(buffer);
SetVector(ang, x, y, z);
SetVector(ang, x, y, z);
if (CloneModel[client] > 0 && IsValidEntS(CloneModel[client], "prop_dynamic_override"))
if (CloneModel[client] > 0 && IsValidEntS(CloneModel[client], "prop_dynamic_override"))
{
{
TeleportEntity(CloneModel[client], NULL_VECTOR, ang, NULL_VECTOR);
TeleportEntity(CloneModel[client], NULL_VECTOR, ang, NULL_VECTOR);
}
}
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
public Action:ChangePosition(client, args)
public Action:ChangePosition(client, args)
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
new String:buffer[32];
new String:buffer[32];
new Float:x, Float:y, Float:z, Float:ang[3];
new Float:x, Float:y, Float:z, Float:ang[3];
GetCmdArg(1, buffer, sizeof(buffer));
GetCmdArg(1, buffer, sizeof(buffer));
x = StringToFloat(buffer);
x = StringToFloat(buffer);
GetCmdArg(2, buffer, sizeof(buffer));
GetCmdArg(2, buffer, sizeof(buffer));
y = StringToFloat(buffer);
y = StringToFloat(buffer);
GetCmdArg(3, buffer, sizeof(buffer));
GetCmdArg(3, buffer, sizeof(buffer));
z = StringToFloat(buffer);
z = StringToFloat(buffer);
SetVector(ang, x, y, z);
SetVector(ang, x, y, z);
if (CloneModel[client] > 0 && IsValidEntS(CloneModel[client], "prop_dynamic_override"))
if (CloneModel[client] > 0 && IsValidEntS(CloneModel[client], "prop_dynamic_override"))
{
{
TeleportEntity(CloneModel[client], ang, NULL_VECTOR, NULL_VECTOR);
TeleportEntity(CloneModel[client], ang, NULL_VECTOR, NULL_VECTOR);
}
}
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
IsValidEntS(ent, String:classname[64])
IsValidEntS(ent, String:classname[64])
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
if (IsValidEnt(ent))
if (IsValidEnt(ent))
{
{
decl String:name[64];
decl String:name[64];
GetEdictClassname(ent, name, 64);
GetEdictClassname(ent, name, 64);
if (StrEqual(classname, name))
if (StrEqual(classname, name))
{
{
return true;
return true;
}
}
}
}
return false;
return false;
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
IsValidEnt(ent)
IsValidEnt(ent)
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
if (ent > 0 && IsValidEdict(ent) && IsValidEntity(ent))
if (ent > 0 && IsValidEdict(ent) && IsValidEntity(ent))
{
{
return true;
return true;
}
}
return false;
return false;
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
public Action:Hook_SetTransmit(entity, client)
public Action:Hook_SetTransmit(entity, client)
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
if
(!IsSurvivor(client))
if
(!IsSurvivor(client))
{
{
return Plugin_Handled;
return Plugin_Handled;
}
}
if (entity != CloneModel[client] || GetEntPropFloat(client, Prop_Send, "m_TimeForceExternalView") > 0.0
if (entity != CloneModel[client] || GetEntPropFloat(client, Prop_Send, "m_TimeForceExternalView") > 0.0
|| GetEntProp(client, Prop_Send, "m_isHangingFromLedge") == 1 || IsPlayerHeld(client) || IsIncapacitated(client) || ThirdPerson[client])
|| GetEntProp(client, Prop_Send, "m_isHangingFromLedge") == 1 || IsPlayerHeld(client) || IsIncapacitated(client) || ThirdPerson[client])
{
{
return Plugin_Handled;
return Plugin_Handled;
}
}
return Plugin_Continue;
return Plugin_Continue;
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
stock bool:IsPlayerHeld(client)
stock bool:IsPlayerHeld(client)
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
new jockey = GetEntPropEnt(client, Prop_Send, "m_jockeyAttacker");
new jockey = GetEntPropEnt(client, Prop_Send, "m_jockeyAttacker");
new charger = GetEntPropEnt(client, Prop_Send, "m_pummelAttacker");
new charger = GetEntPropEnt(client, Prop_Send, "m_pummelAttacker");
new hunter = GetEntPropEnt(client, Prop_Send, "m_pounceAttacker");
new hunter = GetEntPropEnt(client, Prop_Send, "m_pounceAttacker");
new smoker = GetEntPropEnt(client, Prop_Send, "m_tongueOwner");
new smoker = GetEntPropEnt(client, Prop_Send, "m_tongueOwner");
if (jockey > 0 || charger > 0 || hunter > 0 || smoker > 0)
if (jockey > 0 || charger > 0 || hunter > 0 || smoker > 0)
{
{
return true;
return true;
}
}
return false;
return false;
}
}
stock bool:IsIncapacitated(client)
stock bool:IsIncapacitated(client)
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
if (GetEntProp(client, Prop_Send, "m_isIncapacitated", 1) > 0)
if (GetEntProp(client, Prop_Send, "m_isIncapacitated", 1) > 0)
return true;
return true;
return false;
return false;
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
public Action:CheckClients(Handle:timer)
public Action:CheckClients(Handle:timer)
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
for (new iClientIndex = 1; iClientIndex <= MaxClients; iClientIndex++)
for (new iClientIndex = 1; iClientIndex <= MaxClients; iClientIndex++)
{
{
if (IsClientInGame(iClientIndex) && !IsFakeClient(iClientIndex))
if (IsClientInGame(iClientIndex) && !IsFakeClient(iClientIndex))
{
{
if (GetClientTeam(iClientIndex) == 2 || GetClientTeam(iClientIndex) == 3) // Only query clients on survivor or infected team, ignore spectators.
if (GetClientTeam(iClientIndex) == 2 || GetClientTeam(iClientIndex) == 3) // Only query clients on survivor or infected team, ignore spectators.
{
{
QueryClientConVar(iClientIndex, "c_thirdpersonshoulder", QueryClientConVarCallback);
QueryClientConVar(iClientIndex, "c_thirdpersonshoulder", QueryClientConVarCallback);
}
}
}
}
}
}
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
public QueryClientConVarCallback(QueryCookie:cookie, client, ConVarQueryResult:result, const String:cvarName[], const String:cvarValue[])
public QueryClientConVarCallback(QueryCookie:cookie, client, ConVarQueryResult:result, const String:cvarName[], const String:cvarValue[])
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
if (IsClientInGame(client) && !IsClientInKickQueue(client))
if (IsClientInGame(client) && !IsClientInKickQueue(client))
{
{
if (result != ConVarQuery_Okay)
if (result != ConVarQuery_Okay)
{
{
ThirdPerson[client] = true;
ThirdPerson[client] = true;
}
}
else if (!StrEqual(cvarValue, "false") && !StrEqual(cvarValue, "0"))
else if (!StrEqual(cvarValue, "false") && !StrEqual(cvarValue, "0"))
{
{
ThirdPerson[client] = true;
ThirdPerson[client] = true;
}
}
else ThirdPerson[client] = false;
else ThirdPerson[client] = false;
}
}
}
public OnAllPluginsLoaded() //late loading
{
for (new client = 1; client <= MaxClients; client++)
{
if (IsSurvivor(client))
{
clienthook[client] = DHookEntity(hSequenceSet, true, client);
}
}
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
public OnClientPutInServer(client)
{
clienthook[client] = DHookEntity(hSequenceSet, true, client);
}
सेव किए गए Diffs
ऑरिजनल टेक्स्ट
फ़ाइल खोलें
#pragma semicolon 1 #define DEBUG #define PLUGIN_AUTHOR "DeathChaos25" #define PLUGIN_VERSION "1.00" static const String:MODEL_NICK_LEGS[] = "models/survivors/survivor_gambler_legs.mdl"; static const String:MODEL_ROCHELLE_LEGS[] = "models/survivors/survivor_producer_legs.mdl"; static const String:MODEL_COACH_LEGS[] = "models/survivors/survivor_coach_legs.mdl"; static const String:MODEL_ELLIS_LEGS[] = "models/survivors/survivor_mechanic_legs.mdl"; static const String:MODEL_BILL_LEGS[] = "models/survivors/survivor_namvet_legs.mdl"; static const String:MODEL_ZOEY_LEGS[] = "models/survivors/survivor_teenangst_legs.mdl"; static const String:MODEL_FRANCIS_LEGS[] = "models/survivors/survivor_biker_legs.mdl"; static const String:MODEL_LOUIS_LEGS[] = "models/survivors/survivor_manager_legs.mdl"; static PreviousAnimation[MAXPLAYERS + 1] = -1; static CloneModel[MAXPLAYERS + 1] = -1; static CloneProp[MAXPLAYERS + 1] = -1; static bool:ThirdPerson[MAXPLAYERS + 1] = false; new PropOff_nSequence; new Handle:hSequenceSet; static clienthook[MAXPLAYERS + 1] = -1; #include <sourcemod> #include <sdktools> #include <sdkhooks> #include <dhooks> public Plugin myinfo = { name = "[L4D2] Clone", author = PLUGIN_AUTHOR, description = "", version = PLUGIN_VERSION, url = "" }; public void OnPluginStart() { PropOff_nSequence = FindSendPropInfo("CTerrorPlayer", "m_nSequence"); CreateTimer(GetRandomFloat(0.1, 0.3), CheckClients, _, TIMER_REPEAT); RegConsoleCmd("sm_view", ViewAngles); RegConsoleCmd("sm_ang", ChangeAngles); RegConsoleCmd("sm_pos", ChangePosition); LoadOffset(); } public OnPluginEnd() { for (new i = 0; i <= MAXPLAYERS; i++) { if (CloneProp[i] > 0) { AcceptEntityInput(CloneProp[i], "Kill"); } if (CloneModel[i] > 0) { AcceptEntityInput(CloneModel[i], "Kill"); } } } public OnMapStart() { CheckModelPreCache(MODEL_NICK_LEGS); CheckModelPreCache(MODEL_ROCHELLE_LEGS); CheckModelPreCache(MODEL_COACH_LEGS); CheckModelPreCache(MODEL_ELLIS_LEGS); CheckModelPreCache(MODEL_BILL_LEGS); CheckModelPreCache(MODEL_ZOEY_LEGS); CheckModelPreCache(MODEL_FRANCIS_LEGS); CheckModelPreCache(MODEL_LOUIS_LEGS); } stock CheckModelPreCache(const String:Modelfile[]) { if (!IsModelPrecached(Modelfile)) { PrecacheModel(Modelfile, true); PrintToServer("Precaching Model:%s", Modelfile); } } public MRESReturn:OnSequenceSet(pThis, Handle:hReturn, Handle:hParams) { new client = pThis; if (IsSurvivor(client) && IsPlayerAlive(client) && !IsPlayerHeld(client) && !IsFakeClient(client)) { new sequence = DHookGetReturn(hReturn); /*if (CloneProp[client] > 0 && IsValidEntity(CloneProp[client])) { new Float:Origin[3], Float:Angle[3]; GetClientAbsOrigin(client, Origin); GetClientAbsAngles(client, Angle); TeleportEntity(CloneProp[client], Origin, Angle, NULL_VECTOR); }*/ if (CloneModel[client] <= 0 || !IsValidEntity(CloneModel[client])) { new clone = CreateEntityByName("prop_dynamic_override"); decl String:model[64]; GetEntPropString(client, Prop_Data, "m_ModelName", model, sizeof(model)); if (StrContains(model, "gambler", false) != -1) { SetEntityModel(clone, MODEL_NICK_LEGS); } else if (StrContains(model, "coach", false) != -1) { SetEntityModel(clone, MODEL_COACH_LEGS); } else if (StrContains(model, "producer", false) != -1) { SetEntityModel(clone, MODEL_ROCHELLE_LEGS); } else if (StrContains(model, "mechanic", false) != -1) { SetEntityModel(clone, MODEL_ELLIS_LEGS); } else if (StrContains(model, "namvet", false) != -1) { SetEntityModel(clone, MODEL_BILL_LEGS); } else if (StrContains(model, "teenangst", false) != -1) { SetEntityModel(clone, MODEL_ZOEY_LEGS); } else if (StrContains(model, "biker", false) != -1) { SetEntityModel(clone, MODEL_FRANCIS_LEGS); } else if (StrContains(model, "manager", false) != -1) { SetEntityModel(clone, MODEL_LOUIS_LEGS); } else { AcceptEntityInput(clone, "Kill"); LogError("Player Model %s is not supported!", model); } decl Float:vAngles[3]; decl Float:vOrigin[3]; GetClientAbsOrigin(client, vOrigin); GetClientAbsAngles(client, vAngles); SetEntProp(clone, Prop_Data, "m_CollisionGroup", 2); decl String:sTemp[16]; Format(sTemp, sizeof(sTemp), "target%d", client); DispatchKeyValue(client, "targetname", sTemp); SetVariantString(sTemp); AcceptEntityInput(clone, "SetParent", clone, clone, 0); SetVariantString("bleedout"); AcceptEntityInput(clone, "SetParentAttachment"); SetEntPropFloat(clone, Prop_Send, "m_flPlaybackRate", GetEntPropFloat(client, Prop_Send, "m_flPlaybackRate")); SetEntData(clone, PropOff_nSequence, sequence); CloneModel[client] = clone; //ang -80 0 -90 //pos -10 -40 -20 new Float:pos[3], Float:ang[3]; ang[0] = -80.0; ang[1] = 0.0; ang[2] = -90.0; pos[0] = -10.0; pos[1] = -40.0; pos[2] = -20.0; TeleportEntity(CloneModel[client], pos, ang, NULL_VECTOR); SDKHook(clone, SDKHook_SetTransmit, Hook_SetTransmit); } else if (PreviousAnimation[client] != sequence) { SetEntPropFloat(CloneModel[client], Prop_Send, "m_flPlaybackRate", GetEntPropFloat(client, Prop_Send, "m_flPlaybackRate")); SetEntData(CloneModel[client], PropOff_nSequence, sequence); for (new i = 0; i < 92; i += 4) { new prop = FindSendPropInfo("CTerrorPlayer", "m_flPoseParameter"); new prop2 = FindSendPropInfo("CDynamicProp", "m_flPoseParameter"); new value = GetEntData(client, prop + (i)); SetEntData(CloneModel[client], prop2 + (i), value); } SetEntPropFloat(CloneModel[client], Prop_Send, "m_flCycle", GetEntPropFloat(client, Prop_Send, "m_flCycle")); } } return MRES_Ignored; } LoadOffset() { new Handle:temp = LoadGameConfigFile("l4d2_sequence"); if (temp == INVALID_HANDLE) { SetFailState("Error: Gamedata not found"); } new offset; offset = GameConfGetOffset(temp, "CTerrorPlayer::SelectWeightedSequence"); if (offset == -1) { CloseHandle(temp); LogError("Unable to get offset for CTerrorPlayer::SelectWeightedSequence"); return; } hSequenceSet = DHookCreate(offset, HookType_Entity, ReturnType_Int, ThisPointer_CBaseEntity, OnSequenceSet); DHookAddParam(hSequenceSet, HookParamType_Int); } stock bool:IsSurvivor(client) { return client > 0 && client <= MaxClients && IsClientInGame(client) && GetClientTeam(client) == 2; } SetVector(Float:target[3], Float:x, Float:y, Float:z) { target[0] = x; target[1] = y; target[2] = z; } public Action:ViewAngles(client, args) { new Float:angles[3]; GetEntPropVector(CloneModel[client], Prop_Send, "m_vecAngles", angles); PrintToChatAll("%f %f %f", angles[0], angles[1], angles[2]); } public Action:ChangeAngles(client, args) { new String:buffer[32]; new Float:x, Float:y, Float:z, Float:ang[3]; GetCmdArg(1, buffer, sizeof(buffer)); x = StringToFloat(buffer); GetCmdArg(2, buffer, sizeof(buffer)); y = StringToFloat(buffer); GetCmdArg(3, buffer, sizeof(buffer)); z = StringToFloat(buffer); SetVector(ang, x, y, z); if (CloneModel[client] > 0 && IsValidEntS(CloneModel[client], "prop_dynamic_override")) { TeleportEntity(CloneModel[client], NULL_VECTOR, ang, NULL_VECTOR); } } public Action:ChangePosition(client, args) { new String:buffer[32]; new Float:x, Float:y, Float:z, Float:ang[3]; GetCmdArg(1, buffer, sizeof(buffer)); x = StringToFloat(buffer); GetCmdArg(2, buffer, sizeof(buffer)); y = StringToFloat(buffer); GetCmdArg(3, buffer, sizeof(buffer)); z = StringToFloat(buffer); SetVector(ang, x, y, z); if (CloneModel[client] > 0 && IsValidEntS(CloneModel[client], "prop_dynamic_override")) { TeleportEntity(CloneModel[client], ang, NULL_VECTOR, NULL_VECTOR); } } IsValidEntS(ent, String:classname[64]) { if (IsValidEnt(ent)) { decl String:name[64]; GetEdictClassname(ent, name, 64); if (StrEqual(classname, name)) { return true; } } return false; } IsValidEnt(ent) { if (ent > 0 && IsValidEdict(ent) && IsValidEntity(ent)) { return true; } return false; } public Action:Hook_SetTransmit(entity, client) { if (!IsSurvivor(client)) { return Plugin_Handled; } if (entity != CloneModel[client] || GetEntPropFloat(client, Prop_Send, "m_TimeForceExternalView") > 0.0 || GetEntProp(client, Prop_Send, "m_isHangingFromLedge") == 1 || IsPlayerHeld(client) || IsIncapacitated(client) || ThirdPerson[client]) { return Plugin_Handled; } return Plugin_Continue; } stock bool:IsPlayerHeld(client) { new jockey = GetEntPropEnt(client, Prop_Send, "m_jockeyAttacker"); new charger = GetEntPropEnt(client, Prop_Send, "m_pummelAttacker"); new hunter = GetEntPropEnt(client, Prop_Send, "m_pounceAttacker"); new smoker = GetEntPropEnt(client, Prop_Send, "m_tongueOwner"); if (jockey > 0 || charger > 0 || hunter > 0 || smoker > 0) { return true; } return false; } stock bool:IsIncapacitated(client) { if (GetEntProp(client, Prop_Send, "m_isIncapacitated", 1) > 0) return true; return false; } public Action:CheckClients(Handle:timer) { for (new iClientIndex = 1; iClientIndex <= MaxClients; iClientIndex++) { if (IsClientInGame(iClientIndex) && !IsFakeClient(iClientIndex)) { if (GetClientTeam(iClientIndex) == 2 || GetClientTeam(iClientIndex) == 3) // Only query clients on survivor or infected team, ignore spectators. { QueryClientConVar(iClientIndex, "c_thirdpersonshoulder", QueryClientConVarCallback); } } } } public QueryClientConVarCallback(QueryCookie:cookie, client, ConVarQueryResult:result, const String:cvarName[], const String:cvarValue[]) { if (IsClientInGame(client) && !IsClientInKickQueue(client)) { if (result != ConVarQuery_Okay) { ThirdPerson[client] = true; } else if (!StrEqual(cvarValue, "false") && !StrEqual(cvarValue, "0")) { ThirdPerson[client] = true; } else ThirdPerson[client] = false; } } public OnAllPluginsLoaded() //late loading { for (new client = 1; client <= MaxClients; client++) { if (IsSurvivor(client)) { clienthook[client] = DHookEntity(hSequenceSet, true, client); } } } public OnClientPutInServer(client) { clienthook[client] = DHookEntity(hSequenceSet, true, client); }
परिवर्तित टेक्स्ट
फ़ाइल खोलें
#pragma semicolon 1 #include <sourcemod> #include <sdktools> #include <sdkhooks> #define DEBUG static const String:MODEL_NICK[] = "models/survivors/survivor_gambler.mdl"; static const String:MODEL_ROCHELLE[] = "models/survivors/survivor_producer.mdl"; static const String:MODEL_COACH[] = "models/survivors/survivor_coach.mdl"; static const String:MODEL_ELLIS[] = "models/survivors/survivor_mechanic.mdl"; static const String:MODEL_BILL[] = "models/survivors/survivor_namvet.mdl"; static const String:MODEL_ZOEY[] = "models/survivors/survivor_teenangst.mdl"; static const String:MODEL_FRANCIS[] = "models/survivors/survivor_biker.mdl"; static const String:MODEL_LOUIS[] = "models/survivors/survivor_manager.mdl"; static PreviousAnimation[MAXPLAYERS + 1] = -1; static CloneModel[MAXPLAYERS + 1] = -1; static bool:ThirdPerson[MAXPLAYERS + 1] = false; new PropOff_nSequence; public Plugin myinfo = { name = "[L4D2] View Legs", author = "[†×Ą]AYA SUPAY[Ļר]/DeathChaos", description = "Show legs in first person", version = "1.0", url = "http://steamcommunity.com/id/AyaSupay/" }; public void OnPluginStart() { PropOff_nSequence = FindSendPropInfo("CTerrorPlayer", "m_nSequence"); CreateTimer(GetRandomFloat(0.1, 0.3), CheckClients, _, TIMER_REPEAT); RegConsoleCmd("sm_view", ViewAngles); RegConsoleCmd("sm_ang", ChangeAngles); RegConsoleCmd("sm_pos", ChangePosition); } public OnMapStart() { CheckModelPreCache(MODEL_NICK); CheckModelPreCache(MODEL_ROCHELLE); CheckModelPreCache(MODEL_COACH); CheckModelPreCache(MODEL_ELLIS); CheckModelPreCache(MODEL_BILL); CheckModelPreCache(MODEL_ZOEY); CheckModelPreCache(MODEL_FRANCIS); CheckModelPreCache(MODEL_LOUIS); } stock CheckModelPreCache(const String:Modelfile[]) { if (!IsModelPrecached(Modelfile)) { PrecacheModel(Modelfile, true); PrintToServer("Precaching Model:%s", Modelfile); } } public void OnGameFrame() { for (new client = 1; client <= MaxClients; client++) { if (IsSurvivor(client) && !IsFakeClient(client) && IsPlayerAlive(client)) { new sequence = GetEntData(client, PropOff_nSequence); if (CloneModel[client] <= 0 || !IsValidEntity(CloneModel[client])) { new clone = CreateEntityByName("prop_dynamic_override"); decl String:model[64]; GetEntPropString(client, Prop_Data, "m_ModelName", model, sizeof(model)); if (StrContains(model, "gambler", false) != -1) { SetEntityModel(clone, MODEL_NICK); } else if (StrContains(model, "coach", false) != -1) { SetEntityModel(clone, MODEL_COACH); } else if (StrContains(model, "producer", false) != -1) { SetEntityModel(clone, MODEL_ROCHELLE); } else if (StrContains(model, "mechanic", false) != -1) { SetEntityModel(clone, MODEL_ELLIS); } else if (StrContains(model, "namvet", false) != -1) { SetEntityModel(clone, MODEL_BILL); } else if (StrContains(model, "teenangst", false) != -1) { SetEntityModel(clone, MODEL_ZOEY); } else if (StrContains(model, "biker", false) != -1) { SetEntityModel(clone, MODEL_FRANCIS); } else if (StrContains(model, "manager", false) != -1) { SetEntityModel(clone, MODEL_LOUIS); } else { AcceptEntityInput(clone, "Kill"); LogError("Player Model %s is not supported!", model); } decl Float:vAngles[3]; decl Float:vOrigin[3]; GetClientAbsOrigin(client, vOrigin); GetClientAbsAngles(client, vAngles); SetEntProp(clone, Prop_Data, "m_CollisionGroup", 2); decl String:sTemp[16]; Format(sTemp, sizeof(sTemp), "target%d", client); DispatchKeyValue(client, "targetname", sTemp); SetVariantString(sTemp); AcceptEntityInput(clone, "SetParent", clone, clone, 0); SetVariantString("bleedout"); AcceptEntityInput(clone, "SetParentAttachment"); SetEntPropFloat(clone, Prop_Send, "m_flPlaybackRate", GetEntPropFloat(client, Prop_Send, "m_flPlaybackRate")); SetEntData(clone, PropOff_nSequence, sequence); CloneModel[client] = clone; //ang -80 0 -90 //pos -10 -40 -20 new Float:pos[3], Float:ang[3]; ang[0] = -80.0; ang[1] = 0.0; ang[2] = -90.0; pos[0] = -10.0; pos[1] = -40.0; pos[2] = -20.0; TeleportEntity(CloneModel[client], pos, ang, NULL_VECTOR); SDKHook(clone, SDKHook_SetTransmit, Hook_SetTransmit); } if (!PreviousAnimation[client]) { PreviousAnimation[client] = sequence; } else if (PreviousAnimation[client] != sequence && PreviousAnimation[client] > 0) { new Float:angs[3]; GetEntPropVector(client, Prop_Send, "m_angRotation", angs); SetEntPropFloat(CloneModel[client], Prop_Send, "m_flPlaybackRate", GetEntPropFloat(client, Prop_Send, "m_flPlaybackRate")); SetEntData(CloneModel[client], PropOff_nSequence, sequence); for (new i = 0; i < 92; i += 4) { new prop = FindSendPropInfo("CTerrorPlayer", "m_flPoseParameter"); new prop2 = FindSendPropInfo("CDynamicProp", "m_flPoseParameter"); new value = GetEntData(client, prop + (i)); SetEntData(CloneModel[client], prop2 + (i), value); } SetEntPropFloat(CloneModel[client], Prop_Send, "m_flCycle", GetEntPropFloat(client, Prop_Send, "m_flCycle")); } } } } stock bool:IsSurvivor(client) { return client > 0 && client <= MaxClients && IsClientInGame(client) && GetClientTeam(client) == 2; } SetVector(Float:target[3], Float:x, Float:y, Float:z) { target[0] = x; target[1] = y; target[2] = z; } public Action:ViewAngles(client, args) { new Float:angles[3]; GetEntPropVector(CloneModel[client], Prop_Send, "m_vecAngles", angles); PrintToChatAll("%f %f %f", angles[0], angles[1], angles[2]); } public Action:ChangeAngles(client, args) { new String:buffer[32]; new Float:x, Float:y, Float:z, Float:ang[3]; GetCmdArg(1, buffer, sizeof(buffer)); x = StringToFloat(buffer); GetCmdArg(2, buffer, sizeof(buffer)); y = StringToFloat(buffer); GetCmdArg(3, buffer, sizeof(buffer)); z = StringToFloat(buffer); SetVector(ang, x, y, z); if (CloneModel[client] > 0 && IsValidEntS(CloneModel[client], "prop_dynamic_override")) { TeleportEntity(CloneModel[client], NULL_VECTOR, ang, NULL_VECTOR); } } public Action:ChangePosition(client, args) { new String:buffer[32]; new Float:x, Float:y, Float:z, Float:ang[3]; GetCmdArg(1, buffer, sizeof(buffer)); x = StringToFloat(buffer); GetCmdArg(2, buffer, sizeof(buffer)); y = StringToFloat(buffer); GetCmdArg(3, buffer, sizeof(buffer)); z = StringToFloat(buffer); SetVector(ang, x, y, z); if (CloneModel[client] > 0 && IsValidEntS(CloneModel[client], "prop_dynamic_override")) { TeleportEntity(CloneModel[client], ang, NULL_VECTOR, NULL_VECTOR); } } IsValidEntS(ent, String:classname[64]) { if (IsValidEnt(ent)) { decl String:name[64]; GetEdictClassname(ent, name, 64); if (StrEqual(classname, name)) { return true; } } return false; } IsValidEnt(ent) { if (ent > 0 && IsValidEdict(ent) && IsValidEntity(ent)) { return true; } return false; } public Action:Hook_SetTransmit(entity, client) { if(!IsSurvivor(client)) { return Plugin_Handled; } if (entity != CloneModel[client] || GetEntPropFloat(client, Prop_Send, "m_TimeForceExternalView") > 0.0 || GetEntProp(client, Prop_Send, "m_isHangingFromLedge") == 1 || IsPlayerHeld(client) || IsIncapacitated(client) || ThirdPerson[client]) { return Plugin_Handled; } return Plugin_Continue; } stock bool:IsPlayerHeld(client) { new jockey = GetEntPropEnt(client, Prop_Send, "m_jockeyAttacker"); new charger = GetEntPropEnt(client, Prop_Send, "m_pummelAttacker"); new hunter = GetEntPropEnt(client, Prop_Send, "m_pounceAttacker"); new smoker = GetEntPropEnt(client, Prop_Send, "m_tongueOwner"); if (jockey > 0 || charger > 0 || hunter > 0 || smoker > 0) { return true; } return false; } stock bool:IsIncapacitated(client) { if (GetEntProp(client, Prop_Send, "m_isIncapacitated", 1) > 0) return true; return false; } public Action:CheckClients(Handle:timer) { for (new iClientIndex = 1; iClientIndex <= MaxClients; iClientIndex++) { if (IsClientInGame(iClientIndex) && !IsFakeClient(iClientIndex)) { if (GetClientTeam(iClientIndex) == 2 || GetClientTeam(iClientIndex) == 3) // Only query clients on survivor or infected team, ignore spectators. { QueryClientConVar(iClientIndex, "c_thirdpersonshoulder", QueryClientConVarCallback); } } } } public QueryClientConVarCallback(QueryCookie:cookie, client, ConVarQueryResult:result, const String:cvarName[], const String:cvarValue[]) { if (IsClientInGame(client) && !IsClientInKickQueue(client)) { if (result != ConVarQuery_Okay) { ThirdPerson[client] = true; } else if (!StrEqual(cvarValue, "false") && !StrEqual(cvarValue, "0")) { ThirdPerson[client] = true; } else ThirdPerson[client] = false; } }
अंतर खोजें