Skip to content

Commit 8dec4df

Browse files
committed
Run from worldspawn scope and don't delete events
1 parent ae0835e commit 8dec4df

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

addons/sourcemod/scripting/tfco_donations.sp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include <sdkhooks>
77
#include <ripext>
88

9-
#define PLUGIN_VERSION "1.0.3"
9+
#define PLUGIN_VERSION "1.0.4"
1010

1111
#define TFCONNECT_TAG "\x01[\a9E3083TFConnect\x01] "
1212

@@ -97,7 +97,8 @@ public void OnMapStart()
9797

9898
AddFileToDownloadsTable("sound/" ... CROAKER_SOUND);
9999

100-
ServerCommand("script_execute %s", DONATION_SCRIPT_FILE);
100+
SetVariantString(DONATION_SCRIPT_FILE);
101+
AcceptEntityInput(0, "RunScriptFile");
101102
}
102103

103104
public void OnConfigsExecuted()

scripts/vscripts/tfco_donations.nut

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ const TFCO_DONATION_TEXT_SIZE = 20
66
local EventsID = UniqueString()
77
getroottable()[EventsID] <-
88
{
9-
OnGameEvent_scorestats_accumulated_update = function(params)
10-
{
11-
delete getroottable()[EventsID]
12-
}
13-
149
OnGameEvent_teamplay_round_start = function(params)
1510
{
1611
if (!Convars.GetBool("sm_tfco_donation_enabled"))

0 commit comments

Comments
 (0)