Es kann einfach keiner Lesen:( Also schreiben kann man ab Level 4 nicht mehr..Aber lvl 1-3 können einfach nicht schreiben..
Wäre schön wenn mir einer helfen könnte..Danke im 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)
{
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][pAdmin] == 1) { format(string, sizeof(string), "**[Chat-Supporter]: %s: %s **", sendername, result); }
else
{
format(string, sizeof(string), "** Neuling %s: %s, Ende. **", sendername, result);
}
SendClientMessage(0, 0xD7AD62FF, string);
printf("%s", string);
return 1;
}
else
{
SendClientMessage(playerid, 0xFF0005FF, "Du bist kein Neuling mehr!");
return 1;
}
}
return 1;
}