Guten Tag.
Kann mir jmd. helfen?
Wie mache ich das jeder Leader der Fraktion (24 Fraktionen) ein GOV machen kann,? also könntet ihr des ändern ^^, habs versucht aber naja
Beispiel:
________________________:: Durchsage - [FRAKTIONSNAME]::________________________
[RANKNAME] Max Mustermann: Wir suche noch Mitglieder für unsere Fraktion!
_____________________________________________________________
if(strcmp(cmd, "/government", true) == 0 || strcmp(cmd, "/gov", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(gTeam[playerid] != 2 && !IsACop(playerid) && !IsPlayerInFrac(playerid, 7) && !IsPlayerInFrac(playerid, 24))
{
SendClientMessage(playerid, COLOR_GREY, " Du bist kein Staatsbeamter!");
return 1;
}
if(PlayerInfo[playerid][pRank] < 5)
{
SendClientMessage(playerid, COLOR_GREY, " Du benötigst mindestens Rang 5!");
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, "Benutze: /gov(ernment) [Nachricht]");
return 1;
}
SendClientMessageToAll(COLOR_WHITE, "|================= {FF0000}Staatsnachricht {FFFFFF}=================|");
if(PlayerInfo[playerid][pLeader] == 7)
{
format(string, sizeof(string), "Regierung %s: %s", sendername, result);
}
else if(PlayerInfo[playerid][pMember] == 7 && PlayerInfo[playerid][pRank] == 11)
{
format(string, sizeof(string), "Kanzler %s: %s", sendername, result);
}
else if(PlayerInfo[playerid][pMember] == 7 && PlayerInfo[playerid][pRank] == 10)
{
format(string, sizeof(string), "Staatsminister %s: %s", sendername, result);
}
else if(PlayerInfo[playerid][pMember] == 7 && PlayerInfo[playerid][pRank] == 9)
{
format(string, sizeof(string), "Finanzminister %s: %s", sendername, result);
}
else if(PlayerInfo[playerid][pMember] == 7 && PlayerInfo[playerid][pRank] == 8)
{
format(string, sizeof(string), "Innenminister %s: %s", sendername, result);
}
else if(PlayerInfo[playerid][pMember] == 7 && PlayerInfo[playerid][pRank] == 7)
{
format(string, sizeof(string), "Vorsitzender %s: %s", sendername, result);
}
else if(PlayerInfo[playerid][pMember] == 7 && PlayerInfo[playerid][pRank] == 6)
{
format(string, sizeof(string), "Leitender Geheimdienst %s: %s", sendername, result);
}
else if(PlayerInfo[playerid][pLeader] == 1)
{
format(string, sizeof(string), "Polizeipräsident %s: %s", sendername, result);
}
else if(PlayerInfo[playerid][pLeader] == 2)
{
format(string, sizeof(string), "FBI Präsident %s: %s", sendername, result);
}
else if(PlayerInfo[playerid][pLeader] == 3)
{
format(string, sizeof(string), "General %s: %s", sendername, result);
}
else format(string, sizeof(string), "Staatsbeamter %s: %s", sendername, result);
SendClientMessageToAll(COLOR_DBLUE, string);
}
return 1;
}
/