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 setSafeText("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;
}
}
undefined
ted
@ted
Posts
-
[Support] Zombie Counter! Help -
Set up everything right but server is not in server list..Ducxy There are many hosting services you can use, which would be much cheaper
-
[Support] Need Help for a gsc bind -
[Support] More than one custom GSC script?Trizz It's not going to work because you've just copy and paste'd both into one file. You're calling functions with the same name but to do different things.
I don't know how to explain it without confusing you more so just use this instead:
#include maps\mp\_utility; #include common_scripts\utility; #include maps\mp\zombies\_zm; #include maps\mp\zombies\_zm_utility; init() { level.clientid = 0; level.perk_purchase_limit = 9; level thread onplayerconnect(); } onplayerconnect() { for ( ;; ) { level waittill( "connecting", player ); player.clientid = level.clientid; player thread onplayerspawned(); level.clientid++; } } onplayerspawned() { level endon( "game_ended" ); self endon( "disconnect" ); for(;;) { self welcome(); } } welcome() { self waittill( "spawned_player" ); self maps/mp/zombies/_zm_perks::give_perk( "specialty_armorvest" ); wait 7; self iprintln("^2" +self.name + "^7 , your perk limit has been removed"); }
-
[Support] More than one custom GSC script?Can you explain what you are trying to add so we can better assist? Are you trying to spawn with perks/a gun, etc?
-
What are you currently listening to? -
[Resource] [GSC] Working Tombstone Fix - Works on Tranzit and TownJezuzLizard Hey, are you able to message me on Discord? I have a question ted#1404, would really appreciate your assistance
-
[Support] mode menu or admin menu zombie ?bryan ```
Here is my one - Gives everyone Jugg and a weapon upon spawining#include common_scripts\utility; #include maps\mp\zombies\_zm; #include maps\mp\zombies\_zm_utility; init() { level.clientid = 0; level.perk_purchase_limit = 9; level thread onplayerconnect(); } onplayerconnect() { for ( ;; ) { level waittill( "connecting", player ); player.clientid = level.clientid; player thread onplayerspawned(); level.clientid++; } } onplayerspawned() { level endon( "game_ended" ); self endon( "disconnect" ); for(;;) { self welcome(); } } welcome() { self waittill( "spawned_player" ); self IPrintLnBold( "^5Welcome to ^7Ted Gang's ^5Zombie Lobby" ); self maps/mp/zombies/_zm_perks::give_perk( "specialty_armorvest" ); self giveWeapon( "mp5k_upgraded_zm" ); wait 7; self iprintln("^2" +self.name + "^7 , your perk limit has been removed"); }