Deathmatch help
#1

Hey I need help with something

Want to make a Team deathmatch with 2 teams (defined etc, works okay)
but when Team_RED kills a team_blue, i want that they get a score point or something
and when the total score is about 30, the game restarts

If you don't get it, might get it with this:
Player 1 (red) kills player 2 (blue)
Player 1 (red) teamscore +1
Player 2 (blue) teamscores stay the same

And when the score limit (defined in max_score or something) is reached, gmx is executed and it starts all over
Reply
#2

Anybody?
Reply
#3

do you use gteam?
Reply
#4

Yeah,
gTeam[playerid] = TEAM_RED;
gTeam[playerid] = TEAM_BLUE;
Reply
#5

Код:
#define ROUNDWON 30

enum dmteams {
	Red,
	Blue,
}
new DMScore[dmteams];

public OnPlayerDeath(playerid, killerid, reason){
	if(gTeam[killerid] == TEAM_RED)DMScore[Red]++;
	if(gTeam[killerid] == TEAM_BLUE)DMScore[BLUE]++;
	if(DMScore[Red] == ROUNDWON)SendClientMessageToAll(0xffffff,"Red has won the match);
	if(DMScore[Blue] == ROUNDWON)SendClientMessageToAll(0xffffff,"Blue has won the match);
	return 1;
}
how about this
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)