Hallo zusammen
bin selber am scripten eines selfmades und hab seid ein paar stunden den bug des man nur noch zivilist sein kann
ocmd:makeleader(playerid,params[])
{
new rank;
if(!isPlayerAnAdmin(playerid,5))return SendClientMessage(playerid,BLAU,"Du bist kein Admin.");
new pID, string[128];
if(sscanf(params,"ui",pID,rank))return SendClientMessage(playerid,BLAU,"/setteam [spieler] [Fraktionid]");
if(rank<0||rank>23)return SendClientMessage(playerid,BLAU,"Bitte gültige Fraktion angeben.");
//pInfo[pID][Fraktion] = rank;
////////////////////TEST
new ftext[128];
new level = pInfo[playerid][Fraktion]; //level
if(level == 0) { ftext= "Zivilist"; }
else if(rank == 1) { ftext= "LSPD"; }
else if(rank == 2) { ftext= "FBI"; }
else if(rank == 3) { ftext= "Army"; }
else if(rank == 4) { ftext= "Arzt"; }
else if(rank == 5) { ftext= "LCN"; }
else if(rank == 6) { ftext= "Yakuzza"; }
else if(rank == 7) { ftext= "Präsident"; }
else if(rank == 8) { ftext= "Hitman"; }
else if(rank == 9) { ftext= "CNN"; }
else if(rank == 10) { ftext= "Taxi"; }
else if(rank == 11) { ftext= "Fahrschule"; }
else if(rank == 12) { ftext= "Triaden"; }
else if(rank == 13) { ftext= "Grove Street"; }
else if(rank == 14) { ftext= "Ballas"; }
else if(rank == 15) { ftext= "LS Biker Club"; }
else if(rank == 16) { ftext= "Vagos"; }
else if(rank == 17) { ftext= "Aztecas"; }
else if(rank == 18) { ftext= "Rifa"; }
else if(rank == 19) { ftext= "Red Soldiers"; }
else if(rank == 20) { ftext= "Terroristen"; }
else if(rank == 21) { ftext= "Wheelmen"; }
else if(rank == 22) { ftext= "Russen Mafia"; }
else if(rank == 23) { ftext= "Ordnungsamt"; }
/////////////////////TEST
format(string,sizeof(string),"Admin %s : %s übernimmt den Leaderposten von %s",SpielerName(playerid),SpielerName(pID),ftext);
SendClientMessageToAll(ROT,string);
SpawnPlayer(pID);
SpielerSpeichern(pID);
return 1;
}
BITTE HELFT MIR DANKE