01.01.2017, 08:41
its work bro, but i want reset all factions
or this commands for all faction kick
or this commands for all faction kick
PHP код:
CMD:fackick(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 4 || PlayerInfo[playerid][pFactionModerator] >= 1)
{
new string[128], giveplayerid;
if(sscanf(params, "u", giveplayerid)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /fackick [playerid]");
if(IsPlayerConnected(giveplayerid))
{
if(PlayerInfo[giveplayerid][pMember] >= 1 || PlayerInfo[giveplayerid][pLeader] >= 1)
{
format(string, sizeof(string), "You have been faction-kicked, by %s.", GetPlayerNameEx( playerid ));
SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, string);
PlayerInfo[giveplayerid][pTeam] = TEAM_GREEN;
gTeam[giveplayerid] = PlayerInfo[giveplayerid][pTeam];
PlayerInfo[giveplayerid][pMember] = 0;
PlayerInfo[giveplayerid][pRank] = 0;
PlayerInfo[giveplayerid][pChar] = 0;
PlayerInfo[giveplayerid][pDuty] = 0;
PlayerInfo[giveplayerid][pLeader] = 0;
PlayerInfo[giveplayerid][pDivision] = 0;
if(!IsValidSkin(GetPlayerSkin(giveplayerid)))
{
new rand = random(sizeof(CIV));
SetPlayerSkin(giveplayerid,CIV[rand]);
PlayerInfo[giveplayerid][pModel] = CIV[rand];
}
player_remove_vip_toys(giveplayerid);
pTazer[giveplayerid] = 0;
SetPlayerToTeamColor(giveplayerid);
format(string, sizeof(string), "You have faction-kicked %s.", GetPlayerNameEx(giveplayerid));
SendClientMessageEx(playerid, COLOR_WHITE, string);
}
else
{
SendClientMessageEx(playerid, COLOR_WHITE, "You can't kick someone from a faction if they're not a member.");
}
}
else
{
SendClientMessageEx(playerid, COLOR_GREY, "Invalid player specified..");
}
}
return 1;
}