Highest score count
#1

So i have two cmds , one for Start War and one for War over . I want to put on starting war a starting kill counter , and on the second one War over to put a over kill counter . Sorry for my bad english ... i'm ROMANIUM
Something like this... when the war is starting , to start automatically kill couter , and when the war is over to kill that kill timer, to diplay to all on chat something like this "[War] Best killer : name , frags(score): X " .

If is needed i can put those cmds here to help me.

Thx ... i hope can someone help me.


EDIT: I want a player kill count just when those two cmds are activated.
Reply
#2

Bump , pls help i really need this.
Reply
#3

If i understand well you want a timer (example 10minutes)since the war starts and when the timer ends you want the war to automatically end?
Reply
#4

nope... i want a player kills count to attach on WAR cmds (/startwar and /warover) somethink like ... the war time duration is 1hour , after 1hour to show me who is the best killer from two alliances(Triads-Grove-Vagos ; Mafia-Ballas-Aztecas).

Can you help me?
Reply
#5

on top of the script : new Kills[MAX_PLAYERS];
new st[128];
new name[24];
new Killername[24];

GetPlayerName(playerid,name,sizeof(name));
GetPlayerName(killerid,Killername,sizeof(Killernam e));
if(Kills[playerid] > 2)
{
GivePlayerMoney(killerid,3000*GetPlayerWantedLevel (playerid));
format(st,sizeof(st),"%s was awarded %d for killing %s wanted level %d",Killername,3000*GetPlayerWantedLevel(playerid) ,name,GetPlayerWantedLevel(playerid));
SendClientMessageToAll(COLOR_YELLOW,st);
}
Kills[playerid] = 0;
Kills[killerid]++;
SetPlayerWantedLevel(playerid,0);
if(Kills[killerid] == 2
{
format(st,sizeof(st),"~S~%s leads the match!",Killername);
GameTextForAll(st,5000,4);
SetPlayerWantedLevel(killerid,1);
}
Reply
#6

fuck this double posting...ok wrong...the GetPlayerMoney and then put it OnPlayerDeath and On "if(Kills[killerid] == 2"replace it with if(kills[killerid] == 28 );
Reply
#7

oh yea y_less is true :P thx for fixing me to help him i am new scripter xD
Reply
#8

thx so much guys !
Reply
#9

no problem can u give me rep plz?
Reply
#10

I have a problem on player kill count , idk how to add that player kill counter to those cmds . Here is the /startwar and /acceptwar :
Code:
	if(strcmp(cmd, "/startwar", true) == 0)
 	{
 		if(IsPlayerConnected(playerid))
  		{
    		if(wtimer[playerid] < 1)
			{ }
			else
	        {
	            SendClientMessage(playerid, COLOR_GREY, "You must wait 12 hours for every war");
	            return 1;
	        }
			if(PlayerInfo[playerid][pLeader] == 18 || PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pLeader] == 15)
  			{
  			    acceptwar = 1;
				new x_nr[256];
				x_nr = strtok(cmdtext, idx);
				if(!strlen(x_nr))
				{
						SendClientMessage(playerid, COLOR_WHITE, "USAGE: /startwar list , /startwar [locul]");
						return 1;
  				}
  				if(strcmp(x_nr,"list",true) == 0)
   				{
					SendClientMessage(playerid, COLOR_YELLOW, "_________Locuri_List_________");
					SendClientMessage(playerid, COLOR_GRAD1, "1:GS/LS 2: BS/LS  3: Madd Dog House");
 					return 1;
  				}
   				else if(strcmp(x_nr,"1",true) == 0)
   				{
					SendClientMessageToAll(COLOR_BLUE,"{00FA9A}|________WAR Provocation________|");
    				SendClientMessageToAll(COLOR_GREEN, "{D3D3D3}Triads-LSV-Grove {00FA9A}au declarat WAR , zona: {FFFFFF}GS/LS");
					SendClientMessageToAll(COLOR_BLUE,"{00FA9A}|________WAR Provocation________|");
    				return 1;
				}
    			else if(strcmp(x_nr,"2",true) == 0)
    			{
					SendClientMessageToAll(COLOR_BLUE,"{00FA9A}|________WAR Provocation________|");
    				SendClientMessageToAll(COLOR_GREEN, "{D3D3D3}Triads-LSV-Grove {00FA9A}au declarat WAR , zona: {FFFFFF}BS/LS");
					SendClientMessageToAll(COLOR_BLUE,"{00FA9A}|________WAR Provocation________|");
    				return 1;
				}
				else if(strcmp(x_nr,"3",true) == 0)
    			{
					SendClientMessageToAll(COLOR_BLUE,"{00FA9A}|________WAR Provocation________|");
       				SendClientMessageToAll(COLOR_GREEN, "{D3D3D3}Triads-LSV-Grove {00FA9A}au declarat WAR , zona: {FFFFFF}Madd Dog House");
					SendClientMessageToAll(COLOR_BLUE,"{00FA9A}|________WAR Provocation________|");
           			return 1;
				}
			}
			else if(PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pLeader] == 17 || PlayerInfo[playerid][pLeader] == 16)
			{
			    acceptwar = 1;
   				new x_nr[256];
				x_nr = strtok(cmdtext, idx);
				if(!strlen(x_nr))
				{
					SendClientMessage(playerid, COLOR_WHITE, "USAGE: /startwar list , /startwar [locul]");
					return 1;
 				}
 				if(strcmp(x_nr,"list",true) == 0)
  				{
					SendClientMessage(playerid, COLOR_YELLOW, "_________Locuri_List_________");
					SendClientMessage(playerid, COLOR_GRAD1, "1: GS/LS 2: BS/LS 3: Madd Dog House");
  					return 1;
    			}
      			else if(strcmp(x_nr,"1",true) == 0)
         		{
					SendClientMessageToAll(COLOR_BLUE,"{00FA9A}|________WAR Provocation________|");
           			SendClientMessageToAll(COLOR_GREEN, "{D3D3D3}Mafia-VLA-Ballas {00FA9A}au declarat WAR , zona: {FFFFFF}GS/LS");
					SendClientMessageToAll(COLOR_BLUE,"{00FA9A}|________WAR Provocation________|");
              		return 1;
				}
    			else if(strcmp(x_nr,"2",true) == 0)
       			{
					SendClientMessageToAll(COLOR_BLUE,"{00FA9A}|________WAR Provocation________|");
          			SendClientMessageToAll(COLOR_GREEN, "{D3D3D3}Mafia-VLA-Ballas {00FA9A}au declarat WAR , zona: {FFFFFF}BS/LS");
					SendClientMessageToAll(COLOR_BLUE,"{00FA9A}|________WAR Provocation________|");
             		return 1;
				}
				else if(strcmp(x_nr,"3",true) == 0)
    			{
					SendClientMessageToAll(COLOR_BLUE,"{00FA9A}|________WAR Provocation________|");
       				SendClientMessageToAll(COLOR_GREEN, "{D3D3D3}Mafia-VLA-Ballas {00FA9A}au declarat WAR , zona: {FFFFFF}Madd Dog House");
					SendClientMessageToAll(COLOR_BLUE,"{00FA9A}|________WAR Provocation________|");
           			return 1;
				}
			}
			else
			{
  				SendClientMessage(playerid, COLOR_GRAD2, "You are not a gang / mafia leader!");
  				return 1;
      		}
        	wtimer[playerid] = 3000000;
		}
		return 1;
	}
	if(strcmp(cmd, "/acceptwar", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(acceptwar == 1)
            {
                if(PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pLeader] == 17 || PlayerInfo[playerid][pLeader] == 16)
                {
                    acceptwar = 0;
                    SendClientMessageToAll(COLOR_BLUE,"{00FA9A}|__________WAR Started__________|");
                    SendClientMessageToAll(COLOR_BLUE,"{D3D3D3}Mafia-VLA-Ballas {00FA9A}au acceptat WARUL!");
                    SendClientMessageToAll(COLOR_BLUE,"{00FA9A}Va rugam , evitati acea zona!");
                    SendClientMessageToAll(COLOR_BLUE,"{00FA9A}|__________WAR Started__________|");
                    SetTimer("WarEnded", 1800000, 0);
                    for(new i;i < MAX_TEAMS;i++)
                    {
                        Killing[i] = 0;
                    }
                    IsWar = true;
                }
                else if(PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pLeader] == 15 || PlayerInfo[playerid][pLeader] == 18)
                {
                    acceptwar = 0;
                    SendClientMessageToAll(COLOR_BLUE,"{00FA9A}|__________WAR Started__________|");
                    SendClientMessageToAll(COLOR_BLUE,"{D3D3D3}Triads-LSV-Grove {00FA9A}au acceptat WARUL!");
                    SendClientMessageToAll(COLOR_BLUE,"{00FA9A}Va rugam , evitati acea zona!");
                    SendClientMessageToAll(COLOR_BLUE,"{00FA9A}|__________WAR Started__________|");
                    SetTimer("WarEnded", 1800000, 0);
                    for(new i;i < MAX_TEAMS;i++)
                    {
                        Killing[i] = 0;
                    }
                    IsWar = true;
                }
                else
                {
                    SendClientMessage(playerid, COLOR_GREY,"    you are not authorized to use this command(LEADERS ONLY)");
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "   there wasn't any war proposed");
            }
        }
        return 1;
    }
