minor changes
This commit is contained in:
parent
09868ec493
commit
90a9edf69a
@ -23,6 +23,8 @@ public void OnPluginStart()
|
||||
g_CVar_sv_cheats.AddChangeHook(OnConVarChanged);
|
||||
g_CVar_sv_cheats.SetInt(1);
|
||||
|
||||
MakeCheatCommand("give");
|
||||
|
||||
int NumHooks = 0;
|
||||
char sConCommand[128];
|
||||
bool IsCommand;
|
||||
@ -108,7 +110,9 @@ public Action OnCheatCommand(int client, const char[] command, int argc)
|
||||
|
||||
if(StrEqual(command, "noclip") && IsPlayerAlive(client))
|
||||
ShowActivity2(client, "[SM] ", "toggled noclip on himself.");
|
||||
|
||||
LogAction(client, -1, "\"%L\" used cheat command: \"%s\"", client, command);
|
||||
|
||||
return Plugin_Continue;
|
||||
}
|
||||
|
||||
@ -128,3 +132,10 @@ public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3
|
||||
|
||||
return Plugin_Continue;
|
||||
}
|
||||
|
||||
stock void MakeCheatCommand(const char[] name)
|
||||
{
|
||||
int Flags = GetCommandFlags(name);
|
||||
if(Flags != INVALID_FCVAR_FLAGS)
|
||||
SetCommandFlags(name, FCVAR_CHEAT | Flags);
|
||||
}
|
||||
|
@ -3067,7 +3067,7 @@ stock bool TracePlayerAngles(int client, float vecResult[3])
|
||||
if ((iEntity = TR_GetEntityIndex(hTraceRay)) >= 0)
|
||||
g_iDecalEntity[client] = iEntity;
|
||||
|
||||
PrintToServer("ent: %d", iEntity);
|
||||
//PrintToServer("ent: %d", iEntity);
|
||||
|
||||
delete hTraceRay;
|
||||
|
||||
|
@ -837,10 +837,22 @@ public void OnEntitySpawned(int Entity, const char[] sClassname)
|
||||
if (g_iCollected[iOwner] < g_hCVar_MilestoneGrenade.IntValue)
|
||||
return;
|
||||
|
||||
SetEntityRenderMode(Entity, RENDER_NONE);
|
||||
RequestFrame(PostNadeSpawn, EntIndexToEntRef(Entity));
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public void PostNadeSpawn(int iEntRef)
|
||||
{
|
||||
int iEntity = EntRefToEntIndex(iEntRef);
|
||||
if (!IsValidEntity(iEntity))
|
||||
return;
|
||||
|
||||
SetEntityRenderMode(iEntity, RENDER_NONE);
|
||||
|
||||
float fNadeOrigin[3];
|
||||
GetEntPropVector(Entity, Prop_Send, "m_vecOrigin", fNadeOrigin);
|
||||
GetEntPropVector(iEntity, Prop_Send, "m_vecOrigin", fNadeOrigin);
|
||||
|
||||
int iNadeProp = CreateEntityAtOrigin("prop_dynamic_override", fNadeOrigin);
|
||||
DispatchKeyFormat(iNadeProp, "targetname", "season_nade_prop_%d", g_iCounter);
|
||||
@ -851,7 +863,7 @@ public void OnEntitySpawned(int Entity, const char[] sClassname)
|
||||
DispatchKeyFormat(iNadeProp, "modelscale", "0.35");
|
||||
|
||||
SpawnAndActivate(iNadeProp);
|
||||
ParentToEntity(iNadeProp, Entity);
|
||||
ParentToEntity(iNadeProp, iEntity);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
|
@ -812,6 +812,9 @@ public void ZR_OnClientInfected(int client, int attacker, bool motherInfect, boo
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public void OnEntitySpawned(int Entity, const char[] sClassname)
|
||||
{
|
||||
if (StrContains(sClassname, "_projectile", false) == -1)
|
||||
|
Loading…
Reference in New Issue
Block a user