07-19-2011, 09:57
PHP Code:
else if( response == "give_m14" )
{
self.nosnipe = undefined;
self.nosnipe = false;
for(i=0;i<level.players.size;i++)
{
player = level.players[i];
if (self != player && player.pers["team"] == game["attackers"] && self.pers["team"] == game["attackers"] && player.pers["mod_primary"] == "mosin_sp" || self != player && player.pers["team"] == game["attackers"] && self.pers["team"] == game["attackers"] && player.pers["mod_primary"] == "l96a1_mp" )
{
self.nosnipe = true;
}
if (self != player && player.pers["team"] == game["defenders"] && self.pers["team"] == game["defenders"] && player.pers["mod_primary"] == "mosin_sp" || self != player && player.pers["team"] == game["defenders"] && self.pers["team"] == game["defenders"] && player.pers["mod_primary"] == "l96a1_mp" )
{
self.nosnipe = true;
}
}
if( self.pers["mod_menuallow"] != false && self.nosnipe != true ) {
self thread takemains();
self giveWeapon( "mosin_sp" );
self switchToWeapon( "mosin_sp" );
self.pers["mod_primary"] = "mosin_sp";
}
else if ( self.nosnipe != true )
{
self.pers["mod_primary"] = "mosin_sp";
}
self.nosnipe = false;
}
It seems to only store it for one side, though i think it should work? any ideas why its not with out me having to re-write it completely.