if(strcmp( "/uninvite", cmdtext, true, 10) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "BENUTZUNG: /uninvite [playerid/Name]");
return true;
}
new para1;
para1 = ReturnUser(tmp);
if (PlayerInfo[playerid][pLeader] >= 1)
{
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
if (PlayerInfo[para1][pMember] > 0 && PlayerInfo[para1][pMember] == PlayerInfo[playerid][pLeader])
{
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
printf("AdmCmd: %s has uninvited %s.", sendername, giveplayer);
format(string, sizeof(string), "* Du wurdest aus einer Familie oder der Polizei vom Leader %s gekickt.", sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
SendClientMessage(para1, COLOR_LIGHTBLUE, "* Du bist nun wieder ein Zivilist.");
gTeam[para1] = 3;
PlayerInfo[para1][pTeam] = 3;
PlayerInfo[para1][pMember] = 0;
PlayerInfo[para1][pRank] = 0;
PlayerInfo[para1][pChar] = 0;
new rand = random(sizeof(CIV));
SetSpawnInfo(para1, gTeam[para1], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
PlayerInfo[para1][pModel] = CIV[rand];
MedicBill[para1] = 0;
SpawnPlayer(para1);
format(string, sizeof(string), " Du hast %s aus seiner Familie / der Polizei gekickt.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Du kannst nur die Member deiner Fraktion uninviten!");
}
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Nur der Leader kann diesen Befehl nutzen!");
}
}
return true;
}
was ist daran falsch da passiert nix