and the war over is here :

Code:
forward WarEnded();
public WarEnded()
{
    new str[128];
    IsWar = false;
	format(str, 128,"{00FA9A}|________WAR Finished________|");
    SendClientMessageToAll(COLOR_WHITE,str);
    format(str, 128,"{D3D3D3}TheTriads-LSV-Grove {00FA9A}Score: %d kills || {D3D3D3}The Mafia-VLA-Ballas {00FA9A}Score: %d kills,",Killing[18] + Killing[6] + Killing[15], Killing[5] + Killing[17] + Killing[16]);
    SendClientMessageToAll(COLOR_WHITE,str);
   	format(str, 128,"{00FA9A}Membrii aliantei castigatoare au primit 5000 mats, 500 drugs si $50.000 pentru castigarea warului!");
    SendClientMessageToAll(COLOR_WHITE,str);
	format(str, 128,"{00FA9A}|________WAR Finished________|");
    SendClientMessageToAll(COLOR_WHITE,str);
	if(Killing[18] + Killing[6] + Killing[15] > Killing[5] + Killing[16] + Killing[17])
	{
		for(new a; a<MAX_PLAYERS;a++)
		{
			if(PlayerInfo[a][pLeader] == 18 || PlayerInfo[a][pLeader] == 6 || PlayerInfo[a][pLeader] == 15 || PlayerInfo[a][pMember] == 18
			|| PlayerInfo[a][pMember] == 6 || PlayerInfo[a][pMember] == 16)
			{
				PlayerInfo[a][pMats] += 5000;
				PlayerInfo[a][pDrugs] += 500;
				GivePlayerMoney(a, 50000);
			}
		}
	}
	else
	{
		for(new k; k<MAX_PLAYERS;k++)
		{
			if(PlayerInfo[k][pLeader] == 5 || PlayerInfo[k][pLeader] == 16 || PlayerInfo[k][pLeader] == 17 || PlayerInfo[k][pMember] == 5
			|| PlayerInfo[k][pMember] == 16 || PlayerInfo[k][pMember] == 17)
			{
				PlayerInfo[k][pMats] += 5000;
				PlayerInfo[k][pDrugs] += 500;
				GivePlayerMoney(k, 50000);
			}
		}
	}
    for(new i;i<MAX_TEAMS;i++)
    {
        Killing[i] = 0;
    }
    return 1;
}
How cand i add what you said on those cmd to do something like this : 1. When the leader accepts the provocation of war , to start automatically count kills of player team . 2. Then after 30 minutes , the war is automatically closed and show the frags , i want to show the best player frags . Can you help me ?
I need to know where to put those lines who you give it to me.

srry for my bad english !
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)