Hallo
Ich habe hier ein Codestück, weiss jedoch nicht, wohin ich das einauen muss, da ich momentan nur DCMD kenne.
if(strcmp(cmd, "/f", true) == 0)
{
if(IsPlayerConnected(playerid))
{
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, "Hinweis: /f [Text]");
return true;
}
if (PlayerInfo[playerid][pTeam] != 0)
{
if(PlayerInfo[playerid][pMember] != 0)
{
format(string, sizeof(string), " Fraktion %s: %s. )) ", sendername, string);
SendFamilyMessage(PlayerInfo[playerid][pMember], COLOR_YELLOW, sstring);
return 1;
}
if(PlayerInfo[playerid][pLeader] != 0)
{
format(string, sizeof(string), " Fraktion (Leader) %s: %s. )) ", sendername, string);
SendFamilyMessage(PlayerInfo[playerid][pLeader], COLOR_YELLOW, sstring);
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "Du bist in keiner Fraktion");
}
}
return true;
}
MfG dUDALUS