Guten Morgen,
ich habe ein Problem und das wäre, dass nicht alle Admin Ränge in den ooc chat schreiben können.
Also Admin Rang 2000 kann in den chat schreiben
Admin Rang 1338, 1337,6,5,4,... kann nicht rein schreiben
Woran liegt das? Bitte um Hilfe!
Hier mal der Code:
PHP
if(strcmp(cmd, "/ooc", true) == 0 || strcmp(cmd, "/o", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, " Du bist noch nicht Eingeloggt !");
return 1;
}
if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, " Du kannst nicht sprechen, du bist 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, "NUTZUNG: (/o)oc [ooc chat]");
return 1;
}
if(PlayerInfo[playerid][pAdmin] == 1)
{
format(string, sizeof(string), "(( Probe Supporter %s: %s))", sendername, result);
}
if(PlayerInfo[playerid][pAdmin] >= 2)
{
format(string, sizeof(string), "(( Supporter %s: %s))", sendername, result);
}
if(PlayerInfo[playerid][pAdmin] <= 3)
{
format(string, sizeof(string), "(( Supporter %s: %s))", sendername, result);
}
if(PlayerInfo[playerid][pAdmin] >= 4)
{
format(string, sizeof(string), "(( Administrator %s: %s))", sendername, result);
}
if(PlayerInfo[playerid][pAdmin] == 5)
{
format(string, sizeof(string), "(( Administrator %s: %s))", sendername, result);
}
if(PlayerInfo[playerid][pAdmin] <= 6)
{
format(string, sizeof(string), "(( Administrator %s: %s))", sendername, result);
}
if(PlayerInfo[playerid][pAdmin] >= 1337)
{
format(string, sizeof(string), "(( stellv.Projektleiter %s: %s))", sendername, result);
}
if(PlayerInfo[playerid][pAdmin] <= 1338)
{
format(string, sizeof(string), "(( stellv.Projektleiter %s: %s))", sendername, result);
}
if(PlayerInfo[playerid][pAdmin] >= 2000)
{
format(string, sizeof(string), "(( Serverowner %s: %s))", sendername, result);
}
else if(PlayerInfo[playerid][pSupporter] >= 1)
{
format(string, sizeof(string), "(( Probe Supporter %s: %s))", sendername, result);
}
else if(PlayerInfo[playerid][pAdmin] == 0 && (noooc))
{
format(string, sizeof(string), "(( %s: %s))", sendername, result);
}
else return 1;
OOCOff(0xB8860BAA,string);
Log("OA-Chat.txt",string);
}
return 1;
}
Alles anzeigen