04.05.2011, 17:46
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); } }