#1

Hi, I'd also like to make a command / war but fail!

Код:
if(strcmp(cmd, "/war", true) == 0)
{
	    if(IsPlayerConnected(playerid))
	    {
			if (PlayerInfo[playerid][pAdmin] >= 1339)
			{
              format(string, sizeof(string), "Admin %s Start a war!", sendername);
              format(string, sizeof(string), "Ballas,Los Santos Vagos,The Mafia vs Varrios Los Aztecas,Grove Street,The Triads");
              PlayerInfo[playerid][pWarTime] = 700;
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "   Nu esti Admin pentru a incepe un War !");
			}
		}
new sparaw = 0
new legacy = 0
	if(PlayerInfo[killerid][pMember] == 5 || PlayerInfo[killerid][pLeader] == 5)
	{
		if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)
		{
            new killer[MAX_PLAYER_NAME];
            GetPlayerName(killerid, killer, sizeof(killer));
            format(string,128,"* %s [The Mafia] has killed %s [The Triads] and recivied 2500$.",killer,name);
            SendmfiMessage(COLOR_1GREEN, string);
            format(string,128,"* %s [The Triads] was pwned by %s [The Mafia] and lost 2500$.",name,killer);
            SendthrMessage(COLOR_1BLUE, string);
	        GivePlayerMoney(killerid, 2500);
	        sparaw = sparaw ++;
	        return 1;
        }
	}
	if(PlayerInfo[killerid][pMember] == 6 || PlayerInfo[killerid][pLeader] == 6)
	{
		if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5)
		{
            new killer[MAX_PLAYER_NAME];
            GetPlayerName(killerid, killer, sizeof(killer));
            format(string,128,"* %s [The Triads] has killed %s [The Mafia] and recivied 2500$.",killer,name);
            SendthrMessage(COLOR_1GREEN, string);
            format(string,128,"* %s [The Mafia] was pwned by %s [The Triads] and lost 2500$.",name,killer);
            SendmfiMessage(COLOR_1BLUE, string);
	        GivePlayerMoney(killerid, 2500);
	        legacy = legacy ++;
	        return 1;
        }
	}
	if(PlayerInfo[killerid][pMember] == 12 || PlayerInfo[killerid][pLeader] == 12)
	{
		if(PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13)
		{
            new killer[MAX_PLAYER_NAME];
            GetPlayerName(killerid, killer, sizeof(killer));
            format(string,128,"* %s [Grove Street] has killed %s [Ballas] and recivied 2500$.",killer,name);
            SendBZMessage(COLOR_1GREEN, string);
            format(string,128,"* %s [Ballas] was pwned by %s [Grove Street] and lost 2500$.",name,killer);
            SendCZMessage(COLOR_1BLUE, string);
	        GivePlayerMoney(killerid, 2500);
	        legacy = legacy ++;
	        return 1;
        }
	}
	if(PlayerInfo[killerid][pMember] == 13 || PlayerInfo[killerid][pLeader] == 13)
	{
		if(PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12)
		{
            new killer[MAX_PLAYER_NAME];
            GetPlayerName(killerid, killer, sizeof(killer));
            format(string,128,"* %s [Ballas] has killed %s [Grove Street] and recivied 2500$.",killer,name);
            SendCZMessage(COLOR_1GREEN, string);
            format(string,128,"* %s [Grove Street] was pwned by %s [Ballas] and lost 2500$.",name,killer);
            SendBZMessage(COLOR_1BLUE, string);
	        GivePlayerMoney(killerid, 2500);
	        sparaw = sparaw ++;
	        return 1;
        }
	}
	if(PlayerInfo[killerid][pMember] == 14 || PlayerInfo[killerid][pLeader] == 14)
	{
		if(PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)
		{
            new killer[MAX_PLAYER_NAME];
            GetPlayerName(killerid, killer, sizeof(killer));
            format(string,128,"* %s [Los Santos Vagos] has killed %s [Variors Los Aztecs] and recivied 2500$.",killer,name);
            SendNTMessage(COLOR_1GREEN, string);
            format(string,128,"* %s [Variors Los Aztecas] was pwned by %s [Los Santos Vagos] and lost 2500$.",name,killer);
            SendSTMessage(COLOR_1BLUE, string);
	        GivePlayerMoney(killerid, 2500);
	        sparaw = sparaw ++;
	        return 1;
        }
	}
	if(PlayerInfo[killerid][pMember] == 15 || PlayerInfo[killerid][pLeader] == 15)
	{
		if(PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14)
		{
            new killer[MAX_PLAYER_NAME];
            GetPlayerName(killerid, killer, sizeof(killer));
            format(string,128,"* %s [Variors Los Aztecas] has killed %s [Los Santos Vagos] and recivied 2500$.",killer,name);
            SendSTMessage(COLOR_1GREEN, string);
            format(string,128,"* %s [Los Santos Vagos] was pwned by %s [Variors Los Aztecas] and lost 2500$.",name,killer);
            SendNTMessage(COLOR_1BLUE, string);
	        GivePlayerMoney(killerid, 2500);
	        legacy = legacy ++;
	        return 1;
        }
	}
	if(PlayerInfo[killerid][pMember] == 5 || PlayerInfo[killerid][pLeader] == 5)
	{
		if(PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12)
		{
            new killer[MAX_PLAYER_NAME];
            GetPlayerName(killerid, killer, sizeof(killer));
            format(string,128,"* %s [The Mafia] has killed %s [Grove Street] and recivied 2500$.",killer,name);
            SendmfiMessage(COLOR_1GREEN, string);
            format(string,128,"* %s [Grove Street] was pwned by %s [The Mafia] and lost 2500$.",name,killer);
            SendBZMessage(COLOR_1BLUE, string);
	        GivePlayerMoney(killerid, 2500);
	        sparaw = sparaw ++;
	        return 1;
        }
	}
	if(PlayerInfo[killerid][pMember] == 5 || PlayerInfo[killerid][pLeader] == 5)
	{
		if(PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)
		{
            new killer[MAX_PLAYER_NAME];
            GetPlayerName(killerid, killer, sizeof(killer));
            format(string,128,"* %s [The Mafia] has killed %s [Variors Los Aztecas] and recivied 2500$.",killer,name);
            SendmfiMessage(COLOR_1GREEN, string);
            format(string,128,"* %s [Variors Los Aztecas] was pwned by %s [The Mafia] and lost 2500$.",name,killer);
            SendSTMessage(COLOR_1BLUE, string);
	        GivePlayerMoney(killerid, 2500);
	        sparaw = sparaw ++;
	        return 1;
        }
	}
	if(PlayerInfo[killerid][pMember] == 6 || PlayerInfo[killerid][pLeader] == 6)
	{
		if(PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13)
		{
            new killer[MAX_PLAYER_NAME];
            GetPlayerName(killerid, killer, sizeof(killer));
            format(string,128,"* %s [The Triads] has killed %s [Ballas] and recivied 2500$.",killer,name);
            SendthrMessage(COLOR_1GREEN, string);
            format(string,128,"* %s [Ballas] was pwned by %s [The Triads] and lost 2500$.",name,killer);
            SendCZMessage(COLOR_1BLUE, string);
	        GivePlayerMoney(killerid, 2500);
	        legacy = legacy ++;
	        return 1;
        }
	}
	if(PlayerInfo[killerid][pMember] == 6 || PlayerInfo[killerid][pLeader] == 6)
	{
		if(PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14)
		{
            new killer[MAX_PLAYER_NAME];
            GetPlayerName(killerid, killer, sizeof(killer));
            format(string,128,"* %s [The Triads] has killed %s [Los Santos Vagos] and recivied 2500$.",killer,name);
            SendthrMessage(COLOR_1GREEN, string);
            format(string,128,"* %s [Los Santos Vagos] was pwned by %s [The Triads] and lost 2500$.",name,killer);
            SendNTMessage(COLOR_1BLUE, string);
	        GivePlayerMoney(killerid, 2500);
	        legacy = legacy ++;
	        return 1;
        }
	}
	if(PlayerInfo[killerid][pMember] == 12 || PlayerInfo[killerid][pLeader] == 12)
	{
		if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5)
		{
            new killer[MAX_PLAYER_NAME];
            GetPlayerName(killerid, killer, sizeof(killer));
            format(string,128,"* %s [Grove Street] has killed %s [The Mafia] and recivied 2500$.",killer,name);
            SendBZMessage(COLOR_1GREEN, string);
            format(string,128,"* %s [The Mafia] was pwned by %s [Grove Street] and lost 2500$.",name,killer);
            SendmfiMessage(COLOR_1BLUE, string);
	        GivePlayerMoney(killerid, 2500);
	        legacy = legacy ++;
	        return 1;
        }
	}
	if(PlayerInfo[killerid][pMember] == 12 || PlayerInfo[killerid][pLeader] == 12)
	{
		if(PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14)
		{
            new killer[MAX_PLAYER_NAME];
            GetPlayerName(killerid, killer, sizeof(killer));
            format(string,128,"* %s [Grove Street] has killed %s [Los Santos Vagos] and recivied 2500$.",killer,name);
            SendBZMessage(COLOR_1GREEN, string);
            format(string,128,"* %s [Los Santos Vagos] was pwned by %s [Grove Street] and lost 2500$.",name,killer);
            SendNTMessage(COLOR_1BLUE, string);
	        GivePlayerMoney(killerid, 2500);
	        legacy = legacy ++;
	        return 1;
        }
	}
	if(PlayerInfo[killerid][pMember] == 13 || PlayerInfo[killerid][pLeader] == 13)
	{
		if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)
		{
            new killer[MAX_PLAYER_NAME];
            GetPlayerName(killerid, killer, sizeof(killer));
            format(string,128,"* %s [Ballas] has killed %s [The Triads] and recivied 2500$.",killer,name);
            SendCZMessage(COLOR_1GREEN, string);
            format(string,128,"* %s [The Triads] was pwned by %s [Ballas] and lost 2500$.",name,killer);
            SendthrMessage(COLOR_1BLUE, string);
	        GivePlayerMoney(killerid, 2500);
	        sparaw = sparaw ++;
	        return 1;
        }
	}
	if(PlayerInfo[killerid][pMember] == 13 || PlayerInfo[killerid][pLeader] == 13)
	{
		if(PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)
		{
            new killer[MAX_PLAYER_NAME];
            GetPlayerName(killerid, killer, sizeof(killer));
            format(string,128,"* %s [Ballas] has killed %s [Variors Los Aztecas] and recivied 2500$.",killer,name);
            SendCZMessage(COLOR_1GREEN, string);
            format(string,128,"* %s [Variors Los Aztecas] was pwned by %s [Ballas] and lost 2500$.",name,killer);
            SendSTMessage(COLOR_1BLUE, string);
	        GivePlayerMoney(killerid, 2500);
	        sparaw = sparaw ++;
	        return 1;
        }
	}
	if(PlayerInfo[killerid][pMember] == 14 || PlayerInfo[killerid][pLeader] == 14)
	{
		if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)
		{
            new killer[MAX_PLAYER_NAME];
            GetPlayerName(killerid, killer, sizeof(killer));
            format(string,128,"* %s [Los Santos Vagos] has killed %s [The Triads] and recivied 2500$.",killer,name);
            SendNTMessage(COLOR_1GREEN, string);
            format(string,128,"* %s [The Triads] was pwned by %s [Los Santos Vagos] and lost 2500$.",name,killer);
            SendthrMessage(COLOR_1BLUE, string);
	        GivePlayerMoney(killerid, 2500);
	        sparaw = sparaw ++;
	        return 1;
        }
	}
	if(PlayerInfo[killerid][pMember] == 14 || PlayerInfo[killerid][pLeader] == 14)
	{
		if(PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12)
		{
            new killer[MAX_PLAYER_NAME];
            GetPlayerName(killerid, killer, sizeof(killer));
            format(string,128,"* %s [Los Santos Vagos] has killed %s [Grove Street] and recivied 2500$.",killer,name);
            SendNTMessage(COLOR_1GREEN, string);
            format(string,128,"* %s [Grove Street] was pwned by %s [Los Santos Vagos] and lost 2500$.",name,killer);
            SendBZMessage(COLOR_1BLUE, string);
	        GivePlayerMoney(killerid, 2500);
	        sparaw = sparaw ++;
	        return 1;
        }
	}
	if(PlayerInfo[killerid][pMember] == 15 || PlayerInfo[killerid][pLeader] == 15)
	{
		if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5)
		{
            new killer[MAX_PLAYER_NAME];
            GetPlayerName(killerid, killer, sizeof(killer));
            format(string,128,"* %s [Variors Los Aztecas] has killed %s [The Mafia] and recivied 2500$.",killer,name);
            SendSTMessage(COLOR_1GREEN, string);
            format(string,128,"* %s [The Mafia] was pwned by %s [Variors Los Aztecas] and lost 2500$.",name,killer);
            SendmfiMessage(COLOR_1BLUE, string);
	        GivePlayerMoney(killerid, 2500);
	        legacy = legacy ++;
	        return 1;
        }
	}
	if(PlayerInfo[killerid][pMember] == 15 || PlayerInfo[killerid][pLeader] == 15)
	{
		if(PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13)
		{
            new killer[MAX_PLAYER_NAME];
            GetPlayerName(killerid, killer, sizeof(killer));
            format(string,128,"* %s [Variors Los Aztecas] has killed %s [Ballas] and recivied 2500$.",killer,name);
            SendSTMessage(COLOR_1GREEN, string);
            format(string,128,"* %s [Ballas] was pwned by %s [Variors Los Aztecas] and lost 2500$.",name,killer);
            SendCZMessage(COLOR_1BLUE, string);
	        GivePlayerMoney(killerid, 2500);
	        legacy = legacy ++;
	        return 1;
        }
	}
	if(strcmp(cmd, "/stopwar", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	   	{
	        if(PlayerInfo[playerid][pAdmin] >= 1339)
			{
		        if(PlayerInfo[playerid][pWarTime] == 0)
		        {
		          format(string, sizeof(string), "Admin %s Stop War!", sendername);
		          format(string, sizeof(string), "Ballas,Los Santos Vagos,The Mafia vs Varrios Los Aztecas,Grove Street,The Triads");
		          format(string, sizeof(string), "%s - %s",sparaw,legacy)
		        }
		        else
		        {
					new wartime = PlayerInfo[playerid][pWarTime];
		            format(string, sizeof(string), "*** You must wait %d seconds to Stop War!.", wartime);
                    SendClientMessage(playerid, COLOR_1BLUE, string);
		        }
			}
Reply
#2

In what way does it fail? Do you get warnings or errors and if so can we see them?
Reply
#3

Код:
C:\Documents and Settings\A\Desktop\gf.pwn(1882) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\A\Desktop\gf.pwn(1886) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\A\Desktop\gf.pwn(1898) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\A\Desktop\gf.pwn(1902) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\A\Desktop\gf.pwn(1906) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\A\Desktop\gf.pwn(1910) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\A\Desktop\gf.pwn(1914) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\A\Desktop\gf.pwn(1918) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\A\Desktop\gf.pwn(1922) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\A\Desktop\gf.pwn(1934) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\A\Desktop\gf.pwn(1938) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\A\Desktop\gf.pwn(1942) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\A\Desktop\gf.pwn(1946) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\A\Desktop\gf.pwn(1950) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\A\Desktop\gf.pwn(1962) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\A\Desktop\gf.pwn(1966) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\A\Desktop\gf.pwn(1970) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\A\Desktop\gf.pwn(1982) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\A\Desktop\gf.pwn(1986) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\A\Desktop\gf.pwn(4982) : error 004: function "CrimInRange" is not implemented
C:\Documents and Settings\A\Desktop\gf.pwn(5297) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\A\Desktop\gf.pwn(5990) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\A\Desktop\gf.pwn(6799) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\A\Desktop\gf.pwn(6805) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\A\Desktop\gf.pwn(6811) : error 004: function "PlayerToPoint" is not implemented
C:\Documents and Settings\A\Desktop\gf.pwn(6817) : error 004: function "PlayerToPoint" is not implemented
Reply
#4

You did not define PlayerToPoint. Easy as that.
Reply
#5

some brackets were no

But now i have these errors:
Код:
C:\Documents and Settings\A\Desktop\gf.pwn(16893) : error 017: undefined symbol "killerid"
C:\Documents and Settings\A\Desktop\gf.pwn(16898) : error 017: undefined symbol "killerid"
C:\Documents and Settings\A\Desktop\gf.pwn(16899) : error 017: undefined symbol "name"
C:\Documents and Settings\A\Desktop\gf.pwn(16901) : error 017: undefined symbol "name"
C:\Documents and Settings\A\Desktop\gf.pwn(16903) : error 017: undefined symbol "killerid"
C:\Documents and Settings\A\Desktop\gf.pwn(16908) : error 017: undefined symbol "killerid"
C:\Documents and Settings\A\Desktop\gf.pwn(16913) : error 017: undefined symbol "killerid"
C:\Documents and Settings\A\Desktop\gf.pwn(16914) : error 017: undefined symbol "name"
C:\Documents and Settings\A\Desktop\gf.pwn(16916) : error 017: undefined symbol "name"
C:\Documents and Settings\A\Desktop\gf.pwn(16918) : error 017: undefined symbol "killerid"
C:\Documents and Settings\A\Desktop\gf.pwn(16923) : error 017: undefined symbol "killerid"
C:\Documents and Settings\A\Desktop\gf.pwn(16928) : error 017: undefined symbol "killerid"
C:\Documents and Settings\A\Desktop\gf.pwn(16929) : error 017: undefined symbol "name"
C:\Documents and Settings\A\Desktop\gf.pwn(16931) : error 017: undefined symbol "name"
C:\Documents and Settings\A\Desktop\gf.pwn(16933) : error 017: undefined symbol "killerid"
C:\Documents and Settings\A\Desktop\gf.pwn(16938) : error 017: undefined symbol "killerid"
C:\Documents and Settings\A\Desktop\gf.pwn(16943) : error 017: undefined symbol "killerid"
C:\Documents and Settings\A\Desktop\gf.pwn(16944) : error 017: undefined symbol "name"
C:\Documents and Settings\A\Desktop\gf.pwn(16946) : error 017: undefined symbol "name"
C:\Documents and Settings\A\Desktop\gf.pwn(16948) : error 017: undefined symbol "killerid"
C:\Documents and Settings\A\Desktop\gf.pwn(16953) : error 017: undefined symbol "killerid"
C:\Documents and Settings\A\Desktop\gf.pwn(16958) : error 017: undefined symbol "killerid"
C:\Documents and Settings\A\Desktop\gf.pwn(16959) : error 017: undefined symbol "name"
C:\Documents and Settings\A\Desktop\gf.pwn(16961) : error 017: undefined symbol "name"
C:\Documents and Settings\A\Desktop\gf.pwn(16963) : error 017: undefined symbol "killerid"
C:\Documents and Settings\A\Desktop\gf.pwn(16968) : error 017: undefined symbol "killerid"

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


26 Errors.
Reply
#6

Well I Think You Are Begginer You Should Try To Take Out All Them Erros By Adding
Inculdes All That You Have 1 At A Time!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)