Jump to content
  • 0

Problema Premiu War


SiNuS

Question

Salutare ,am facut un war system , care functioneaza cam asa: sunt 2 aliante, Ballas - Mafia - VLA si Grove - Triads si LSV , unul din lideri da /startwar , iar alianta provocata da /acceptwar daca doreste sa accepte warul , apoi se pune un timer , de 30 minute, (durata warului) , cand se termina, apare cam asa:

public wartime()

{

if(scoreteam1 > scoreteam2)

{

                    SendClientMessageToAll(COLOR_WHITE, "{6EF83C}|____War Finished____|");

                    SendClientMessageToAll(COLOR_WHITE, "{F81414}Alianta {660099}Ballas - {99FFFF}Varrios Los Aztecas - {990033}The Mafia{F81414} a castigat warul");

                    //SendClientMessageToAll(COLOR_WHITE, "{6EF83C}Scor war: Ballas - VLA - TM vs Grove - LSV - TT : %d - %d  ", scoreteam1 , scoreteam2);

                    SendClientMessageToAll(COLOR_WHITE, "{F81414}All player on this aliances won 50.000 $, 5000 Mats, 100 Drugs.");

                    SendClientMessageToAll(COLOR_WHITE, "{6EF83C}|____War Finished____|");

                    scoreteam1 = 0;

        scoreteam2 = 0;

  }

else if(scoreteam1 < scoreteam2)

{

                    SendClientMessageToAll(COLOR_WHITE, "{6EF83C}|____War Finished____|");

                    SendClientMessageToAll(COLOR_WHITE, "{F81414}Alianta {006633}Grove Street - {CC9933}Los Santos Vagos - {663300}The Triads{F81414} a castigat warul");

                    //SendClientMessageToAll(COLOR_WHITE, "{6EF83C}Scor war: Grove - LSV - TT vs Ballas - VLA - TM : %d - %d  ", scoreteam2 , scoreteam1);

                    SendClientMessageToAll(COLOR_WHITE, "{F81414}All player on this aliances won 50.000 $, 5000 Mats, 100 Drugs.");

                    SendClientMessageToAll(COLOR_WHITE, "{6EF83C}|____War Finished____|");

                    scoreteam1 = 0;

        scoreteam2 = 0;

}

  return 1;

        }

Problema este urmatoarea, vreau sa fac , ca alianta castigatoare sa primeasca 50k , 5000 mats si 100 drugs , membrii aliantei castigatoare adica..

userbar6.jpg
Link to comment
Share on other sites

7 answers to this question

Recommended Posts

La ' factiune' pune numaru factiuni.

Nu stiu daca am facut cum trebuie ca nu am systemu de War !

public wartime()
{
	if(scoreteam1 > scoreteam2)
	{
		SendClientMessageToAll(COLOR_WHITE, "{6EF83C}|____War Finished____|");
		SendClientMessageToAll(COLOR_WHITE, "{F81414}Alianta {660099}Ballas - {99FFFF}Varrios Los Aztecas - {990033}The Mafia{F81414} a castigat warul");
		//SendClientMessageToAll(COLOR_WHITE, "{6EF83C}Scor war: Ballas - VLA - TM vs Grove - LSV - TT : %d - %d  ", scoreteam1 , scoreteam2);
		SendClientMessageToAll(COLOR_WHITE, "{F81414}All player on this aliances won 50.000 $, 5000 Mats, 100 Drugs.");
		SendClientMessageToAll(COLOR_WHITE, "{6EF83C}|____War Finished____|");
		scoreteam1 = 0;
		scoreteam2 = 0;
		for(new i = 0; i < MAX_PLAYERS; i++)
		{
			if(IsPlayerConnected(i))
			{
				new leader = PlayerInfo[i][pLeader], member = PlayerInfo[i][pMember];
				if(leader == factiune || pMember == factiune)
				{
					PlayerInfo[i][pMats] += 5000;
					PlayerInfo[i][pDrugs] += 100;
					GivePlayerMoney(i, +50000);
				}
			}
		}
	}
	else if(scoreteam1 < scoreteam2)
	{
		SendClientMessageToAll(COLOR_WHITE, "{6EF83C}|____War Finished____|");
		SendClientMessageToAll(COLOR_WHITE, "{F81414}Alianta {006633}Grove Street - {CC9933}Los Santos Vagos - {663300}The Triads{F81414} a castigat warul");
		//SendClientMessageToAll(COLOR_WHITE, "{6EF83C}Scor war: Grove - LSV - TT vs Ballas - VLA - TM : %d - %d  ", scoreteam2 , scoreteam1);
		SendClientMessageToAll(COLOR_WHITE, "{F81414}All player on this aliances won 50.000 $, 5000 Mats, 100 Drugs.");
		SendClientMessageToAll(COLOR_WHITE, "{6EF83C}|____War Finished____|");
		scoreteam1 = 0;
		scoreteam2 = 0;
		for(new i = 0; i < MAX_PLAYERS; i++)
		{
			if(IsPlayerConnected(i))
			{
				new leader = PlayerInfo[i][pLeader], member = PlayerInfo[i][pMember];
				if(leader == factiune || pMember == factiune)
				{
					PlayerInfo[i][pMats] += 5000;
					PlayerInfo[i][pDrugs] += 100;
					GivePlayerMoney(i, +50000);
				}
			}
		}
	}
	return 1;
}

