Problem /auninvite command. -
Код:
CMD:auninvite(playerid, params[])
{
if(pInfo[playerid][pAdminLevel] > 2)
{
new otherid, aName[MAX_PLAYER_NAME], targetname[MAX_PLAYER_NAME], string[256], string2[256], fp, reason[256], factionname[256];
if(sscanf(params, "rds[256]", otherid, fp, reason)) return SendClientMessage(playerid, COLOR_GREY, "Usage: {FFFFFF}/auninvite [playerid] [fp] [reason]");
GetPlayerName(playerid, aName, sizeof(aName));
GetPlayerName(otherid, targetname, sizeof(targetname));
if(pInfo[otherid][pGroup] == 0 || pInfo[otherid][pGroupRank] == 0)
{
if(pInfo[otherid][pGroup] == 1)
{
factionname = "Los Santos Police Department";
}
format(string, sizeof(string), "Admin %s has uninvited %s from faction %s after %d days with %d fp, reason: %s.", GetName(playerid), targetname, factionname, pInfo[otherid][pGroupDays], fp, reason);
submitToHelpersAndAdmins(string, COLOR_RED);
format(string2, sizeof(string2), "* Admin %s has uninvited you from the faction, reason: %s.", aName, reason);
SendClientMessage(otherid, -1, string2);
pInfo[otherid][pGroup] = 0;
pInfo[otherid][pGroupRank] = 0;
pInfo[otherid][pSkin] = 60;
SetToFaction(otherid);
}
else return SendClientMessage(playerid, COLOR_GREY, "That user is not in a faction.");
}
else return SendClientMessage(playerid, -1, NotAdmin);
return 1;
}
This should remove the player from his faction.
As you can see, I have this which sould return a message saying that he isn't in a faction.
However, this doesn't work. I can still uninvite him from the civillian faction..
Re: Problem /auninvite command. -