diff --git a/AdminCheats/scripting/AdminCheats.sp b/AdminCheats/scripting/AdminCheats.sp index 43d10f62..92abae96 100644 --- a/AdminCheats/scripting/AdminCheats.sp +++ b/AdminCheats/scripting/AdminCheats.sp @@ -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); +} diff --git a/SprayManager/scripting/SprayManager.sp b/SprayManager/scripting/SprayManager.sp index 37e25b51..9227de6c 100644 --- a/SprayManager/scripting/SprayManager.sp +++ b/SprayManager/scripting/SprayManager.sp @@ -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; diff --git a/season_halloween/scripting/season_halloween.sp b/season_halloween/scripting/season_halloween.sp index 43e7135e..fd8d2b1a 100644 --- a/season_halloween/scripting/season_halloween.sp +++ b/season_halloween/scripting/season_halloween.sp @@ -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); } //---------------------------------------------------------------------------------------------------- diff --git a/season_xmas/scripting/season_xmas.sp b/season_xmas/scripting/season_xmas.sp index 4e220869..93d2c398 100644 --- a/season_xmas/scripting/season_xmas.sp +++ b/season_xmas/scripting/season_xmas.sp @@ -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)