SA-MP Forums Archive
[HELP] Winner Team get the Scores - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [HELP] Winner Team get the Scores (/showthread.php?tid=287591)



[HELP] Winner Team get the Scores - [RLG]Zepp - 03.10.2011

How can I make the winner team gets the scores?

My Code:
Код:
if(TEAM_RED_SCORE > TEAM_BLUE_SCORE){
	    GameTextForAll("~r~ Team RED WIN }~n +1 Score",3000,5);
	    SetPlayerScore(TEAM_RED,GetPlayerScore(TEAM_RED)+1);
	}
	if(TEAM_RED_SCORE < TEAM_BLUE_SCORE) {
	    GameTextForAll("~b~Team BLUE WIN! }~n +1 Score",3000,5);
	    SetPlayerScore(TEAM_BLUE,GetPlayerScore(TEAM_BLUE)+1);
	}
    if(TEAM_RED_SCORE == TEAM_BLUE_SCORE) {
		GameTextForAll("~p~ No Winners! ",3000,5);
	}
But it Crashs.


Who can help me?


Re: [HELP] Winner Team get the Scores - Kingunit - 03.10.2011

Try:
pawn Код:
if(TEAM_RED_SCORE > TEAM_BLUE_SCORE)
{
    GameTextForAll("~r~ Team RED WIN ~n +1 Score",3000,5);
    SetPlayerScore(TEAM_RED,GetPlayerScore(TEAM_RED)+1);
}

if(TEAM_RED_SCORE < TEAM_BLUE_SCORE)
{
    GameTextForAll("~b~Team BLUE WIN! ~n +1 Score",3000,5);
    SetPlayerScore(TEAM_BLUE,GetPlayerScore(TEAM_BLUE)+1);
}

if(TEAM_RED_SCORE == TEAM_BLUE_SCORE)
{
    GameTextForAll("~p~ No Winners! ",3000,5);
}



Re: [HELP] Winner Team get the Scores - [L3th4l] - 03.10.2011

Its crashing because of this line:
pawn Код:
"~r~ Team RED WIN ~n +1 Score"
You are missing a "~" in "~n"

Try this:
pawn Код:
"~r~ Team RED WIN ~n~ +1 Score"