Hallo an alle, Ichhabe ein problem und zwar habe ich eine gangarea bekommen es klabt zwar mit den mitgliedern das sie die Areas einnehmen können aber leider nicht mit den Leadern ich weis leider nicht wie man das machen kann das Leader auch in denn Teams rein gemacht werden.
Hier mal den Makeleader befehl.
if(strcmp(cmd, "/makeleader", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /makeleader [playerid/PartOfName] [Number(1-16)]");
return 1;
}
new para1;
new level;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
level = strval(tmp);
if(level > 27 || level < 0) { SendClientMessage(playerid, COLOR_GREY, " Dont go below number 0, or above number 16!"); 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, " Der Spieler ist schon in einer Faction / Family !");
return 1;
}
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pLeader] = level;
format(string, sizeof(string), " You have been promoted to Leader to your requested Faction by Admin %s", sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), " You have given %s control to run Faction Number %d.", giveplayer,level);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
if(level == 0) { PlayerInfo[para1][pChar] = 0; }
else if(level == 1) { PlayerInfo[para1][pChar]= 127; } // Sacra Corana Unita
else if(level == 2) { PlayerInfo[para1][pChar] = 294; } // Sumiyoshi-rango
else if(level == 3) { PlayerInfo[para1][pChar] = 272; } // Tambowskaja
else if(level == 4) { PlayerInfo[para1][pChar] = 269; } // GreenPanter
else if(level == 5) { PlayerInfo[para1][pChar] = 110; } // Cometas
else if(level == 6) { PlayerInfo[para1][pChar] = 123; } // Dracon
else if(level == 7) { PlayerInfo[para1][pChar] = 30; } // HellsAngel
else if(level == 8) { PlayerInfo[para1][pChar] = 288; } // Police Force LS
else if(level == 9) { PlayerInfo[para1][pChar] = 288; } // Police Force SF
else if(level == 10) { PlayerInfo[para1][pChar] = 288; } // Police Force LV
else if(level == 11) { PlayerInfo[para1][pChar] = 286; } // FBI/ATF
else if(level == 12) { PlayerInfo[para1][pChar] = 228; } // Fire/Ambulance LS
else if(level == 13) { PlayerInfo[para1][pChar] = 228; } // Fire/Ambulance SF
else if(level == 14) { PlayerInfo[para1][pChar] = 228; } // Fire/Ambulance LV
else if(level == 15) { PlayerInfo[para1][pChar] = 227; } // News Reporters LS
else if(level == 16) { PlayerInfo[para1][pChar] = 227; } // News Reporters SF
else if(level == 17) { PlayerInfo[para1][pChar] = 227; } // News Reporters LV
else if(level == 18) { PlayerInfo[para1][pChar] = 61; } // Taxi Cab Company LS
else if(level == 19) { PlayerInfo[para1][pChar] = 61; } // Taxi Cab Company SF
else if(level == 20) { PlayerInfo[para1][pChar] = 61; } // Taxi Cab Company LV
else if(level == 21) { PlayerInfo[para1][pChar] = 288; } // Police Force LS
else if(level == 22) { PlayerInfo[para1][pChar] = 288; } // Police Force SF
else if(level == 23) { PlayerInfo[para1][pChar] = 288; } // Police Force LV
else if(level == 24) { PlayerInfo[para1][pChar] = 147; } // Mayor LS
else if(level == 25) { PlayerInfo[para1][pChar] = 147; } // Mayor SF
else if(level == 26) { PlayerInfo[para1][pChar] = 147; } // Mayor LV
else if(level == 27) { PlayerInfo[para1][pChar] = 147; } // President
gTeam[para1] = 27;
PlayerInfo[para1][pTeam] = 27;
SetPlayerSkin(para1, PlayerInfo[para1][pChar]);
}
}//not connected
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!");
}
}
return 1;
}
Wie kann ich denn befehl so machen das die leader auch in das team kommen, wenn man makeleader macht.
Ich bedanke mich schon mal um eure hilfe.