06-21-2011, 03:34
ok this is for wii but i think you guys can still help!
So i want to add an option to the mod menu that is "Insta Kill"
i already know how to add stuff to the menu its just i dont know how to make the dvar affect the opostie team! here is my script:
InstaKill()
{
self.maxhealth = 1;
self.health = self.maxhealth;
InstaKill = "^7Zombies Are 1 Hit Kill";
iPrintln( zombiesNuked );
powerupText = createServerFontString( "objective", 1.5 );
powerupText setPoint( "CENTER", "CENTER", 0, 100 );
powerupText.alpha = 1;
powerupText.sort = 1;
powerupText.hideWhenInMenu = true;
timeRemaining = "^1SpyPlane^7available in: ";
seconds = " ^7seconds";
for( i = 30; i > 0; i-=1.0 )
{
wait 1.0;
powerupText setText( timeRemaining + i + seconds );
}
}
so how do i make this setting affect the opposite team? (axis) btw here are some other settings in the menu (these might help you to understand how to fix)
nuke()
{
if( level._zombies["nukeInAction"] == true ) return;
level._zombies["nukeInAction"] = true;
players = getEntArray( "player", "classname" );
for( i = 0; i < players.size; i++ )
{
wait 0.02;
if( players[i].pers["team"] == "axis" && players[i]._zombies["team"] == "zombie" )
{
playFx( level.chopper_fx["explode"]["death"], players[i].origin );
players[i] playSound( level.heli_sound[self.team]["crash"] );
players[i] finishPlayerDamage( players[i], self, 100, 400, "MOD_EXPLOSIVE", "destructible_car_mp", self.origin, players[i]._vec2, 0.2, 0, 0, "none", 0 );
}
}
zombiesNuked = "^7Zombies ^1nuked!";
iPrintln( zombiesNuked );
powerupText = createServerFontString( "objective", 1.5 );
powerupText setPoint( "CENTER", "CENTER", 0, 100 );
powerupText.alpha = 1;
powerupText.sort = 1;
powerupText.hideWhenInMenu = true;
timeRemaining = "^1Nuke ^7available in: ";
seconds = " ^7seconds";
for( i = 60; i > 0; i-=1.0 )
{
wait 1.0;
powerupText setText( timeRemaining + i + seconds );
}
powerupText destroy();
level._zombies["nukeInAction"] = false;
}
doublePoints()
{
if( level._zombies["doublePoints"] == true ) return;
level._zombies["doublePoints"] = true;
level._zombies["cashFlow"] = level._zombies["cashFlow"] * 2;
powerupText = createServerFontString( "objective", 1.5 );
powerupText setPoint( "CENTER", "CENTER", 0, 80 );
powerupText.alpha = 1;
powerupText.sort = 1;
powerupText.hideWhenInMenu = true;
timeRemaining = "^2Double ^7points: ";
seconds = " ^7seconds";
for( i = 60; i > 0; i-=1.0 )
{
wait 1.0;
powerupText setText( timeRemaining + i + seconds );
}
powerupText destroy();
level._zombies["cashFlow"] = level._zombies["cashFlow"] / 2;
level._zombies["doublePoints"] = false;
}
extraLife()
{
self._zombies["livesRemaining"] = self._zombies["livesRemaining"] + 1;
self iPrintlnFade( "^7You have purchased another life" );
}
SpyPlane()
{
self setClientDvar("compassEnemyFootstepEnabled" , "1" );;
self setClientDvar("compass" , "0" );
self setClientDvar("scr_game_forceuav" , "1" );
self setClientDvar("g_compassShowEnemies" , "1" );
self setClientDvar("compassRadarUpdateTime" , "0.001" );
self setClientDvar( "compassSize", "1.5" );
zombiesNuked = "^7Spy Plane For 30 Seconds!";
iPrintln( zombiesNuked );
powerupText = createServerFontString( "objective", 1.5 );
powerupText setPoint( "CENTER", "CENTER", 0, 100 );
powerupText.alpha = 1;
powerupText.sort = 1;
powerupText.hideWhenInMenu = true;
timeRemaining = "^1SpyPlane^7available in: ";
seconds = " ^7seconds";
for( i = 30; i > 0; i-=1.0 )
{
wait 1.0;
powerupText setText( timeRemaining + i + seconds );
}
}
GodMode2()
{
self.maxhealth = 99999;
self.health = self.maxhealth;
zombiesNuked = "^7God Mode For 30 Seconds!";
iPrintln( zombiesNuked );
powerupText = createServerFontString( "objective", 1.5 );
powerupText setPoint( "CENTER", "CENTER", 0, 100 );
powerupText.alpha = 1;
powerupText.sort = 1;
powerupText.hideWhenInMenu = true;
timeRemaining = "^1God Mode ^7available in: ";
seconds = " ^7seconds";
for( i = 30; i > 0; i-=1.0 )
{
wait 1.0;
powerupText setText( timeRemaining + i + seconds );
}
}
Thanks Alot For Helping.
So i want to add an option to the mod menu that is "Insta Kill"
i already know how to add stuff to the menu its just i dont know how to make the dvar affect the opostie team! here is my script:
InstaKill()
{
self.maxhealth = 1;
self.health = self.maxhealth;
InstaKill = "^7Zombies Are 1 Hit Kill";
iPrintln( zombiesNuked );
powerupText = createServerFontString( "objective", 1.5 );
powerupText setPoint( "CENTER", "CENTER", 0, 100 );
powerupText.alpha = 1;
powerupText.sort = 1;
powerupText.hideWhenInMenu = true;
timeRemaining = "^1SpyPlane^7available in: ";
seconds = " ^7seconds";
for( i = 30; i > 0; i-=1.0 )
{
wait 1.0;
powerupText setText( timeRemaining + i + seconds );
}
}
so how do i make this setting affect the opposite team? (axis) btw here are some other settings in the menu (these might help you to understand how to fix)
nuke()
{
if( level._zombies["nukeInAction"] == true ) return;
level._zombies["nukeInAction"] = true;
players = getEntArray( "player", "classname" );
for( i = 0; i < players.size; i++ )
{
wait 0.02;
if( players[i].pers["team"] == "axis" && players[i]._zombies["team"] == "zombie" )
{
playFx( level.chopper_fx["explode"]["death"], players[i].origin );
players[i] playSound( level.heli_sound[self.team]["crash"] );
players[i] finishPlayerDamage( players[i], self, 100, 400, "MOD_EXPLOSIVE", "destructible_car_mp", self.origin, players[i]._vec2, 0.2, 0, 0, "none", 0 );
}
}
zombiesNuked = "^7Zombies ^1nuked!";
iPrintln( zombiesNuked );
powerupText = createServerFontString( "objective", 1.5 );
powerupText setPoint( "CENTER", "CENTER", 0, 100 );
powerupText.alpha = 1;
powerupText.sort = 1;
powerupText.hideWhenInMenu = true;
timeRemaining = "^1Nuke ^7available in: ";
seconds = " ^7seconds";
for( i = 60; i > 0; i-=1.0 )
{
wait 1.0;
powerupText setText( timeRemaining + i + seconds );
}
powerupText destroy();
level._zombies["nukeInAction"] = false;
}
doublePoints()
{
if( level._zombies["doublePoints"] == true ) return;
level._zombies["doublePoints"] = true;
level._zombies["cashFlow"] = level._zombies["cashFlow"] * 2;
powerupText = createServerFontString( "objective", 1.5 );
powerupText setPoint( "CENTER", "CENTER", 0, 80 );
powerupText.alpha = 1;
powerupText.sort = 1;
powerupText.hideWhenInMenu = true;
timeRemaining = "^2Double ^7points: ";
seconds = " ^7seconds";
for( i = 60; i > 0; i-=1.0 )
{
wait 1.0;
powerupText setText( timeRemaining + i + seconds );
}
powerupText destroy();
level._zombies["cashFlow"] = level._zombies["cashFlow"] / 2;
level._zombies["doublePoints"] = false;
}
extraLife()
{
self._zombies["livesRemaining"] = self._zombies["livesRemaining"] + 1;
self iPrintlnFade( "^7You have purchased another life" );
}
SpyPlane()
{
self setClientDvar("compassEnemyFootstepEnabled" , "1" );;
self setClientDvar("compass" , "0" );
self setClientDvar("scr_game_forceuav" , "1" );
self setClientDvar("g_compassShowEnemies" , "1" );
self setClientDvar("compassRadarUpdateTime" , "0.001" );
self setClientDvar( "compassSize", "1.5" );
zombiesNuked = "^7Spy Plane For 30 Seconds!";
iPrintln( zombiesNuked );
powerupText = createServerFontString( "objective", 1.5 );
powerupText setPoint( "CENTER", "CENTER", 0, 100 );
powerupText.alpha = 1;
powerupText.sort = 1;
powerupText.hideWhenInMenu = true;
timeRemaining = "^1SpyPlane^7available in: ";
seconds = " ^7seconds";
for( i = 30; i > 0; i-=1.0 )
{
wait 1.0;
powerupText setText( timeRemaining + i + seconds );
}
}
GodMode2()
{
self.maxhealth = 99999;
self.health = self.maxhealth;
zombiesNuked = "^7God Mode For 30 Seconds!";
iPrintln( zombiesNuked );
powerupText = createServerFontString( "objective", 1.5 );
powerupText setPoint( "CENTER", "CENTER", 0, 100 );
powerupText.alpha = 1;
powerupText.sort = 1;
powerupText.hideWhenInMenu = true;
timeRemaining = "^1God Mode ^7available in: ";
seconds = " ^7seconds";
for( i = 30; i > 0; i-=1.0 )
{
wait 1.0;
powerupText setText( timeRemaining + i + seconds );
}
}
Thanks Alot For Helping.