Hi all! I'm trying to fix an old plugin, specifically DPErny's "[TF2] CiviMod"
When stripping all weapons as a pyro with an item like the Thermal Thruster, the model shows up when switching classes floating behind them or in the center.
This bug works with other weapons in the Second slot, like the medic's quick fix and so on.
Here's DPErny's Code:
Quote:
PHP Code:
#include <sourcemod> #include <tf2_stocks> public Plugin:myinfo = { name = "CiviMod", author = "DPErny", description = "Allows Civilian on any class, any time", version = "1.0", url = "ubercharged.net/forum/index" }; public OnPluginStart() { LoadTranslations("common.phrases") CreateConVar("sm_civimod_version", "1.0", "CiviMod Version", FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY); CreateConVar("civil_all", "1", "Set to 1 to allow players to Civilize themselves."); AutoExecConfig(); RegConsoleCmd("sm_civilizeme", command_clcivilize, "Makes you into a Civilian"); RegAdminCmd("sm_civilize", command_admcivilize, ADMFLAG_SLAY, "Make anyone Civilian. Note: can be undone through resupply"); }
public Action:command_clcivilize(client, args) { new cando = FindConVar ("civil_all");
if (GetConVarBool(cando)) { if (TF2_GetPlayerClass(client) != TFClass_Engineer) { TF2_RemoveAllWeapons(client); PrintToChat (client, "[CiviMod] You have been Civilized. Please note that using a resupply cabinet will uncivilize you."); } } else { PrintToChat (client, "[CiviMod] Engineers do not have access to Civilize"); }
}
public Action:command_admcivilize(client, args) { new String:civitarget[32]; GetCmdArg(1, civitarget, sizeof(civitarget)); new i = FindTarget(client, civitarget);
TF2_RemoveAllWeapons(i); PrintToChat(i, "You have been Civilized."); PrintToChat(i, "The target has been Civilized."); }
|
What would be the best way to fix this, as I'm at a loss on how to reset models.
The only way to fix this in-game is to join Spectator and then rejoin as a class.