Ich habe versucht /makeleader mit dcmd zu machen, aber es kommt InGame nur diese Meldung: Die FraktionID muss zwischen 0 und 1 sein!
Code:
dcmd_makeleader(playerid,params[])
{
new pID;
new frakid;
if (sscanf(params, "ui", pID, frakid)) SendClientMessage(playerid, COLOR_RED, "Info: /makeleader [SpielerID] [FraktionID]");
else if (pID == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "Player not found");
else if (frakid <= 0 || frakid >= 1) SCM(playerid, COLOR_GREY, "Die FraktionID muss zwischen 0 und 1 sein!");
else
{
if(frakid == 0) { PlayerInfo[pID][pSkin] = 101; PlayerInfo[playerid][pTeam] = 0; PlayerInfo[playerid][pLeader] = 0; }
if(frakid == 1) { PlayerInfo[pID][pSkin] = 280; PlayerInfo[playerid][pTeam] = 1; PlayerInfo[playerid][pLeader] = 1; }
}
return 1;
}