Ich habe ein Problem mit meinem /f chat.
Wenn man was im /f chat schreibt, erscheind dies 2x ...
Code :
if(strcmp(cmd, "/family", true) == 0 || strcmp(cmd, "/f", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, "Du kannst nicht sprechen, du wurdest gemutet!");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "BENUTZUNG: (/f)amily [familien chat]");
return 1;
}
new leader = PlayerInfo[playerid][pLeader];
new member = PlayerInfo[playerid][pMember];
//if (gTeam[playerid] >= 5 || PlayerInfo[playerid][pFMember] < 255)
if( (member >= 1 && member <= 24) || (leader >= 1 && leader <= 24) )
BLA
BLA
BLA
BLA
BLA
UNWICHTIGstring);
}
}
}
return 1;
}