07.01.2014, 13:59
The title really says it all but for note, When i use /company invite it will show the useage but after putting my id in witch is 0 (/company invite 0) none of the code is used after that. EG Messages.
pawn Код:
COMMAND:company(playerid, params[], option[])
{
if(sscanf(params, "s[10]", option))
{
SendClientMessage(playerid, COLOR_WHITE, "{C2A2DA}Usage{FFFFFF}: /company [option]");
SendClientMessage(playerid,COLOR_YELLOW2,"Actions: members, invite, uninvite, setrank");
SendClientMessage(playerid,COLOR_YELLOW2,"Actions:");
}
if(strcmp(option,"invite",true) == 0)
{
new InviteID;
if(sscanf(params, "d", InviteID)) return SendClientMessage(playerid, COLOR_WHITE, "{C2A2DA}Usage{FFFFFF}: /company invite [playerid]");
{
if(!IsPlayerConnected(InviteID)) return SendClientMessage(playerid, COLOR_WHITE, "[{FF6347}Error{FFFFFF}]: This person is not connect or you have provided an invalid id.");
if(CharacterInfo[InviteID][cCompany] > 0)
{
CharacterInfo[InviteID][cCompany] = CharacterInfo[playerid][cCompany];
format(CharacterInfo[InviteID][cCompanyRank], 32, "No Rank");
SendClientMessage(InviteID, COLOR_YELLOW2, "You have been invited to a company.");
SendClientMessage(playerid, COLOR_YELLOW2, "You have invited another player to your company.");
SendClientMessage(playerid, COLOR_YELLOW2, "Make sure you set this players rank.");
} else SendClientMessage(playerid, COLOR_WHITE, "[{FF6347}Error{FFFFFF}]: This person is already a member of another company..");
}
}
}