Command /invite
#1

Whatever you are a medic or working in san news when you wrote command /invite you anyway will be invited to the police work .. I think there is a mistake in the last line. Maybe anybody can help how to fix it?
Код:
CMD:invite(playerid, params[])
{
	new targetid;
	new string[128];
	if(!PlayerInfo[playerid][Leader]) return SCM(playerid, COLOR_GREEN, "{AF1C1C}(INFO):{FFFFFF}Access Denied.");
    if(sscanf(params,"u", targetid))return SendClientMessage(playerid, COLOR_GREEN, "{E5AC00}(INFO):{FFFFFF}USAGE: /invite [playerid]");
    format(string, sizeof(string), "{E5AC00}(INFO):{FFFFFF}Leader %s has invited you to join his Faction. (Use '/accept Faction' to join the Faction)", RUS(playerid));
	SendClientMessage(targetid, COLOR_GREEN, string);
	format(string, sizeof(string), "{E5AC00}(INFO):{FFFFFF}You have invited %s to join your Faction.", RUS(targetid));
	SendClientMessage(playerid, COLOR_GREEN, string);
	PlayerInfo[targetid][PendingInv] = 1;
	return 1;
}
Reply
#2

Help, please..
Reply
#3

Show the accept command for it.. And learn to have a little patience.
Reply
#4

Код:
CMD:accept(playerid, params[])
{
	new targetid;
 	if(sscanf(params,"u", targetid))return SendClientMessage(playerid, COLOR_GREEN, "{E5AC00}(INFO):{FFFFFF}USAGE: /accept [faction |  gang | more to be added]");
    else if(!strcmp(params, "faction", true))
	{
		new string[128];
		if(PlayerInfo[playerid][PendingInv] == 0) return SendClientMessage(playerid, COLOR_GREEN, "{AF1C1C}(INFO):{FFFFFF}Nobody invited you to join a faction.");
		PlayerInfo[playerid][FactionID] = PlayerInfo[playerid][PendingInv];
		PlayerInfo[playerid][FactionRank] = 1;
		PlayerInfo[playerid][Faction] = 1;
        if(PlayerInfo[playerid][FactionID] == 1)
	    {
	        format(string, sizeof(string), "{E5AC00}(INFO):{FFFFFF}%s has accepted to join {E5AC00}Bone County Sheriff's Department.", RUS(playerid));
	        SendFM(playerid, COLOR_GREEN, string);
	    }
        else if(PlayerInfo[playerid][FactionID] == 2)
	    {
	        format(string, sizeof(string), "{E5AC00}(INFO):{FFFFFF}%s has accepted to join {E5AC00}Fort Carson Medical Department.", RUS(playerid));
	        SendFM(playerid, COLOR_GREEN, string);
        }
        else if(PlayerInfo[playerid][FactionID] == 3)
	    {
	        format(string, sizeof(string), "{E5AC00}(INFO):{FFFFFF}%s has accepted to join {E5AC00}City Council.", RUS(playerid));
	        SendFM(playerid, COLOR_GREEN, string);
        }
        else if(PlayerInfo[playerid][FactionID] == 4)
	    {
	        format(string, sizeof(string), "{E5AC00}(INFO):{FFFFFF}%s has accepted to join {E5AC00}Army Forces.", RUS(playerid));
	        SendFM(playerid, COLOR_GREEN, string);
        }
        else if(PlayerInfo[playerid][FactionID] == 5)
	    {
	        format(string, sizeof(string), "{E5AC00}(INFO):{FFFFFF}%s has accepted to join {E5AC00}News Agency.", RUS(playerid));
	        SendFM(playerid, COLOR_GREEN, string);
        }
    }
    else if(!strcmp(params, "family", true))
	{
		new string[128];
		if(PlayerInfo[playerid][PendingFInv] == 0) return SendClientMessage(playerid, COLOR_GREEN, "{AF1C1C}(INFO):{FFFFFF}Nobody invited you to join a Family.");
		PlayerInfo[playerid][FamilyID] = PlayerInfo[playerid][PendingFInv];
		PlayerInfo[playerid][FamilyRank] = 1;
		PlayerInfo[playerid][Family] = 1;
        if(PlayerInfo[playerid][FamilyID] == 1)
	    {
	        format(string, sizeof(string), "{E5AC00}(INFO):{FFFFFF}%s has accepted to join {E5AC00}Fort Carson Mechanics.", RUS(playerid));
	        Sendfamily(playerid, COLOR_GREEN, string);
	    }
        else if(PlayerInfo[playerid][FamilyID] == 2)
	    {
	        format(string, sizeof(string), "{E5AC00}(INFO):{FFFFFF}%s has accepted to join {E5AC00}Motorcycle Club.", RUS(playerid));
	        Sendfamily(playerid, COLOR_GREEN, string);
        }
        else if(PlayerInfo[playerid][FamilyID] == 3)
	    {
	        format(string, sizeof(string), "{E5AC00}(INFO):{FFFFFF}%s has accepted to join {E5AC00}Aviation Authority.", RUS(playerid));
	        Sendfamily(playerid, COLOR_GREEN, string);
        }
    }
	return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)