Also ich habe ein paar Probleme..
Also Supporter werden [Chat-Supporter] angezeigt..
Aber Admins nicht:(Die können garnicht erst schreiben..Also ich habe bloß von 1337-2050 Admins.. Ich weiß nicht woran das noch leigen kann..
Und der Chat sollte level 1-3 sein aber Level 4er können den immer noch lesen
Ich hoffe das ihr mir schnell helfen könnt;)
Danke i8m voraus..
if(strcmp(cmd, "/nc", true) == 0 || strcmp(cmd, "/noobchat", 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, "Verwendung: (/nc)(Neulings-Chat)[Text]");
return 1;
}
if(PlayerInfo[playerid][pLevel] <= 3 || PlayerInfo[playerid][pSupporter] >= 1 || PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pAdmin] >= 6)
{
if(PlayerInfo[playerid][pLevel] == 1) { format(string, sizeof(string), "**[Neuling]: %s: %s **", sendername, result); }
else if(PlayerInfo[playerid][pLevel] == 2) { format(string, sizeof(string), "**[Neuling]: %s: %s **", sendername, result); }
else if(PlayerInfo[playerid][pLevel] == 3) { format(string, sizeof(string), "**[Neuling]: %s: %s **", sendername, result); }
else if(PlayerInfo[playerid][pSupporter] == 1) { format(string, sizeof(string), "**[Chat-Supporter]: %s: %s **", sendername, result); }
else if(PlayerInfo[playerid][pAdmin] == 1) { format(string, sizeof(string), "**[Chat-Admin]: %s: %s **", sendername, result); }
else if(PlayerInfo[playerid][pAdmin] == 6) { format(string, sizeof(string), "**[Chat-Admin]: %s: %s **", sendername, result); }
else
{
format(string, sizeof(string), "** Neuling %s: %s, Ende. **", sendername, result);
}
for(new i=0; i<GetMaxPlayers(); i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[playerid][pLevel] == 3 || PlayerInfo[playerid][pLevel] == 2 || PlayerInfo[playerid][pLevel] == 1 || PlayerInfo[playerid][pSupporter] == 1 || PlayerInfo[playerid][pAdmin] == 1 || PlayerInfo[playerid][pAdmin] == 6)
{
SendClientMessage(i,0xD7AD62FF,string);
}
}
}
printf("%s", string);
return 1;
}
else
{
SendClientMessage(playerid, 0xFF0005FF, "Du bist kein Neuling mehr!");
return 1;
}
}
return 1;
}