Clans War [help smth fast please ]
#1

hey guys.
This is my first thread and i need some help with this clan wars.
I have made an war system but there is final war points, so i decieded to remove it and make it like when First clan arrives 500 points + from other clan points he will be declared winner. but i really dont know to do this so basicly that what i need help with.The 300 is number that i wanted to make winner clan when they arrive + other clans points, please help me out.
Here is my script that makes an clan winner.
Код HTML:
stock WarProgress()
{
    if(dini_Int(warinffos, "clan1") != -1)
	{
		new wWINNER = -1, clanex1 = dini_Int(warinffos,"clan1"), clanex2 = dini_Int(warinffos,"clan2");

		if(	dini_Int(warinffos, "clan1points") >= dini_Int(warinffos, "clan2points")+300 )
		{
		    wWINNER = factionex1;
		}
		if(	dini_Int(warinffos, "clan2points") >= dini_Int(warinffos, "clan1points")+300 )
		{
		    wWINNER = factionex2;
		}
		if(wWINNER != -1)
		{
			PlayerLoop(i)
			{
				if(PLAYERLIST_authed[i])
				{
		    		new string[ 128 ];
	    			format(string, sizeof(string), "..:: [ WAR INFORMATION ] %s has won the ongoing war! ::..", clanteams[ GetTeam(wWINNER) ][clanname]);
		    		SendClientMessage(i, COLOR_WHITE, string);
		    		format(string, sizeof(string), "~g~%s wins!", teams[ GetTeam(wWINNER) ][teamname]);
		    		GameTextForAll(string, 5000, 3);
		    		ResetWar();
				}
			}
		}
	}
}
Reply
#2

bumppw
Reply
#3

I'd be querying the local variables for scores, and check the clans are on in that way too. I think seeing as you're asking the dini a heap, in a short time (Being this would likely be on a 1 second timer) it'll cause you trouble.

This could have something to do with this, however.


How often are the accounts/stats being saved, as if that isn't working, that would stop the points being picked up as being a win in the war.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)