Killstreak HUD GSC Error
-
Keep getting and error when i try to display the killstreak counter on my HUD in private match. The error says "unexpected &" and when i remove the "&" the text for "killstreak" doesnt pop up. Heres the code i took from a forum:
#include maps\mp\gametypes_hud_util;
init() {
level thread onPlayerConnect();
}onPlayerConnect() {
for (;;) {
level waittill("connected", player);
player thread killstreakPlayer();
}
}killstreakPlayer() {
self endon("disconnect");
level endon("game_ended");
self.hudkillstreak = createFontString("Objective", 1);
self.hudkillstreak setPoint("CENTER", "TOP", "CENTER", 10);
self.hudkillstreak.label = & "^5KILLSTREAK: ^7";while (true) { self.hudkillstreak setValue(self.pers["cur_kill_streak"]); wait 0.5; }
}
-
Read the topic from where you downloaded it. I answered and fixed all the warnings/errors it was throwing
-
Resxt i got it from here : https://github.com/whoismh11/plutoiw5-scripts#how-to-use
and cant find ur comments -
nvm i just used ur new gsc script and it works even better!
-
12345abcdefgh ah that's someone who copied it in his Github ok
https://forum.plutonium.pw/topic/10826/hud-killstreak-player/9