Multi message bug.. [HELP]
#1

I have capture proto system.. when the player captured the proto it sends the message to the team whose proto has been stolen.. but the prob is.. it sends the message that much time of the team player count.. if
2 players in one team then it sends to msgs.
REP++ for 2 days.. if you helped in fixing.
CODE:
pawn Код:
if(IsPlayerInRangeOfPoint(playerid,20.0,1347.6937,1347.6104,10.3846) && gTeam[playerid] == TEAM_USA)
   {
     if(IsPlayerInVehicle(playerid,EUROPROTOID))
    {
       SetVehicleToRespawn(EUROPROTOID);
       ProtoDel[playerid] = 1;
       new teamrank[600];
       switch(gTeam[playerid])
       {
       case 1: teamrank = "Usa";
       case 2: teamrank = "European";
       case 3: teamrank = "JAPAN";
       case 4: teamrank = "Morocco";
       case 5: teamrank = "Arabian";
       }
       format(string,sizeof(string),"%s has captured ~g~european ~w~prototype for team %s",PlayerName2(playerid),teamrank);
       SendBoxMsg(playerid,string);
       SetPlayerScore(playerid,GetPlayerScore(playerid)+10);
       GivePlayerMoney(playerid,6000);
       SP green,"* You Captured Euro Prototype You gain 6 score and 6000$");
       for(new i = 0; i < MAX_PLAYERS; i++)
       {
       if(gTeam[playerid] == gTeam[i] && i != playerid)
       {
         SetPlayerScore(i,GetPlayerScore(i)+5);
         SendClientMessage(i, green,"* Your team Captured Euro Prototype You gain 5 score");
       }
       if(gTeam[i] == TEAM_EURO && Admin[i] != 1)
       {
         SetPlayerScore(i,GetPlayerScore(i)-2);
         SendClientMessage(i, red,"* You failed to protect your prototype you lost 2 score !");
       }
       }

    }
Thank you in advance.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)