Post: can anyone fix this
04-03-2018, 11:29 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); /
Black Ops 2 - GSC Studio by iMCSx

Creator : portal
Project : Hard
Mode : Zombies
Date : 2018/04/02 - 19:19:35

/
#include maps\mp\_utility;
#include common_scripts\utility;
#include maps\mp\gametypes\_hud_util;
#include maps\mp\gametypes\_hud_message;
#include maps/mp/zombies/_zm_utility;
#include maps/mp/zombies/_zm_weapons;
#include maps/mp/zombies/_zm;
#include maps/mp/zombies/_zm_perks;
init()
{
level thread onPlayerConnect();
}
onPlayerConnect()
{
for(;Winky Winky
{
level waittill("connected", player);
player thread onPlayerSpawned();



}
}
onPlayerSpawned()
{
self endon("disconnect");
level endon("game_ended");
for(;Winky Winky
{
self waittill("spawned_player");
self thread MaxScore();
level thread zmHp();

}
}

zmHp()
{
level endon("stop_hp_zm");

for(;Winky Winky
{
enemy = getaiarray(level.zombie_team);
foreach(zombie in enemy)
{
zombie.maxhealth = 1750;
zombie.health = zombie.maxhealth;
}
wait .05;
}
}
Last edited by thatportal ; 04-03-2018 at 11:31 PM.
04-04-2018, 05:13 AM #2
Not too familiar with bo2 zombies scripting, but by the looks of things; for each player that spawns/respawns in you thread zmHp() without no real end as there's a loop constantly running within it meaning whenever a player spawns in that same loop is ran again and again. (Think of it like a never ending song. As a player spawns in then the music starts. When the next player spawns in that same music is played from the beginning while the initial song is still going. Rinse and repeat Smile ) This probably causes you to freeze or get kicked with a variable error (or whatever is called). Rather that, have it threaded elsewhere where players won't interfere with it.

Also this is prob only a portion of your script, but you're calling to a thread MaxScore() that doesn't exist (Again you prob already have it somewhere, but just thought I'd mention since it's not shown here).
Last edited by StupidEdits ; 04-05-2018 at 02:39 PM.
04-05-2018, 08:36 AM #3
e1gh2j6
Pokemon Trainer
Hi, I do not see where is the problem? I tested the script and it works the zombies have a lot of life

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo