Oink Oink Brotfische,
Ich habe den OOC chat (GF) und ich will machen wenn ein Admin schreibt das es blau ist aber ich weiß net wirklich wie hier die Zeilen :
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, 0xFFE600FF, "NUTZUNG: (/o)oc [ooc chat]");
return 1;
}
if(PlayerInfo[playerid][pAdmin] >= 4)
{
format(string, sizeof(string),"((*%d Admin %s: %s))", PlayerInfo[playerid][pAdmin], sendername, result);
}
else if(PlayerInfo[playerid][pAdmin] == 0 && (noooc))
{
format(string, sizeof(string), "(( %s: %s))", sendername, result);
}
else if(PlayerInfo[playerid][pAdmin] == 2000)
{
format(string, sizeof(string), "((%d Owner %s: %s))", 0xD70000FF,PlayerInfo[playerid][pSupporter], sendername, result);
}
else return 1;
OOCOff(COLOR_OOC,string);
Log("OA-Chat.txt",string);
}
return 1;
}
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, 0xFFE600FF, "NUTZUNG: (/o)oc [ooc chat]"); return 1; } if(PlayerInfo[playerid][pAdmin] >= 4) { format(string, sizeof(string),"((*%d Admin %s: %s))", PlayerInfo[playerid][pAdmin], sendername, result); } else if(PlayerInfo[playerid][pAdmin] == 0 && (noooc)) { format(string, sizeof(string), "(( %s: %s))", sendername, result); } else if(PlayerInfo[playerid][pAdmin] == 2000) { format(string, sizeof(string), "((%d Owner %s: %s))", 0xD70000FF,PlayerInfo[playerid][pSupporter], sendername, result); } else return 1; OOCOff(COLOR_OOC,string); Log("OA-Chat.txt",string); } return 1; }