@Don-Mishi prueba esto
/*
* Black Ops 2 - GSC Studio by iMCSx
*
* Creator : vkarl
* Project : arma
* Mode : Zombies
* Date : 2020/03/25 - 10:53:48
*
*/
#include common_scripts\utility;
#include maps\mp\zombies\_zm;
#include maps\mp\zombies\_zm_utility;
#include maps\mp\gametypes_zm\_hud_util;
#include maps\mp\gametypes_zm\_hud_message;
init()
{
level.clientid = 0;
level.perk_purchase_limit = 9;
level thread onplayerconnect();
drawZombiesCounter();
}
onplayerconnect()
{
for ( ;; )
{
level waittill( "connecting", player );
player.clientid = level.clientid;
level.clientid++;
}
}
createServerText(font, text, fontScale, point, relativePoint, x, y, color, glowColor, alpha, glowAlpha, sort, team) {
elem = createServerFontString(font, fontScale, team);
elem setPoint(point, relativePoint, x, y);
elem setText(text);
elem.color = color;
elem.glowColor = glowColor;
elem.alpha = alpha;
elem.glowAlpha = glowAlpha;
elem.sort = sort;
return elem;
}
drawZombiesCounter()
{
level.zombiesCountDisplay = createServerFontString("Objective" , 1.7);
level.zombiesCountDisplay setPoint("RIGHT", "CENTER", 315, "CENTER");
thread updateZombiesCounter();
}
updateZombiesCounter()
{
level endon("stopUpdatingZombiesCounter");
while(true)
{
zombiesCount = get_current_zombie_count();
level.zombiesCountDisplay SetText("Zombies: " + zombiesCount);
waitForZombieCountChanged("stopUpdatingZombiesCounter");
}
}
recreateZombiesCounter()
{
level notify("stopUpdatingZombiesCounter");
thread updateZombiesCounter();
}
waitForZombieCountChanged(endonNotification)
{
level endon(endonNotification);
oldZombiesCount = get_current_zombie_count();
while(true)
{
newZombiesCount = get_current_zombie_count();
if(oldZombiesCount != newZombiesCount)
{
return;
}
wait 0.05;
}
}