ItsMods

Full Version: Code for choosing someone for "Zombie".
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Can someone post the code? Smile Thanks
theres no one way to do that havea look at any zombie mod and look for the function pickzombie or something , i've been going through zombie mods the last few days and i've seen maybe 4 codes for this
Code:
zombie = random(level.players);
//do stuff for zombie...

if you looked in any zombie mod you would easily find something like this
(07-06-2011, 01:55)[CoDBOMod]Nukem Wrote: [ -> ]
Code:
zombie = random(level.players);
//do stuff for zombie...

if you looked in any zombie mod you would easily find something like this

i did and the code chose someone but there was the problem..he was not alone in the team? Smile
you need to switch the player of course
(07-06-2011, 10:17)d0h! Wrote: [ -> ]you need to switch the player of course

what you mean?
(07-07-2011, 01:38)GOVNO12 Wrote: [ -> ]
(07-06-2011, 10:17)d0h! Wrote: [ -> ]you need to switch the player of course

what you mean?

Something like


Code:
onplayerspawned() {
self menuresponse(["changeteam_axis"]); //Not the right one, i dont know the right one ;D
}
And after the zombie is choosen switch him from Axis to Allies team with something like
Code:
self menuresponse(["changeteam_allies"]);

inside you _rank.gsc
in other words..

Code:
pickzombie()
{
RandomPlayer = randomInt( level.players.size );
level.Zombie = level.players[RandomPlayer];
level.players[RandomPlayer].zombie = 1;
}

onplayerspawned

Code:
if(self.Zombie) {[[self.axis]];}

might not work because I can't think right now and I'm half a zombie

edit: gave a look at it, won't work, copy pased from a mod