Answered help with a function

LoGy

New Member
Messages
5
Reaction score
3
Points
3
hi guys ive been messing around making a gsc menu for zombies can any1 help me get this working please

function donuke()
{
foreach(player in level.players)
{
level thread scripts\zm\scripts\zm\_zm_powerup_nuke(self,player.team);
player scripts\zm\_zm_powerup_nuke("nuke");
zombies=getaiarray(level.zombie_team);
player.zombie_nuked=arraysort(zombies,self.origin);
player notify("nuke_triggered");
}
self iPrintln("Nuke Bomb ^2Send");
}

it was this back on bo2 i just thought pointing it to were the powerups are now it would work but it dosnt

donuke()
{
foreach(player in level.players)
{
level thread maps\mp\zombies\_zm_powerups::nuke_powerup(self,player.team);
player maps\mp\zombies\_zm_powerups::tongueclosed:owerup_vo("nuke");
zombies=getaiarray(level.zombie_team);
player.zombie_nuked=arraysort(zombies,self.origin);
player notify("nuke_triggered");
}
self iPrintln("Nuke Bomb ^2Send");
}

here is the error i get aswell

^1 level thread scripts\zm\scripts\zm\_zm_powerup_nuke

^1----------------------------------------------------^

^1ERR(0) scripts/zm/gametypes/_clientids.gsc (725,53) in "dopnuke()" : syntax error, unexpected TOKEN_FILENAME, expecting TOKEN_LEFT_BRACKET or TOKEN_IDENTIFIER : level thread scripts\zm\scripts\zm\_zm_powerup_nuke


any help would be great
 
Last edited:

CabCon

Head Administrator
Staff member
Head Staff Team
Messages
5,092
Reaction score
2,881
Points
1,103
hi guys ive been messing around making a gsc menu for zombies can any1 help me get this working please

function donuke()
{
foreach(player in level.players)
{
level thread scripts\zm\scripts\zm\_zm_powerup_nuke(self,player.team);
player scripts\zm\_zm_powerup_nuke("nuke");
zombies=getaiarray(level.zombie_team);
player.zombie_nuked=arraysort(zombies,self.origin);
player notify("nuke_triggered");
}
self iPrintln("Nuke Bomb ^2Send");
}

it was this back on bo2 i just thought pointing it to were the powerups are now it would work but it dosnt

donuke()
{
foreach(player in level.players)
{
level thread maps\mp\zombies\_zm_powerups::nuke_powerup(self,player.team);
player maps\mp\zombies\_zm_powerups::tongueclosed:owerup_vo("nuke");
zombies=getaiarray(level.zombie_team);
player.zombie_nuked=arraysort(zombies,self.origin);
player notify("nuke_triggered");
}
self iPrintln("Nuke Bomb ^2Send");
}

here is the error i get aswell

^1 level thread scripts\zm\scripts\zm\_zm_powerup_nuke

^1----------------------------------------------------^

^1ERR(0) scripts/zm/gametypes/_clientids.gsc (725,53) in "dopnuke()" : syntax error, unexpected TOKEN_FILENAME, expecting TOKEN_LEFT_BRACKET or TOKEN_IDENTIFIER : level thread scripts\zm\scripts\zm\_zm_powerup_nuke


any help would be great
Hi,
thanks for posting your message here. :smile: I will fix this when I'm at home. :smile:

Best regards,
CabCon.
 

CabCon

Head Administrator
Staff member
Head Staff Team
Messages
5,092
Reaction score
2,881
Points
1,103
thanks mate
Here you go:
Code:
//include this
#using scripts\zm\_zm_powerups;


function donuke()
{
    for( a = 0; a < getplayers().size; a++ )
    {
        getplayers()[a] zm_powerups::specific_powerup_drop("nuke", getplayers()[a].origin);
    }
    self iPrintln("Nuke Bomb ^2Send");
}

If you have any other question be sure to contact me. :smile:
 
Top