Hallo Liebe samp users,
Ich hab da ein Bugg un zwar Wenn ich jemanden zb /makeleader 3 15 Mache dann ist es zb Ballas so,,
Wenn er aber dan kein Leader mehr von Ballas ist dann mach ich ja /makeleader Player ID und dann 0 dann ist er in keiner frak mehr aber
da Steht dann immer noch er ist in einer frak also ich kann hinn net /invite warum ka kann mir jemand helfen?
if(strcmp(cmd, "/makeleader", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "BENUTZUNG: /makeleader [playerid/Name] [Nummer(1-14)]");
SendClientMessage(playerid, COLOR_GRAD2, "____________________________________________________");
SendClientMessage(playerid, COLOR_GRAD2, "1.Police 2.SEK");
SendClientMessage(playerid, COLOR_GRAD2, "3.Bundeswehr 4.Sanitäter(Medic)");
SendClientMessage(playerid, COLOR_GRAD2, "5.LCN 6. Yakuzza");
SendClientMessage(playerid, COLOR_GRAD2, "7.Präsident 8. Hitmans");
SendClientMessage(playerid, COLOR_GRAD2, "9.News Reporter 10. Taxi Fahrer");
SendClientMessage(playerid, COLOR_GRAD2, "11.Fahrlehrer 12. Groove Street");
SendClientMessage(playerid, COLOR_GRAD2, "13.Bikers 14. ballaz");
SendClientMessage(playerid, COLOR_GRAD2, "15.Zoll 16. Name");
SendClientMessage(playerid, COLOR_GRAD2, "____________________________________________________");
return 1;
}
new para1;
new level;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
level = strval(tmp);
if(level > 15 || level < 0) { SendClientMessage(playerid, COLOR_GREY, "Die Nummer darf nicht unter 0 und über 15 sein!"); return 1; }
if (PlayerInfo[playerid][pAdmin] >= 1337)
{
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
if(PlayerInfo[para1][pMember] > 0 || PlayerInfo[para1][pFMember] < 255)
{
SendClientMessage(playerid, COLOR_GREY, "Dieser Spieler ist in einer Organisation / Familie!");
return 1;
}
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pLeader] = level;
format(string, sizeof(string), "Du wurdest von %s zum Leader gemacht.", sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "Du hast %s zum Leader Level %d gemacht.", giveplayer,level);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
if(level == 0) { PlayerInfo[para1][pChar] = 0; }
else if(level == 1) { PlayerInfo[para1][pChar] = 288; } //Police Force
else if(level == 2) { PlayerInfo[para1][pChar] = 286; } //FBI/ATF
else if(level == 3) { PlayerInfo[para1][pChar] = 287; } //National Guard
else if(level == 4) { PlayerInfo[para1][pChar] = 228; } //Fire/Ambulance
else if(level == 5) { PlayerInfo[para1][pChar] = 113; } //La Cosa Nostra
else if(level == 6) { PlayerInfo[para1][pChar] = 120; } //Yakuza
else if(level == 7) { PlayerInfo[para1][pChar] = 147; } //Mayor
else if(level == 8) { PlayerInfo[para1][pChar] = 294; } //Hitmans
else if(level == 9) { PlayerInfo[para1][pChar] = 227; } //News Reporters
else if(level == 10) { PlayerInfo[para1][pChar] = 61; } //Taxi Cab Company
else if(level == 11) { PlayerInfo[para1][pChar] = 171; } //Driving/Flying School
else if(level == 12) { PlayerInfo[para1][pChar] = 270; } //Groove Street
else if(level == 13) { PlayerInfo[para1][pChar] = 248; } //Bikers
else if(level == 14) { PlayerInfo[para1][pChar] = 104; } //ballas
else if(level == 15) { PlayerInfo[para1][pChar] = 17; } //zoll
gTeam[para1] = 15;
PlayerInfo[para1][pTeam] = 15;
SetPlayerSkin(para1, PlayerInfo[para1][pChar]);
}
}//not connected
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Dir ist es nicht erlaubt, diesen Befehl zu benutzen!");
}
}
return 1;
}
MFG: Hunter