Guten Tag ich bräuchte mal Hilfe weil jeder User sich auf dem Server jeder leader/invite/uninvte geben kann.
if(strcmp("/makeleader", cmd, true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 1337)
{
SendClientMessage(playerid, COLOR_KEINADMIN, "*** INFO: Dies ist ein Adminbefehl, du bist kein Admin.");
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_BENUTZETEXT, "___________________________________________________________________________________");
SendClientMessage(playerid, COLOR_BENUTZETEXT, "Benutze: /makeleader [SpielerName/ID] [Number(1-24; -1 für Leaderuninvite)]");
SendClientMessage(playerid, COLOR_BENUTZETEXT, "1 = LVPD | 2 = Parkhouse Drifter | 3 = Feuerwehr | 4 = Medic | 5 = La Cosa Nostra ");
SendClientMessage(playerid, COLOR_BENUTZETEXT, "6 = Yakuza | 7 = FBI | 8 = Hitman | 9 = New's Reporter | 10 = Wheelman | 11 = Fahrschule ");
SendClientMessage(playerid, COLOR_BENUTZETEXT, "12 = Regierung | 13 = Ordnungsamt | 14 = LSPD | 15 = Biker Boys | 16 = SFPD ");
SendClientMessage(playerid, COLOR_BENUTZETEXT, "17 = Camorra | 18 = Aztecas | 19 = Grove Street | 20 = Ballas | 21 = WCC ");
SendClientMessage(playerid, COLOR_BENUTZETEXT, "22 = Triaden | 23 = Red Soldiers | 24 = L.S. Vagos | 25 = Guerilla | 26 = Cali Kartell");
SendClientMessage(playerid, COLOR_BENUTZETEXT, "___________________________________________________________________________________");
return 1;
}
giveplayerid = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
new level = strval(tmp);
if(level > 26 || level < -1) { SendClientMessage(playerid, COLOR_ERRORTEXT, " Es gibt nur 26 Fraktionen/Gangs, bitte wähle zwischen 1-25!"); return 1; }
if(IsPlayerConnected(giveplayerid))
{
if(PlayerInfo[giveplayerid][pMember] > 0)
{
SendClientMessage(playerid, COLOR_ERRORTEXT, " Dieser Spieler ist ein Member einer Gang/Fraktion!");
return 1;
}
new ftext[20];
if(level == -1) { ftext = "Zivilisten"; }
else if(level == 1) { ftext = "LV-PD"; }
else if(level == 2) { ftext = "Drift Access"; }
else if(level == 3) { ftext = "Feuerwehr"; }
else if(level == 4) { ftext = "Medic"; }
else if(level == 5) { ftext = "La Cosa Nostra"; }
else if(level == 6) { ftext = "Yakuza"; }
else if(level == 7) { ftext = "FBI"; }
else if(level == 8) { ftext = "Hitman Agency"; }
else if(level == 9) { ftext = "News Reporter"; }
else if(level == 10) { ftext = "Wheelman Agency"; }
else if(level == 11) { ftext = "Fahrschule"; }
else if(level == 12) { ftext = "Regierung"; }
else if(level == 13) { ftext = "Ordnungsamt"; }
else if(level == 14) { ftext = "LS-PD"; }
else if(level == 15) { ftext = "Biker Boys"; }
else if(level == 16) { ftext = "SF-PD"; }
else if(level == 17) { ftext = "Camorra"; }
else if(level == 18) { ftext = "V.L.Atztecas"; }
else if(level == 19) { ftext = "Grove Street"; }
else if(level == 20) { ftext = "Ballas"; }
else if(level == 21) { ftext = "West Coast Customs"; }
else if(level == 22) { ftext = "Triaden"; }
else if(level == 23) { ftext = "Red Soldiers"; }
else if(level == 24) { ftext = "L.S.Vagos"; }
else if(level == 25) { ftext = "Guerillas"; }
else if(level == 26) { ftext = "Cali Kartell"; }
else { return 1; }
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[giveplayerid][pLeader] = level;
PlayerInfo[giveplayerid][pTeam] = level;
PlayerInfo[giveplayerid][pRank] = 12;
format(string, sizeof(string), " Du wurdest vom Admin %s zum Leader der/den %s gemacht.", sendername, ftext);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), " Du hast %s zum Leader der/den %s gemacht.", giveplayer,ftext);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
printf("Admin %s hat %s einen Leaderinvite für %s gegeben.", sendername, giveplayer, ftext);
format(string,sizeof(string),"Admin %s hat %s einen Leaderinvite für %s gegeben.", sendername, giveplayer, ftext);
Kleidungsshop[giveplayerid] = 1;
JoinSkinAuswahl(giveplayerid);
EnterToLog("makeleader",string);
if(level != -1)
{
new Tage = 30;
new wielange = (Tage*24*60*60);
new Zeit = wielange+Time();
PlayerInfo[giveplayerid][pInviteSperre] = Zeit;
format(string, sizeof(string), "UPDATE `users` SET `InviteDatum`='%d' WHERE `Name`='%s'", Time(), giveplayer);
self_mysql_query(string);
}
if(PlayerInfo[giveplayerid][pAdmin] >= 1337)
{
Kleidungsshop[giveplayerid] = 1;
PlayerInfo[giveplayerid][pJob] = 0;
JoinSkinAuswahl(giveplayerid);
SendClientMessage(giveplayerid, COLOR_LIGHTRED, "* Wähle einen Skin aus mit den Pfeiltasten. Bestätigen mit Umschalt.");
SetPVarInt(giveplayerid, "PVTeam", level);
}
}
}
return 1;
Ich bedanke mich schonmal im Vorraus ich finde keinen Fehler.
Das Independent Roleplay Team