How to create /invite and /accept
#4

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;
}
Reply


Messages In This Thread
How to create /invite and /accept - by Ahmed10020 - 03.10.2013, 14:22
Re: How to create /invite and /accept - by MAFIAWARS - 03.10.2013, 14:36
Re: How to create /invite and /accept - by Ahmed10020 - 03.10.2013, 14:38
Re: How to create /invite and /accept - by Fez - 03.10.2013, 15:09
Re: How to create /invite and /accept - by DanishHaq - 03.10.2013, 15:45

Forum Jump:


Users browsing this thread: 1 Guest(s)