Egal welches Level man hat steht da, du bist kein Noob .... wieso?
/NOOBCHAT//
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)(Noob-Chat) [TEXT]");
return 1;
}
if(PlayerInfo[playerid][pLevel] >= 1)
if(PlayerInfo[playerid][pSupporter] >= 1)
{
if(PlayerInfo[playerid][pLevel] == 1) { format(string, sizeof(string), "** Level-1 %s: %s **", sendername, result); }
else if(PlayerInfo[playerid][pLevel] == 2) { format(string, sizeof(string), "** Level-2 %s: %s **", sendername, result); }
else if(PlayerInfo[playerid][pLevel] == 3) { format(string, sizeof(string), "** Level-2 %s: %s **", sendername, result); }
else if(PlayerInfo[playerid][pLevel] == 4) { format(string, sizeof(string), "** Level-3 %s: %s **", sendername, result); }
else if(PlayerInfo[playerid][pLevel] == 5) { format(string, sizeof(string), "** Level-5 %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), "** Noob %s: %s, Ende. **", sendername, result);
}
SendLeaderMessage(1, 0xD7AD62FF, string);
SendLeaderMessage(2, 0xD7AD62FF, string);
SendLeaderMessage(3, 0xD7AD62FF, string);
SendLeaderMessage(4, 0xD7AD62FF, string);
SendLeaderMessage(5, 0xD7AD62FF, string);
SendLeaderMessage(1, 0xD7AD62FF, string);
printf("%s", string);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, "Du bist kein Noob mehr.");
return 1;
}
}
return 1;
}