Hi everyone today i see the script on COD 4 of the Custom XP Text
And i see how to port i found the code in _rank.gsc but when i put it in my menu it say a syntax error.
The code :
So thx a lot if u help me and its can be good in other menu
And i see how to port i found the code in _rank.gsc but when i put it in my menu it say a syntax error.
The code :
updaterankscorehud(amount)
{
self endon("disconnect");
self endon("joined_team");
self endon("joined_spectators");
if (isDefined(level.usingmomentum) && level.usingmomentum)
{
return;
}
if (amount == 0)
{
return;
}
self notify("update_score");
self endon("update_score");
self.rankupdatetotal = self.rankupdatetotal + amount;
wait 0,05;
if (isDefined(self.hud_rankscroreupdate))
{
if (self.rankupdatetotal < 0)
{
self.hud_rankscroreupdate.label = &"";
self.hud_rankscroreupdate.color = (0,73, 0,19, 0,19);
}
else
{
self.hud_rankscroreupdate.label = &"MP_PLUS";
self.hud_rankscroreupdate.color = (1, 1, 0,5);
}
self.hud_rankscroreupdate setvalue(self.rankupdatetotal);
self.hud_rankscroreupdate.alpha = 0,85;
self.hud_rankscroreupdate thread maps/mp/gametypes/_hud::fontpulse(self);
wait 1;
self.hud_rankscroreupdate fadeovertime(0,75);
self.hud_rankscroreupdate.alpha = 0;
self.rankupdatetotal = 0;
}
}
{
self endon("disconnect");
self endon("joined_team");
self endon("joined_spectators");
if (isDefined(level.usingmomentum) && level.usingmomentum)
{
return;
}
if (amount == 0)
{
return;
}
self notify("update_score");
self endon("update_score");
self.rankupdatetotal = self.rankupdatetotal + amount;
wait 0,05;
if (isDefined(self.hud_rankscroreupdate))
{
if (self.rankupdatetotal < 0)
{
self.hud_rankscroreupdate.label = &"";
self.hud_rankscroreupdate.color = (0,73, 0,19, 0,19);
}
else
{
self.hud_rankscroreupdate.label = &"MP_PLUS";
self.hud_rankscroreupdate.color = (1, 1, 0,5);
}
self.hud_rankscroreupdate setvalue(self.rankupdatetotal);
self.hud_rankscroreupdate.alpha = 0,85;
self.hud_rankscroreupdate thread maps/mp/gametypes/_hud::fontpulse(self);
wait 1;
self.hud_rankscroreupdate fadeovertime(0,75);
self.hud_rankscroreupdate.alpha = 0;
self.rankupdatetotal = 0;
}
}