- 0
Problema /attack
-
Similar Content
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
Dani3l.
Problemă: Pai... daca nu sunt pe un turf si dau /attack zice comanda necunoscuta, si a-si vrea sa apara "Nu esti pe un teritoriu".
Ce ai încercat să faci: Pai... am incercat sa adaug: , am mai incercat si alte chestii, dar cam inutile..
if(turf == 0) return SendClientMessage(playerid, COLOR_WHITE, "Nu esti pe un teritoriu!");
Erori/atentionari: -
Cod sursă:
CMD:attack(playerid, params[]) {
if(!IsAMember(playerid)) return SendClientMessage(playerid,COLOR_GREY, "Nu faci parte dintr-o mafie.");
if(PlayerInfo[playerid][pRank] < 3) return SendClientMessage(playerid,COLOR_LIGHTBLUE,"You do not have rank 3.");
new turf,string[100];
for(new i = 1; i <= sizeof(TurfInfo); i++) {
if(IsPlayerInTurf(playerid, i) == 1) {
turf = i;
break;
}
}
new hour,minute,second, year, month, day;
gettime(hour,minute,second);
getdate(year, month, day);
new days[180];
if(PlayerInfo[playerid][pAdmin] < 7) {
if(hour == 10 || hour == 21) {}
else return SendClientMessage(playerid, COLOR_LIGHTRED, "War-uri se pot da doar in intervalul 20:00 - 22:00!");
new memberss;
foreach(new i : Player)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[pMember] == TurfInfo[turf][zOwned])
{
memberss ++;
}
}
}
if(memberss < 1) return SCM(playerid, COLOR_WHITE, "This mafia don't have members online.");
}
if(turf == 0) return SendClientMessage(playerid, COLOR_WHITE, "Nu esti pe un teritoriu!");
new faction = PlayerInfo[playerid][pMember];
if(TurfInfo[turf][zOwned] == faction) return SendClientMessage(playerid, COLOR_GREY, "Nu poti ataca turful mafiei tale.");
if(WarInfo[turf][wAttacker] != 0) return SendClientMessage(playerid, COLOR_WHITE, "Acest turf este deja atacat.");
if(InWar[faction] == 1) return SendClientMessage(playerid, COLOR_WHITE, "Este deja un war activ.");
if(InWar[TurfInfo[turf][zOwned]] == 1) return SendClientMessage(playerid, COLOR_WHITE, "Aceasta mafie are deja un war activ.");
if(DeelayWar[PlayerInfo[playerid][pMember]] != 0) {
format(string, sizeof(string), "Poti folosi aceasta comanda peste %d minute (%d secunde).", DeelayWar[PlayerInfo[playerid][pMember]]/60, DeelayWar[PlayerInfo[playerid][pMember]]);
SCM(playerid, COLOR_LGREEN, string);
return 1;
}
format(string, sizeof(string), "[WAR] %s a atacat teritoriul %d detinut de factiunea %s.",GetName(playerid),turf,NumeFactiune(TurfInfo[turf][zOwned]));
SendFamilyMessage(faction,COLOR_MONEY,string);
format(string, sizeof(string), "[WAR] %s (%s) a atacat teritoriul %d detinut de factiunea ta.",NumeFactiune(WarInfo[turf][wAttacker]),GetName(playerid),turf);
SendFamilyMessage(TurfInfo[turf][zOwned],COLOR_MONEY,string);
new query[128];
format(query,sizeof(query),"UPDATE `turfs` SET `Time`='24' WHERE `ID`='%d'",turf);
mysql_query(SQL,query);
worstscoreat[turf] = 0;
worstmemberat[turf] = 999;
bestscoreat[turf] = 0;
bestmemberat[turf] = 999;
worstscoredf[turf] = 0;
worstmemberdf[turf] = 999;
bestscoredf[turf] = 0;
bestmemberdf[turf] = 999;
InWar[TurfInfo[turf][zOwned]] = 1;
InWar[faction] = 1;
waitwar[faction] = 60;
return 1;
}
Imagini: -
Precizări: Help plss
2 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now