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;
}//Works until here
ClearFamily(family);
SaveGangs();
for(new i=0; i < MAX_POINTS; i++)
{
if(Points[i][OwnerTeam] == family)
{
Points[i][OwnerTeam] = 0;
}
}
}
return 1;
}
|
Is this from a filterscirpt?
Are you using more than one command processor ? |
|
PHP код:
|
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)
return SendClientMessage(playerid, COLOR_GREY, "Gang slot can't be below 1 or above!");
if(FamilyInfo[family-1][FamilyTaken != 1])
return SendClientMessage(playerid, COLOR_GREY, " That Gang Slot isn't taken!");
ClearFamily(family);
SaveGangs();
for(new i=0; i < MAX_POINTS; i++)
{
if(Points[i][OwnerTeam] == family)
{
Points[i][OwnerTeam] = 0;
}
}
}
return 1;
}
change this :
if(FamilyInfo[family-1][FamilyTaken] != 1)
{
SendClientMessage(playerid, COLOR_GREY,"That Gang Slot isn't taken!");
return1;
}
to this
if(FamilyInfo[family-1][FamilyTaken]!=1) return SendClientMessage(playerid, COLOR_GREY, "That Gang Slot isn't taken!");
or to this:
if(FamilyInfo[family-1][FamilyTaken]!=1)
return SendClientMessage(playerid, COLOR_GREY, "That Gang Slot isn't taken!");