Permalink
Browse files

Remove shop item if we don't find the required plugin

  • Loading branch information...
Bara committed May 11, 2018
1 parent e15ccca commit 16e8a4ad044a489c2796c2d6c0c0b393f81168cd
@@ -52,17 +52,22 @@ public void OnPluginStart()
HookEvent("player_spawn", Event_PlayerSpawn);
}
public void OnConfigsExecuted()
public void OnAllPluginsLoaded()
{
char sFile[] = "cameras-and-drones.smx";
Handle hPlugin = FindPluginByFile(sFile);
if (hPlugin == null || GetPluginStatus(hPlugin) != Plugin_Running)
{
TTT_RemoveCustomItem(CAMERA_SHORT_NAME);
TTT_RemoveCustomItem(DRONE_SHORT_NAME);
SetFailState("You must have this plugin as base plugin for this items: https://forums.alliedmods.net/showthread.php?p=2537127");
return;
}
}
public void OnConfigsExecuted()
{
RegisterItem();
}
@@ -135,17 +135,35 @@ public void OnPluginStart()
HookEvent("player_spawn", Event_PlayerSpawn);
}
public void OnConfigsExecuted()
public void OnAllPluginsLoaded()
{
char sFile[] = "futuristicgrenades.smx";
Handle hPlugin = FindPluginByFile(sFile);
if (hPlugin == null || GetPluginStatus(hPlugin) != Plugin_Running)
{
TTT_RemoveCustomItem(FUTURISTIC_I);
TTT_RemoveCustomItem(FUTURISTIC_T);
TTT_RemoveCustomItem(FUTURISTIC_D);
TTT_RemoveCustomItem(FF_SNAME_I);
TTT_RemoveCustomItem(FF_SNAME_T);
TTT_RemoveCustomItem(FF_SNAME_D);
TTT_RemoveCustomItem(BH_SNAME_I);
TTT_RemoveCustomItem(BH_SNAME_T);
TTT_RemoveCustomItem(BH_SNAME_D);
TTT_RemoveCustomItem(FE_SNAME_I);
TTT_RemoveCustomItem(FE_SNAME_T);
TTT_RemoveCustomItem(FE_SNAME_D);
TTT_RemoveCustomItem(FI_SNAME_I);
TTT_RemoveCustomItem(FI_SNAME_T);
TTT_RemoveCustomItem(FI_SNAME_D);
SetFailState("You must have this plugin as base plugin for this items: https://forums.alliedmods.net/showthread.php?p=2499362");
return;
}
}
public void OnConfigsExecuted()
{
RegisterItem();
}
@@ -43,17 +43,21 @@ public void OnPluginStart()
HookEvent("player_spawn", Event_PlayerSpawn);
}
public void OnConfigsExecuted()
public void OnAllPluginsLoaded()
{
char sFile[] = "AdvancedParachute.smx";
Handle hPlugin = FindPluginByFile(sFile);
if (hPlugin == null || GetPluginStatus(hPlugin) != Plugin_Running)
{
TTT_RemoveCustomItem(SHORT_NAME);
SetFailState("You must have this plugin as base plugin for this item: https://forums.alliedmods.net/showthread.php?p=2534158");
return;
}
}
public void OnConfigsExecuted()
{
RegisterItem();
}
@@ -50,7 +50,7 @@ public void OnPluginStart()
LoadTranslations("ttt.phrases");
}
public void OnConfigsExecuted()
public void OnAllPluginsLoaded()
{
char sFile[] = "ttt_player_hud.smx";
Handle hPlugin = FindPluginByFile(sFile);
@@ -59,7 +59,10 @@ public void OnConfigsExecuted()
{
SetFailState("Old player hud file found! Please delete '%s'", sFile);
}
}
public void OnConfigsExecuted()
{
CreateTimer(g_cTimer.FloatValue, Timer_UpdateText, _, TIMER_REPEAT);
}
@@ -52,6 +52,7 @@ public void OnAllPluginsLoaded()
if (hPlugin == null || GetPluginStatus(hPlugin) != Plugin_Running)
{
TTT_RemoveCustomItem(SHORT_NAME_D);
SetFailState("You must have this plugin as base plugin for this items: https://forums.alliedmods.net/showthread.php?t=303333");
return;
}
@@ -43,17 +43,21 @@ public void OnPluginStart()
TTT_EndConfig();
}
public void OnConfigsExecuted()
public void OnAllPluginsLoaded()
{
char sFile[] = "tripmines.smx";
Handle hPlugin = FindPluginByFile(sFile);
if (hPlugin == null || GetPluginStatus(hPlugin) != Plugin_Running)
{
TTT_RemoveCustomItem(SHORTNAME_T);
SetFailState("Can't find tripmines.smx! This file will be provided with TTT.");
return;
}
}
public void OnConfigsExecuted()
{
RegisterItem();
}

0 comments on commit 16e8a4a

Please sign in to comment.