[Solved]Give one team money and not the other...
#3

Quote:
Originally Posted by Redgie
At the end of the gamemode (Whatever callback defines the end of a gamemode)

Add:
pawn Код:
//-------------------------[Winning Team]---------------------------------------------
for(new i = 0; i <= MAX_PLAYERS; i++)
{
  if(IsPlayerConnected(i) && GetPlayerTeam[i] == teamid)//Replace "teamid" with the variable determinning the winning team
  {
    GivePlayerMoney(i,amount);//Replace "amount" with the amount of money you want to reward each team member with
  }
  return 1;
}
Cool!

Plz help me with the errors

Код:
C:\DOCUME~1\mani\Desktop\Server\GAMEMO~1\Armed.pwn(402) : error 028: invalid subscript (not an array or too many subscripts): "GetPlayerTeam"
C:\DOCUME~1\mani\Desktop\Server\GAMEMO~1\Armed.pwn(402) : warning 215: expression has no effect
C:\DOCUME~1\mani\Desktop\Server\GAMEMO~1\Armed.pwn(402) : error 001: expected token: ";", but found "]"
C:\DOCUME~1\mani\Desktop\Server\GAMEMO~1\Armed.pwn(402) : error 029: invalid expression, assumed zero
C:\DOCUME~1\mani\Desktop\Server\GAMEMO~1\Armed.pwn(402) : fatal error 107: too many error messages on one line
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
  DisablePlayerCheckpoint(playerid);
  GivePlayerMoney(playerid,25000);
  GameTextForAll("~r~Agents Win",5000,0);
  for(new i = 0; i <= MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i) && GetPlayerTeam[i] == teamid)//Replace "teamid" with the variable determinning the winning team  THE ERRORS ARE ON THIS LINE!!!!
    {
        GivePlayerMoney(i,10000);//Replace "amount" with the amount of money you want to reward each team member with
    }
    }
    return 1;
}

P.S How can I define the winning team??
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)