Код:
CMD:fdelete(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 1 && PlayerInfo[playerid][pGangMod] > 1 || PlayerInfo[playerid][pAdmin] >= 3)
{
if(AdminDuty[playerid] != 1 && PlayerInfo[playerid][pAdmin] < 5)
return SendClientMessage(playerid,COLOR_WHITE, "You're not on-duty as admin. To access your admin commands you must be on-duty. Type /aduty to go on-duty.");
new family;
if(sscanf(params, "d", family))
return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /fdelete [familyid]");
if(family < 1 || family > 10) { SendClientMessage(playerid, COLOR_GREY, " Gang Slot can't be below 1 or above 10!"); return 1; }
if(FamilyInfo[family-1][FamilyTaken] != 1)
{
SendClientMessage(playerid, COLOR_GREY, " That Gang Slot isn't taken!");
return 1;
}
ClearFamily(family-1);
SaveGangs();
for(new i=0; i < MAX_POINTS; i++)
{
if(Points[i][OwnerTeam] == family)
{
Points[i][OwnerTeam] = 0;
}
}
}
return 1;
}
Код:
CMD:turfs(playerid, params[])
{
new string[256], gangcolor, turfstatus[64];
new number = 0;
for(new i; i < MAX_POINTS; i++)
{
if(Points[i][Vulnerable] > 0)
{
format(turfstatus, sizeof(turfstatus), "{33CCFF}%d hours left", Points[i][Vulnerable]);
}
else if(Points[i][Vulnerable] == 0 && Points[i][TakeOverTimerStarted] > 0)
{
format(turfstatus, sizeof(turfstatus), "{FF0606}Under Attack!!!");
}
else if(Points[i][Vulnerable] == 0 && Points[i][TakeOverTimerStarted] == 0)
{
format(turfstatus, sizeof(turfstatus), "{AA3333}Vulnerable");
}
if(Points[i][Type] >= 0)
{
number ++;
//NONE
if(Points[i][Vulnerable] > 0)
{
//GANGS
if(Points[i][OwnerTeam] < 11)
{
gangcolor = HexToInt(FamilyInfo[Points[i][OwnerTeam]-1][FamilyBandana]);
format(string, sizeof(string), "%d. %s | {%h}%s{E0FFFF} | Claimer: %s | Perk: %s | %s", number, Points[i][Name],gangcolor,Points[i][Owner],Points[i][CapperName],Points[i][Perk], turfstatus);
SendClientMessage(playerid, COLOR_OOC, string);
}
//POLICE
else if(Points[i][OwnerTeam] == 11)
{
if(strcmp(Points[i][Name], "East Beach", false) == 0)
{
format(string, sizeof(string), "%d. %s | {8D8DFF}Shutdown by the Police{E0FFFF} | Perk: Combat Shotgun + $500 bonus | %s", number, Points[i][Name], turfstatus);
SendClientMessage(playerid, COLOR_OOC, string);
}
else
{
format(string, sizeof(string), "%d. %s | {8D8DFF}Shutdown by the Police{E0FFFF} | Perk: $500 dollar bonus | %s", number, Points[i][Name],Points[i][Perk], turfstatus);
SendClientMessage(playerid, COLOR_OOC, string);
}
}
else
{
format(string, sizeof(string), "%d. %s | Owner: None | Perk: %s | %s", number, Points[i][Name], turfstatus);
SendClientMessage(playerid, COLOR_OOC, string);
}
}
}
}
return 1;
}