13.05.2015, 16:07
Hi when 2 mafia /attack in turfs some times war cancel and turfs not blinker turfs in map and /wartime not working but some times it working Right which team is wining the loser turfs not change colore to wining colore turfs what should i do?
PHP код:
if(!strcmp(cmd,"/turfs",true))
{
if(TurfShow[playerid] == 0)
{
TurfShow[playerid] = 1;
SCM(playerid,COLOR_ALI,"Turfs Showed on map");
for(new i = 0;i<sizeof(TurfInfo);i++)
{
if(!strcmp(TurfInfo[i][zOwner],"SilenceMafia",true))
{
GangZoneShowForPlayer(playerid,Turfs[i],0x70756dAA);
}
if(!strcmp(TurfInfo[i][zOwner],"TheKillers",true))
{
GangZoneShowForPlayer(playerid,Turfs[i],0x63f9b0AA);
}
if(!strcmp(TurfInfo[i][zOwner],"DangrousTigers",true))
{
GangZoneShowForPlayer(playerid,Turfs[i],0x08c13cAA);
}
if(!strcmp(TurfInfo[i][zOwner],"LegendaryMen",true))
{
GangZoneShowForPlayer(playerid,Turfs[i],0xFF9900AA);
}
if(!strcmp(TurfInfo[i][zOwner],"FastNFarious",true))
{
GangZoneShowForPlayer(playerid,Turfs[i],0x8F32BDAA);
}
if(!strcmp(TurfInfo[i][zOwner],"StormMen",true))
{
GangZoneShowForPlayer(playerid,Turfs[i],0x2A2A2AAA);
}
if(!strcmp(TurfInfo[i][zOwner],"Theendwar",true))
{
GangZoneShowForPlayer(playerid,Turfs[i],0xe00500AA);
}
if(!strcmp(TurfInfo[i][zOwner],"Emogirl",true))
{
GangZoneShowForPlayer(playerid,Turfs[i],0xff0066AA);
}
if(!strcmp(TurfInfo[i][zOwner],"Special",true))
{
GangZoneShowForPlayer(playerid,Turfs[i],0xbcd530AA);
}
}
if(OnWar[playerid] != 9999)
{
new famil;
new familtaraf;
if(PlayerInfo[playerid][pLeader]) famil = PlayerInfo[playerid][pLeader];
else famil = PlayerInfo[playerid][pMember];
new rang;
for(new i = 0;i<LastPID;i++)
{
if(gPlayerLogged[i] && OnWar[i] == OnWar[playerid])
{
if(PlayerInfo[i][pMember] != famil && PlayerInfo[i][pLeader] != famil)
{
if(PlayerInfo[i][pLeader]) familtaraf = PlayerInfo[i][pLeader];
else familtaraf = PlayerInfo[i][pMember];
}
}
}
if(familtaraf == 5)
{
rang = 0x70756dAA;
}
if(familtaraf == 6)
{
rang = 0x63f9b0AA;
}
if(familtaraf == 12)
{
rang = 0x08c13cAA;
}
if(familtaraf == 13)
{
rang = 0xFF9900AA;
}
if(familtaraf == 14)
{
rang = 0x8F32BDAA;
}
if(familtaraf == 15)
{
rang = 0x2A2A2AAA;
}
if(familtaraf == 17)
{
rang = 0xe00500AA;
}
if(familtaraf == 18)
{
rang = 0xefd1657AA;
}
if(familtaraf == 19)
{
rang = 0xebcd530AA;
}
GangZoneFlashForAll(OnWar[playerid],rang);
}
return 1;
}
if(TurfShow[playerid] == 1)
{
TurfShow[playerid] = 0;
SCM(playerid,COLOR_ALI,"Turfs hidded from map");
for(new i = 0;i<sizeof(TurfInfo);i++)
{
GangZoneHideForPlayer(playerid,Turfs[i]);
}
}
return 1;
}
PHP код:
if(!strcmp(cmd,"/attack",true))
{
if(!IsAMemberC(playerid)) return SCM(playerid,COLOR_ALI,"You are not in a family");
if(PlayerInfo[playerid][pRank] <= 3) return SCM(playerid,COLOR_ALI,"You must be Rank +4 to attack a Turf.");
new famil;
if(PlayerInfo[playerid][pLeader]) famil = PlayerInfo[playerid][pLeader];
else famil = PlayerInfo[playerid][pMember];
if(DynamicFactions[famil-1][fBank] < 2500) return SCM(playerid,COLOR_ALI,"You haven't 2,500$ in your HQ to attack");
if(OnWar[playerid] != 9999) return SCM(playerid,COLOR_ALI,"You already attacked/Defending a turf.");
new turf = GetPlayerZone(playerid);
if(turf == -1) return SCM(playerid,COLOR_ALI,"You are not in a turf.");
if(!strcmp(TurfInfo[turf][zOwner],"SilenceMafia",true) && (PINFO[playerid][pMember] == 5 || PINFO[playerid][pLeader] == 5)) return SCM(playerid,COLOR_ALI,"You cannot attack your turf.");
if(!strcmp(TurfInfo[turf][zOwner],"TheKillers",true) && (PINFO[playerid][pMember] == 6 || PINFO[playerid][pLeader] == 6)) return SCM(playerid,COLOR_ALI,"You cannot attack your turf.");
if(!strcmp(TurfInfo[turf][zOwner],"DangrousTigers",true) && (PINFO[playerid][pMember] == 12 || PINFO[playerid][pLeader] == 12)) return SCM(playerid,COLOR_ALI,"You cannot attack your turf.");
if(!strcmp(TurfInfo[turf][zOwner],"LegendaryMen",true) && (PINFO[playerid][pMember] == 13 || PINFO[playerid][pLeader] == 13)) return SCM(playerid,COLOR_ALI,"You cannot attack your turf.");
if(!strcmp(TurfInfo[turf][zOwner],"FastNFarious",true) && (PINFO[playerid][pMember] == 14 || PINFO[playerid][pLeader] == 14)) return SCM(playerid,COLOR_ALI,"You cannot attack your turf.");
if(!strcmp(TurfInfo[turf][zOwner],"StormMen",true) && (PINFO[playerid][pMember] == 15 || PINFO[playerid][pLeader] == 15)) return SCM(playerid,COLOR_ALI,"You cannot attack your turf.");
if(!strcmp(TurfInfo[turf][zOwner],"TheEndWar",true) && (PINFO[playerid][pMember] == 17 || PINFO[playerid][pLeader] == 17)) return SCM(playerid,COLOR_ALI,"You cannot attack your turf.");
if(!strcmp(TurfInfo[turf][zOwner],"Emogirl",true) && (PINFO[playerid][pMember] == 18 || PINFO[playerid][pLeader] == 18)) return SCM(playerid,COLOR_ALI,"You cannot attack your turf.");
if(!strcmp(TurfInfo[turf][zOwner],"Special",true) && (PINFO[playerid][pMember] == 19 || PINFO[playerid][pLeader] == 19)) return SCM(playerid,COLOR_ALI,"You cannot attack your turf.");
if(turfattacker[turf] != 9999) return SCM(playerid,COLOR_ALI,"This turf already on attack.");
new turfmembers;
new rang;
new familyname[256];
if(PINFO[playerid][pMember] == 5 || PINFO[playerid][pLeader] == 5)
{
new string[256];
format(string,256,"%s","SilenceMafia");
strmid(familyname,string,0,strlen(string),256);
}
if(PINFO[playerid][pMember] == 6 || PINFO[playerid][pLeader] == 6)
{
new string[256];
format(string,256,"%s","TheKillers");
strmid(familyname,string,0,strlen(string),256);
}
if(PINFO[playerid][pMember] == 12 || PINFO[playerid][pLeader] == 12)
{
new string[256];
format(string,256,"%s","DangrousTigers");
strmid(familyname,string,0,strlen(string),256);
}
if(PINFO[playerid][pMember] == 13 || PINFO[playerid][pLeader] == 13)
{
new string[256];
format(string,256,"%s","LegendaryMen");
strmid(familyname,string,0,strlen(string),256);
}
if(PINFO[playerid][pMember] == 14 || PINFO[playerid][pLeader] == 14)
{
new string[256];
format(string,256,"%s","FastNFarious");
strmid(familyname,string,0,strlen(string),256);
}
if(PINFO[playerid][pMember] == 15 || PINFO[playerid][pLeader] == 15)
{
new string[256];
format(string,256,"%s","StormMen");
strmid(familyname,string,0,strlen(string),256);
}
if(PINFO[playerid][pMember] == 17 || PINFO[playerid][pLeader] == 17)
{
new string[256];
format(string,256,"%s","TheEndWar");
strmid(familyname,string,0,strlen(string),256);
}
if(PINFO[playerid][pMember] == 18 || PINFO[playerid][pLeader] == 18)
{
new string[256];
format(string,256,"%s","Emogirl");
strmid(familyname,string,0,strlen(string),256);
}
if(PINFO[playerid][pMember] == 19 || PINFO[playerid][pLeader] == 19)
{
new string[256];
format(string,256,"%s","Special");
strmid(familyname,string,0,strlen(string),256);
}
for(new i = 0;i<LastPID;i++)
{
if(PINFO[i][pMember] == 5 || PINFO[i][pLeader] == 5)
{
new string[256];
format(string,256,"%s","SilenceMafia");
strmid(familyname,string,0,strlen(string),256);
}
if(PINFO[i][pMember] == 6 || PINFO[i][pLeader] == 6)
{
new string[256];
format(string,256,"%s","TheKillers");
strmid(familyname,string,0,strlen(string),256);
}
if(PINFO[i][pMember] == 12 || PINFO[i][pLeader] == 12)
{
new string[256];
format(string,256,"%s","DangrousTigers");
strmid(familyname,string,0,strlen(string),256);
}
if(PINFO[i][pMember] == 13 || PINFO[i][pLeader] == 13)
{
new string[256];
format(string,256,"%s","LegendaryMen");
strmid(familyname,string,0,strlen(string),256);
}
if(PINFO[i][pMember] == 14 || PINFO[i][pLeader] == 14)
{
new string[256];
format(string,256,"%s","FastNFarious");
strmid(familyname,string,0,strlen(string),256);
}
if(PINFO[i][pMember] == 15 || PINFO[i][pLeader] == 15)
{
new string[256];
format(string,256,"%s","StormMen");
strmid(familyname,string,0,strlen(string),256);
}
if(PINFO[i][pMember] == 17 || PINFO[i][pLeader] == 17)
{
new string[256];
format(string,256,"%s","TheEndWar");
strmid(familyname,string,0,strlen(string),256);
}
if(PINFO[i][pMember] == 18 || PINFO[i][pLeader] == 18)
{
new string[256];
format(string,256,"%s","Emogirl");
strmid(familyname,string,0,strlen(string),256);
}
if(PINFO[i][pMember] == 19 || PINFO[i][pLeader] == 19)
{
new string[256];
format(string,256,"%s","Special");
strmid(familyname,string,0,strlen(string),256);
}
}
new familtaraf = famil;
if(familtaraf == 5) rang = 0x70756dAA; // Silence
else if(familtaraf == 6) rang = 0x63f9b0AA; // The Killers
else if(familtaraf == 12) rang = 0x08c13cAA; // dangrous Tigers
else if(familtaraf == 13) rang = 0xFF9900AA; // Legendary Men
else if(familtaraf == 14) rang = 0x8F32BDAA; // Fast N Farious
else if(familtaraf == 15) rang = 0x2A2A2AAA; // Storm Men
else if(familtaraf == 17) rang = 0xe00500AA; // Theend
else if(familtaraf == 18) rang = 0xeff0066AA; // Emogirl
else if(familtaraf == 19) rang = 0xebcd530AA; // special
if(!strcmp(TurfInfo[turf][zOwner],"SilenceMafia",true)) turfmembers = 5;
else if(!strcmp(TurfInfo[turf][zOwner],"TheKillers",true)) turfmembers = 6;
else if(!strcmp(TurfInfo[turf][zOwner],"DangrousTigers",true)) turfmembers = 12;
else if(!strcmp(TurfInfo[turf][zOwner],"LegendaryMen",true)) turfmembers = 13;
else if(!strcmp(TurfInfo[turf][zOwner],"FastNFarious",true)) turfmembers = 14;
else if(!strcmp(TurfInfo[turf][zOwner],"StormMen",true)) turfmembers = 15;
else if(!strcmp(TurfInfo[turf][zOwner],"TheEndWar",true)) turfmembers = 17;
else if(!strcmp(TurfInfo[turf][zOwner],"Emogirl",true)) turfmembers = 18;
else if(!strcmp(TurfInfo[turf][zOwner],"Special",true)) turfmembers = 19;
new tName[40];
GetPlayerName(playerid,tName,40);
for(new i = 0;i<LastPID;i++)
{
if(PlayerInfo[i][pMember] == turfmembers || PlayerInfo[i][pLeader] == turfmembers)
{
GangZoneFlashForPlayer(i,Turfs[turf],rang);
new stringg[512];
format(stringg,512,"[Attack]:Mantaghe Ba Id %d Benam %s Tavasote Khanvade %s Az Player %s Attack Khord.",turf,TurfInfo[turf][zOwner],familyname,tName);
SendClientMessageToAll(0xFF0000FF,stringg);
killsattacker[i] = 0;
deathsattacker[i] = 0;
killskhod[i] = 0;
deathskhod[i] = 0;
OnWar[i] = turf;
}
if(PlayerInfo[i][pMember] == famil || PlayerInfo[i][pLeader] == famil)
{
GangZoneFlashForPlayer(i,Turfs[turf],rang);
new stringg[512];
format(stringg,512,"[Turfs]: Your family attacked Turfid: %i TurfOwner: %s Attacked By: %s Time remaining: 00:30:00",turf,TurfInfo[turf][zOwner],familyname);
SCM(i,0xFF0000FF,stringg);
killsattacker[i] = 0;
deathsattacker[i] = 0;
killskhod[i] = 0;
deathskhod[i] = 0;
OnWar[i] = turf;
}
}
turfattacker[turf] = famil;
turfkhod[turf] = turfmembers;
killsattackerturf[turf] = 0;
deathsattackerturf[turf] = 0;
killskhodturf[turf] = 0;
deathskhodturf[turf] = 0;
scoreattacker[turf] = 0;
scorekhod[turf] = 0;
TurfTime[turf] = 1800;
return 1;
}