onPlayerSpawned()
{
self endon("disconnect");
for(;;)
{
self waittill("spawned_player");
self.hasDragonsBreath = undefined;
// if(self isHost())
// {
// self giveWeapon("spas_mp");
// self.hasDragonsBreath = 1;
// self giveMaxAmmo("spas_mp");
// self switchToWeapon("spas_mp");
// self thread BulletsOnWall("smallflame");
// }
if(!isdefined(self.hud_rankscroreupdate))
{
self.hud_rankscroreupdate = NewScoreHudElem(self);
self.hud_rankscroreupdate.horzAlign = "center";
self.hud_rankscroreupdate.vertAlign = "middle";
self.hud_rankscroreupdate.alignX = "center";
self.hud_rankscroreupdate.alignY = "middle";
self.hud_rankscroreupdate.x = 0;
if( self IsSplitscreen() )
self.hud_rankscroreupdate.y = -15;
else
self.hud_rankscroreupdate.y = -60;
self.hud_rankscroreupdate.font = "default";
self.hud_rankscroreupdate.fontscale = 2.0;
self.hud_rankscroreupdate.archived = false;
self.hud_rankscroreupdate.color = (0.5,0.5,0.5);
self.hud_rankscroreupdate.alpha = 0;
self.hud_rankscroreupdate maps\mp\gametypes\_hud::fontPulseInit();
self.hud_rankscroreupdate.overrridewhenindemo = true;
}
if(self.team == "axis")
{
self takeAllWeapons();
self clearPerks();
wait 0.5;
if (level.round == 1)
{
self giveWeapon("knife_ballistic_mp");
self setWeaponAmmoClip("knife_ballistic_mp", 0);
self setWeaponAmmoStock("knife_ballistic_mp", 0);
self switchToWeapon("knife_ballistic_mp");
}
else if (level.round == 2)
{
self giveWeapon("makarov_mp");
self setWeaponAmmoStock("makarov_mp", 300);
self switchToWeapon("makarov_mp");
self thread refillammo();
}
else if (level.round == 3)
{
self giveWeapon("cz75_auto_mp");
self setWeaponAmmoStock("cz75_auto_mp", 300);
self switchToWeapon("cz75_auto_mp");
self thread refillammo();
}
else if (level.round == 4)
{
self giveWeapon("enfield_mp");
self setWeaponAmmoStock("enfield_mp", 300);
self switchToWeapon("enfield_mp");
self thread refillammo();
}
else if (level.round == 6)
{
self giveWeapon("knife_ballistic_zm");
self setWeaponAmmoClip("knife_ballistic_zm", 0);
self setWeaponAmmoStock("knife_ballistic_zm", 0);
self switchToWeapon("knife_ballistic_zm");
}
else if (level.round == 7)
{
self giveWeapon("makarov_mp");
self setWeaponAmmoStock("makarov_mp", 300);
self switchToWeapon("makarov_mp");
self thread refillammo();
}
else if (level.round == 8)
{
self giveWeapon("cz75dw_mp");
self setWeaponAmmoStock("cz75dw_mp", 300);
self switchToWeapon("cz75dw_mp");
self thread refillammo();
}
else if (level.round == 9)
{
self giveWeapon("pythondw_mp");
self setWeaponAmmoStock("pythondw_mp", 300);
self switchToWeapon("pythondw_mp");
self thread refillammo();
}
else if (level.round == 10)
{
self giveWeapon("ak74u_mp");
self setWeaponAmmoStock("ak74u_mp", 300);
self switchToWeapon("ak74u_mp");
self thread refillammo();
}
else if (level.round == 11)
{
self giveWeapon("M60_mp");
self setWeaponAmmoStock("M60_mp", 300);
self switchToWeapon("M60_mp");
self thread refillammo();
}
else if (level.round == 12)
{
self giveWeapon("aug_mp");
self setWeaponAmmoStock("aug_mp", 300);
self switchToWeapon("aug_mp");
self thread refillammo();
}
else if (level.round == 13)
{
self giveWeapon("crossbow_explosive_mp");
self setWeaponAmmoStock("crossbow_explosive_mp", 300);
self switchToWeapon("crossbow_explosive_mp");
self thread refillammo();
}
else if (level.round == 14)
{
self giveWeapon("Stoner_mp");
self setWeaponAmmoStock("Stoner_mp", 300);
self switchToWeapon("Stoner_mp");
self thread refillammo();
}
else if (level.round == 15)
{
self giveWeapon("WA2000_mp");
self setWeaponAmmoStock("WA2000_mp", 300);
self switchToWeapon("WA2000_mp");
self thread refillammo();
}
else if (level.round == 16)
{
self giveWeapon("Commando_mp");
self setWeaponAmmoStock("Commando_mp", 300);
self switchToWeapon("Commando_mp");
self thread refillammo();
}
else if (level.round == 17)
{
self giveWeapon("minigun_mp");
self setWeaponAmmoStock("minigun_mp", 1000);
self switchToWeapon("minigun_mp");
self thread refillammo();
}
else if (level.round == 18)
{
self giveWeapon("rpg_mp");
self setWeaponAmmoStock("rpg_mp", 300);
self switchToWeapon("rpg_mp");
self thread refillammo();
}
else if (level.round == 19)
{
self giveWeapon("Famas_mp");
self setWeaponAmmoStock("Famas_mp", 300);
self switchToWeapon("Famas_mp");
self thread refillammo();
}
else if (level.round == 20)
{
self giveWeapon("M14_mp");
self setWeaponAmmoStock("M14_mp", 300);
self switchToWeapon("M14_mp");
self thread refillammo();
}
else if (level.round == 21)
{
self giveWeapon("china_lake_mp");
self setWeaponAmmoStock("china_lake_mp", 100);
self switchToWeapon("china_lake_mp");
self thread refillammo();
}
else if (level.round == 22)
{
self giveWeapon("m202_flash_mp");
self setWeaponAmmoStock("m202_flash_mp", 300);
self switchToWeapon("m202_flash_mp");
self thread refillammo();
}
else if (level.round == 23)
{
self giveWeapon("L96a1_mp");
self setWeaponAmmoStock("L96a1_mp", 300);
self switchToWeapon("L96a1_mp");
self thread refillammo();
}
}
else if (self.team == "allies")
{
if (level.gamestarted == 0) level notify("ally_spawned");
self thread openMenu();
self thread monitorButn_A();
self thread monitorDpad_2();
self thread monitorDpad_3();
if(!isdefined(self.hud_score))
{
self.hud_score = NewClientHudElem(self);
self.hud_score.font = "objective";
self.hud_score.fontscale = 1.5;
self.hud_score.x = 620;
self.hud_score.y = 365;
self.hud_score.archived = true;
self.hud_score.alignX = "right";
self.hud_score.alignY = "middle";
self.hud_score.horzAlign = "fullscreen";
self.hud_score.vertAlign = "fullscreen";
self.hud_score settext(self.money +" credits");
}
if(!isdefined(self.hud_menuhelp))
{
self.hud_menuhelp = NewClientHudElem(self);
self.hud_menuhelp.font = "objective";
self.hud_menuhelp.fontscale = 1;
self.hud_menuhelp.x = 630;
self.hud_menuhelp.y = 185;
self.hud_menuhelp.archived = true;
self.hud_menuhelp.alignX = "right";
self.hud_menuhelp.alignY = "middle";
self.hud_menuhelp.horzAlign = "fullscreen";
self.hud_menuhelp.vertAlign = "fullscreen";
self.hud_menuhelp settext("^3[{+activate}]+[{+melee}] ^7open shop");
}
if(!isdefined(self.hud_roundinfo))
{
self.hud_roundinfo = NewClientHudElem(self);
self.hud_roundinfo.font = "default";
self.hud_roundinfo.fontscale = 1;
self.hud_roundinfo.x = 0;
self.hud_roundinfo.y = 10;
self.hud_roundinfo.archived = true;
self.hud_roundinfo.alignX = "center";
self.hud_roundinfo.alignY = "top";
self.hud_roundinfo.horzAlign = "center";
self.hud_roundinfo.vertAlign = "top";
self.hud_roundinfo settext(level.infotext);
}
if (level.round == 5) self thread refillammo();
}
if (self.team == "allies" && is_bot(self))
{
wait 2;
maps\mp\gametypes\_teams::changeTeam("axis");
wait 0.5;
self notify( "menuresponse", "changeclass", "smg_mp" );
}
else if (self.team == "axis" && !is_bot(self))
{
wait 2;
maps\mp\gametypes\_teams::changeTeam("allies");
}
}
}