Skip to content

Commit 9b6b1d2

Browse files
committed
Run script code in root scope
1 parent 091ee6c commit 9b6b1d2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

addons/sourcemod/scripting/tfco_donations.sp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,7 @@ void OnTotalUpdated(int amount, bool bSilent = false)
195195
char szScriptCode[256];
196196
Format(szScriptCode, sizeof(szScriptCode), "UpdateTextEntities(\"%s\", %s)", message, bSilent ? "true" : "false");
197197

198-
SetVariantString(szScriptCode);
199-
AcceptEntityInput(0, "RunScriptCode");
198+
ServerCommand("script %s", szScriptCode);
200199
}
201200

202201
static void OnDuckSpawnPost(int entity)

0 commit comments

Comments
 (0)