HLMOD.HU Forrás Megtekintés - www.hlmod.hu
  1. #include <sourcemod>
  2.  
  3. ConVar plantedcfg;
  4. ConVar roundstartcfg;
  5.  
  6. public Plugin myinfo =
  7. {
  8. name = "plantcfg",
  9. author = "Nexd",
  10. description = "https://forums.alliedmods.net/showthread.php?t=313866",
  11. version = "1.0"
  12. };
  13.  
  14. public void OnPluginStart()
  15. {
  16. HookEvent("bomb_planted", Event_BombPlanted);
  17. HookEvent("round_start", Event_RoundStart);
  18.  
  19. plantedcfg = CreateConVar("sm_plantedcfg", "planted");
  20. roundstartcfg = CreateConVar("sm_roundstartcfg", "roundstart");
  21.  
  22. AutoExecConfig(true, "plugin_plant");
  23. }
  24.  
  25. public Action Event_BombPlanted(Event event, const char[] name, bool dontBroadcast)
  26. {
  27. new String:Config1[11];
  28. GetConVarString(plantedcfg, Config1, sizeof(Config1));
  29. ServerCommand("exec %s", Config1);
  30. }
  31.  
  32. public Action Event_RoundStart(Event event, const char[] name, bool dontBroadcast)
  33. {
  34. new String:Config2[11];
  35. GetConVarString(roundstartcfg, Config2, sizeof(Config2));
  36. ServerCommand("exec %s", Config2);
  37. }