Skip to content

Commit

Permalink
Run script code in root scope
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikusch committed Dec 6, 2024
1 parent 091ee6c commit 9b6b1d2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions addons/sourcemod/scripting/tfco_donations.sp
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,7 @@ void OnTotalUpdated(int amount, bool bSilent = false)
char szScriptCode[256];
Format(szScriptCode, sizeof(szScriptCode), "UpdateTextEntities(\"%s\", %s)", message, bSilent ? "true" : "false");

SetVariantString(szScriptCode);
AcceptEntityInput(0, "RunScriptCode");
ServerCommand("script %s", szScriptCode);
}

static void OnDuckSpawnPost(int entity)
Expand Down

0 comments on commit 9b6b1d2

Please sign in to comment.