Hallo liebe Scripter
Wo ist den der Fehler?
if(strcmp(cmd, "/clearblacklist", true) == 0 || strcmp(cmd, "/clearbl", true) == 0)
{
new mafid = GetPlayerMafia(playerid);
if(PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pLeader] == 6 ||PlayerInfo[playerid][pLeader] == 12|| PlayerInfo[playerid][pLeader] == 13 ||PlayerInfo[playerid][pLeader] == 14|| PlayerInfo[playerid][pLeader] == 15 ||PlayerInfo[playerid][pLeader] == 16|| PlayerInfo[playerid][pLeader] == 17 ||PlayerInfo[playerid][pLeader] == 18||PlayerInfo[playerid][pLeader] == 19||PlayerInfo[playerid][pLeader] == 23)
{
strmid(Blacklist[mafid][user10],"Niemand",0,strlen("Niemand"),255);
strmid(Blacklist[mafid][user9],"Niemand",0,strlen("Niemand"),255);
strmid(Blacklist[mafid][user8],"Niemand",0,strlen("Niemand"),255);
strmid(Blacklist[mafid][user7],"Niemand",0,strlen("Niemand"),255);
strmid(Blacklist[mafid][user6],"Niemand",0,strlen("Niemand"),255);
strmid(Blacklist[mafid][user5],"Niemand",0,strlen("Niemand"),255);
strmid(Blacklist[mafid][user4],"Niemand",0,strlen("Niemand"),255);
strmid(Blacklist[mafid][user3],"Niemand",0,strlen("Niemand"),255);
strmid(Blacklist[mafid][user2],"Niemand",0,strlen("Niemand"),255);
strmid(Blacklist[mafid][user1],"Niemand",0,strlen("Niemand"),255);
SendClientMessage(playerid,COLOR_YELLOW,"Blacklist gecleart");
}
}
if(strcmp(cmd, "/setblacklist", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "FEHLER: /setblacklist [id]");
return 1;
}
new blid = strval(tmp);
if(IsPlayerConnected(blid))
{
if(IsPlayerNPC(blid))
{
SendClientMessage(playerid, COLOR_GREY, " Du kannst kein Auftrag auf ein Bot geben");
return 1;
}
new mafid = GetPlayerMafia(playerid);
new plName[MAX_PLAYER_NAME];
new sendName[MAX_PLAYER_NAME];
GetPlayerName(playerid,sendName,sizeof(sendName));
GetPlayerName(blid,plName,sizeof(plName));
strmid(Blacklist[mafid][user10],Blacklist[mafid][user9],0,strlen(Blacklist[mafid][user9]),255);
strmid(Blacklist[mafid][user9],Blacklist[mafid][user8],0,strlen(Blacklist[mafid][user8]),255);
strmid(Blacklist[mafid][user8],Blacklist[mafid][user7],0,strlen(Blacklist[mafid][user7]),255);
strmid(Blacklist[mafid][user7],Blacklist[mafid][user6],0,strlen(Blacklist[mafid][user6]),255);
strmid(Blacklist[mafid][user6],Blacklist[mafid][user5],0,strlen(Blacklist[mafid][user5]),255);
strmid(Blacklist[mafid][user5],Blacklist[mafid][user4],0,strlen(Blacklist[mafid][user4]),255);
strmid(Blacklist[mafid][user4],Blacklist[mafid][user3],0,strlen(Blacklist[mafid][user3]),255);
strmid(Blacklist[mafid][user3],Blacklist[mafid][user2],0,strlen(Blacklist[mafid][user2]),255);
strmid(Blacklist[mafid][user2],Blacklist[mafid][user1],0,strlen(Blacklist[mafid][user1]),255);
strmid(Blacklist[mafid][user1],plName,0,strlen(plName),255);
IsBlacklist[blid] = 1;
if(mafid==1)
{
new famstr[256];
format(famstr,sizeof(famstr),"%s hat %s auf die Blacklist gesetzt!",sendName,plName);
SendFamilyMessage(5,COLOR_RED,famstr);
}
else if(mafid==2)
{
new famstr[256];
format(famstr,sizeof(famstr),"%s hat %s auf die Blacklist gesetzt!",sendName,plName);
SendFamilyMessage(6,COLOR_RED,famstr);
}
else if(mafid==3)
{
new famstr[256];
format(famstr,sizeof(famstr),"%s hat %s auf die Blacklist gesetzt!",sendName,plName);
SendFamilyMessage(16,COLOR_RED,famstr);
}
else if(mafid==4)
{
new famstr[256];
format(famstr,sizeof(famstr),"%s hat %s auf die Blacklist gesetzt!",sendName,plName);
SendFamilyMessage(17,COLOR_RED,famstr);
}
else if(mafid==5)
{
new famstr[256];
format(famstr,sizeof(famstr),"%s hat %s auf die Blacklist gesetzt!",sendName,plName);
SendFamilyMessage(17,COLOR_RED,famstr);
}
else if(mafid==6)
{
new famstr[256];
format(famstr,sizeof(famstr),"%s hat %s auf die Blacklist gesetzt!",sendName,plName);
SendFamilyMessage(17,COLOR_RED,famstr);
}
else if(mafid==7)
{
new famstr[256];
format(famstr,sizeof(famstr),"%s hat %s auf die Blacklist gesetzt!",sendName,plName);
SendFamilyMessage(17,COLOR_RED,famstr);
}
else if(mafid==8)
{
new famstr[256];
format(famstr,sizeof(famstr),"%s hat %s auf die Blacklist gesetzt!",sendName,plName);
SendFamilyMessage(17,COLOR_RED,famstr);
}
else if(mafid==9)
{
new famstr[256];
format(famstr,sizeof(famstr),"%s hat %s auf die Blacklist gesetzt!",sendName,plName);
SendFamilyMessage(17,COLOR_RED,famstr);
}
else if(mafid==10)
{
new famstr[256];
format(famstr,sizeof(famstr),"%s hat %s auf die Blacklist gesetzt!",sendName,plName);
SendFamilyMessage(17,COLOR_RED,famstr);
}
else if(mafid==11)
{
new famstr[256];
format(famstr,sizeof(famstr),"%s hat %s auf die Blacklist gesetzt!",sendName,plName);
SendFamilyMessage(17,COLOR_RED,famstr);
}
return 1;
}
else return SendClientMessage(playerid, COLOR_GRAD1, "Der Spieler ist nicht Online!");
}
if(strcmp(cmd, "/blacklist", true) == 0)
{
new mafid = GetPlayerMafia(playerid);
if(mafid==1||mafid==2||mafid==3||mafid==4||mafid==5||mafid==6||mafid==7||mafid==8||mafid==9||mafid==10||mafid==11)
{
new blstr[256];
SendClientMessage(playerid,COLOR_GREEN,"-----Blacklist-----");
format(blstr,sizeof(blstr),"1. %s",Blacklist[mafid][user1]);
SendClientMessage(playerid,COLOR_GREEN,blstr);
format(blstr,sizeof(blstr),"2. %s",Blacklist[mafid][user2]);
SendClientMessage(playerid,COLOR_GREEN,blstr);
format(blstr,sizeof(blstr),"3. %s",Blacklist[mafid][user3]);
SendClientMessage(playerid,COLOR_GREEN,blstr);
format(blstr,sizeof(blstr),"4. %s",Blacklist[mafid][user4]);
SendClientMessage(playerid,COLOR_GREEN,blstr);
format(blstr,sizeof(blstr),"5. %s",Blacklist[mafid][user5]);
SendClientMessage(playerid,COLOR_GREEN,blstr);
format(blstr,sizeof(blstr),"6. %s",Blacklist[mafid][user6]);
SendClientMessage(playerid,COLOR_GREEN,blstr);
format(blstr,sizeof(blstr),"7. %s",Blacklist[mafid][user7]);
SendClientMessage(playerid,COLOR_GREEN,blstr);
format(blstr,sizeof(blstr),"8. %s",Blacklist[mafid][user8]);
SendClientMessage(playerid,COLOR_GREEN,blstr);
format(blstr,sizeof(blstr),"9. %s",Blacklist[mafid][user9]);
SendClientMessage(playerid,COLOR_GREEN,blstr);
format(blstr,sizeof(blstr),"10. %s",Blacklist[mafid][user10]);
SendClientMessage(playerid,COLOR_GREEN,blstr);
}
else return SendClientMessage(playerid, COLOR_GRAD1, "Du bist kein Gang oder Mafia Mitglied!");
}