i0418xcttya707ofg.jpg

Link to comment
Share on other sites

C:\DOCUME~1\ALEXAN~1\Desktop\NEWFOL~1\sZn.pwn(10014) : warning 235: public function lacks forward declaration (symbol "wartime")

C:\DOCUME~1\ALEXAN~1\Desktop\NEWFOL~1\sZn.pwn(10034) : error 029: invalid expression, assumed zero

C:\DOCUME~1\ALEXAN~1\Desktop\NEWFOL~1\sZn.pwn(10034) : warning 215: expression has no effect

C:\DOCUME~1\ALEXAN~1\Desktop\NEWFOL~1\sZn.pwn(10034) : error 001: expected token: ";", but found ")"

C:\DOCUME~1\ALEXAN~1\Desktop\NEWFOL~1\sZn.pwn(10034) : error 029: invalid expression, assumed zero

C:\DOCUME~1\ALEXAN~1\Desktop\NEWFOL~1\sZn.pwn(10034) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664    Copyright © 1997-2006, ITB CompuPhase

4 Errors.

Linia -  GivePlayerMoney(i, +50000);

userbar6.jpg
Link to comment
Share on other sites

Banuiesc ca folosesti The Godfather asa ca am facut pentru aliantele LSV-GROVE-TRIADS vs VLA-BALLAS-MAFIA

public wartime()
{
	if(scoreteam1 > scoreteam2)
	{
		SendClientMessageToAll(COLOR_WHITE, "{6EF83C}|____War Finished____|");
		SendClientMessageToAll(COLOR_WHITE, "{F81414}Alianta {660099}Ballas - {99FFFF}Varrios Los Aztecas - {990033}The Mafia{F81414} a castigat warul");
		//SendClientMessageToAll(COLOR_WHITE, "{6EF83C}Scor war: Ballas - VLA - TM vs Grove - LSV - TT : %d - %d  ", scoreteam1 , scoreteam2);
		SendClientMessageToAll(COLOR_WHITE, "{F81414}All player on this aliances won 50.000 $, 5000 Mats, 100 Drugs.");
		SendClientMessageToAll(COLOR_WHITE, "{6EF83C}|____War Finished____|");
		scoreteam1 = 0;
		scoreteam2 = 0;
		for(new i = 0; i < MAX_PLAYERS; i++)
		{
			if(IsPlayerConnected(i))
			{
				if(PlayerInfo[i]pLeader] == 18 || PlayerInfo[i][pLeader] == 6 || PlayerInfo[i][pLeader] == 15 || PlayerInfo[i][pMember] == 18|| PlayerInfo[i][pMember] == 6 || PlayerInfo[i][pMember] == 15)
				{
					PlayerInfo[i][pMats] += 5000;
					PlayerInfo[i][pDrugs] += 100;
					GivePlayerMoney(i, 50000);
				}
			}
		}
	}
	else if(scoreteam1 < scoreteam2)
	{
		SendClientMessageToAll(COLOR_WHITE, "{6EF83C}|____War Finished____|");
		SendClientMessageToAll(COLOR_WHITE, "{F81414}Alianta {006633}Grove Street - {CC9933}Los Santos Vagos - {663300}The Triads{F81414} a castigat warul");
		//SendClientMessageToAll(COLOR_WHITE, "{6EF83C}Scor war: Grove - LSV - TT vs Ballas - VLA - TM : %d - %d  ", scoreteam2 , scoreteam1);
		SendClientMessageToAll(COLOR_WHITE, "{F81414}All player on this aliances won 50.000 $, 5000 Mats, 100 Drugs.");
		SendClientMessageToAll(COLOR_WHITE, "{6EF83C}|____War Finished____|");
		scoreteam1 = 0;
		scoreteam2 = 0;
		for(new i = 0; i < MAX_PLAYERS; i++)
		{
			if(IsPlayerConnected(i))
			{
				if(PlayerInfo[i]pLeader] == 17 || PlayerInfo[i][pLeader] == 5 || PlayerInfo[i][pLeader] == 16 || PlayerInfo[i][pMember] == 17|| PlayerInfo[i][pMember] == 5 || PlayerInfo[i][pMember] == 16)
				{
					PlayerInfo[i][pMats] += 5000;
					PlayerInfo[i][pDrugs] += 100;
					GivePlayerMoney(i, 50000);
				}
			}
		}
	}
	return 1;
}

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.