14.07.2014, 11:48
Hi all.
When I try to do this command, /F, it says that I'm not in a family on in a faction, but I'm leader and member of number 1 faction (police)
Here's the command:
In my .INI file says Member=1 Leader=1 FMember=255...
What can I do?
Thanks.
When I try to do this command, /F, it says that I'm not in a family on in a faction, but I'm leader and member of number 1 faction (police)
Here's the command:
pawn Код:
if(strcmp(cmd, "/famiglia", true) == 0 || strcmp(cmd, "/f", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pMember] == 0 || PlayerInfo[playerid][pLeader] == 0 || PlayerInfo[playerid][pFMember] == 255)
{
SendClientMessage(playerid, WHITE, "You are not in a family or in a faction!");
return 1;
}
//if(gFam[playerid]) 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, "USO: /(f)azione [chat ooc fazione]");
return 1;
}
format(string, sizeof(string), "** (( %s %s: %s )) **", GetPlayerRank(playerid), PlayerName(playerid), result);
SendNewFamilyMessage(PlayerInfo[playerid][pFMember], 0x7BDDA5AA, string);
}
return 1;
}
What can I do?
Thanks.