TeamScore?
#1

Im going to be making a -TDM- Script, but i want to make sure of a few things like, a code that checks all players and when a team gets (lets say 50) they win the round? Anyone have or know of a code to do this?

-Dakota.
Reply
#2

Under OnPlayerDeath, you would add a point or however many to their score right? Well, just do if the player's score equals 50, then end the game.

Example.
pawn Код:
public OnPlayerDeath(playerid,killerid,reason)
{
  if(killerid != 255)
  {
    SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
    if(GetPlayerScore(killerid)==50)
    {
       //End the game
    }
  }
  return 1;
}
Reply
#3

Thank-you sir for the code, it works.

-Dakota
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)