03.10.2013, 15:09
Try this.
Код:
command(hire, playerid, params[]) { if(Player[playerid][Faction] >= 1) { if(Player[playerid][FactionRank] >= 6) { new id, string[512], string1[128]; if(sscanf(params, "u", id)) return SendClientMessage(playerid, WHITE, "Server: /hire [playerid/name]"); { if(Player[id][Faction] == 0) { if(Player[playerid][FactionRank] == 6)format(string1, sizeof(string1), "%s", Factions[Player[playerid][Faction]][RankSix]); else if(Player[playerid][FactionRank] == 7)format(string1, sizeof(string1), "%s", Factions[Player[playerid][Faction]][RankSeven]); format(string, sizeof(string), "%s %s wants you to join thier Faction. (%s) Use '/accept faction' to join.", string1, RemoveUnderScore(playerid), Factions[Player[playerid][Faction]][FactionName]); SendClientMessage(id, WHITE, string); format(string, sizeof(string), "You have invited %s to join %s.", RemoveUnderScore(id), Factions[Player[playerid][Faction]][FactionName]); SendClientMessage(playerid, WHITE, string); InvitedTo[id] = Player[playerid][Faction]; } else return SendClientMessage(playerid, WHITE, "That player is already in a Faction."); } } else return SendClientMessage(playerid, WHITE, "You aren't a high enough rank to use this command."); } else return SendClientMessage(playerid, WHITE, "You must be in a Faction to use this command."); return 1; }