Hai Leute
habe ein Problem mit /makeleader
immer wenn ich /makeleader [ID] [FRAK]
mache kaqqt der server komplett ab !
Ist hier was falsch ?
if(strcmp(cmd, "/makeleader", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Verwendung: /makeleader [spielerid/teildesnamens] [Nummer(1-11)]");
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] = 206; }
else if(level == 1) { PlayerInfo[para1][pChar] = 283; gTeam[para1] = 2; PlayerInfo[para1][pTeam] = 2; } // LOS SANTOS POLICE
else if(level == 2) { PlayerInfo[para1][pChar] = 288; gTeam[para1] = 2; PlayerInfo[para1][pTeam] = 2; } // SAN FIERRO POLICE
else if(level == 3) { PlayerInfo[para1][pChar] = 287; gTeam[para1] = 2; PlayerInfo[para1][pTeam] = 2; } // Army
else if(level == 4) { PlayerInfo[para1][pChar] = 275; gTeam[para1] = 4; PlayerInfo[para1][pTeam] = 4; } // Medic
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] = 295; } // Mayor
else if(level == 8) { PlayerInfo[para1][pChar] = 294; } // Hitmans
else if(level == 9) { PlayerInfo[para1][pChar] = 187; } // CNN
else if(level == 10) { PlayerInfo[para1][pChar] = 189; } // Taxi Cab Company
else if(level == 11) { PlayerInfo[para1][pChar] = 240; } // Driving/Flying School
else if(level == 12) { PlayerInfo[para1][pChar] = 248; } // Hells Angels
else if(level == 13) { PlayerInfo[para1][pChar] = 269; } // Grove Street
else if(level == 14) { PlayerInfo[para1][pChar] = 102; } // Ballas
else if(level == 15) { PlayerInfo[para1][pChar] = 185; } // 2Fast2Furios
else if(level == 16) { PlayerInfo[para1][pChar] = 110; } // Los Santos Vagos
else if(level == 17) { PlayerInfo[para1][pChar] = 115; } // Varios Los Aztecas
else if(level == 18) { PlayerInfo[para1][pChar] = 173; } // San Fierro Rifa
else if(level == 19) { PlayerInfo[para1][pChar] = 223; } // West Coast Customs
else if(level == 20) { PlayerInfo[para1][pChar] = 144; } // Terroristen
else if(level == 21) { PlayerInfo[para1][pChar] = 286; gTeam[para1] = 2; PlayerInfo[para1][pTeam] = 2; } //FBI
else if(level == 22) { PlayerInfo[para1][pChar] = 279; } // Feuerwehr
else if(level == 23) { PlayerInfo[para1][pChar] = 126; } // russenmafia
else if(level == 24) { PlayerInfo[para1][pChar] = 71; } // Ordnungsamt
gTeam[para1] = 11;
PlayerInfo[para1][pTeam] = 11;
SetPlayerSkin(para1, PlayerInfo[para1][pChar]);
}
}//not connected
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Dir ist es nicht erlaubt, diesen Befehl zu benutzen!");
}
}
return 1;
}
//edit es ist ein GF edit !