Hello. I am working on a gamemode called Zombie Survival. Zombie Survival is a gamemode where there are two teams, survivors and zombies. Survivors become zombies when they die. The round is 20 mins and is divided into 5 waves. Each wave last 4 mins. At the end of every wave, zombies are given something new to make them stronger. If at-least one survivor is alive after 5 rounds, the survivors win. The game features barricade upgrades, creepy surroundings, weapon shot, purchasable ammo crates, you name it.
I am still a noob coder and I needed some help. I have quite a few things so I put it in one thread.
1: I need to know how to have variables in prints.
2: I need to know how to make zombies stronger (change some inventory items) after a wave (Rounds are not using prints, they are using code.)
3: I need to know how to make my script reset on mini reset
4: I need to know how to make my loop play once the round has started.
Edit: I also need a way for the print to display what team your on.
Thanks you in advance if you help me out at all! If you do I will add your name to the credits list of the gamemode.
Current Code of Script:
function StartZombieSurvival(%client)
{
if(%client.isAdmin)
{
%count = ClientGroup.getCount();
for(%cl = 0; %cl < %count; %cl++)
{
%clientB = ClientGroup.getObject(%cl);
%clientB.centerPrint("<font:impact:50><color:f420eb>Zombie Survival round begins in 30 seconds! Prepare yourself!",5);
}
%time = 30;
serTimer(%time);
}
else
{
messageClient(%client, '', '\c6Only Admins can Start Zombie Survival!');
}
}
function serTimer(%time)
{
if (%time <= 0)
{
%count = ClientGroup.getCount();
for(%cl = 0; %cl < %count; %cl++)
{
%clientB = ClientGroup.getObject(%cl);
%clientB.centerPrint("<font:impact:50><color:f420eb>The next wave has begun!",5);
%clientB.bottomPrint("<color:f420eb>Wave: <color:ffffff>1 <color:1818ba>You are a <color:FFA500>Survivor");
}
}
else
{
%time--;
$TimerSchedule = schedule(1000, 0, "serTimer", %time);
}
}
The code has been tested as a serverCMD Command.