29.11.2011, 15:34
Hello, Everytime I attempt to change this, Faction 12 Cant use it even if I have
pawn Code:
if(!(PlayerInfo[playerid][pMember] >= 1 && PlayerInfo[playerid][pMember] <= 7 || PlayerInfo[playerid][pMember] == 12 ))
pawn Code:
if(strcmp(cmd, "/departments", true) == 0 || strcmp(cmd, "/d", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(!(PlayerInfo[playerid][pMember] >= 1 && PlayerInfo[playerid][pMember] <= 7))
{
SendClientMessage(playerid, COLOR_GRAD2, " You are not part of a Team !");
return 1;
}
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[256];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: (/d)epartments [department chat]");
return 1;
}
format(string, sizeof(string), "** [%s] %s %s: %s **", GetPlayerFactionName(playerid),GetPlayerRank(playerid),PlayerName(playerid), result);
SendFamilyMessage(1, COLOR_DCHAT, string);
SendFamilyMessage(2, COLOR_DCHAT, string);
SendFamilyMessage(3, COLOR_DCHAT, string);
SendFamilyMessage(4, COLOR_DCHAT, string);
SendFamilyMessage(5, COLOR_DCHAT, string);
SendFamilyMessage(6, COLOR_DCHAT, string);
SendFamilyMessage(7, COLOR_DCHAT, string);
format(string, sizeof(string), "[Radio] %s", result);
SetPlayerChatBubble(playerid,string,COLOR_WHITE,30.0,10000);
format(string, sizeof(string), "Departments: %s %s %s: %s", GetPlayerFactionName(playerid),GetPlayerRank(playerid),PlayerName(playerid), result);
Log("logs/departments.log", string);
return 1;
}
return 1;
}