Hii ich habe ein Problem unswar wenn ich einen Spieler uninviten will dann wird er nicht von der Fraktion gekickt sondenr spawnt wieder ...^^
ocmd:uninvite(playerid,params[])
{
new text[128],pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,sizeof(pName));
if(isPlayerInFrakt(playerid,0))
{
SendClientMessage(playerid,COLOR_RED,"Du gehörst keiner Fraktion an.");
return 1;
}
if(sscanf(params, "s", text))return SendClientMessage(playerid, COLOR_GREY, "Verwendung: /uninvite [Spieler/ID]");
if(GetPVarInt(playerid,"Leader") == 6 || GetPVarInt(playerid,"Leader") == 1 || GetPVarInt(playerid,"Leader") == 2 || GetPVarInt(playerid,"Leader") == 3 || GetPVarInt(playerid,"Leader") == 4 || GetPVarInt(playerid,"Leader") == 5 || GetPVarInt(playerid,"Leader") == 6 || GetPVarInt(playerid,"Leader") == 7 || GetPVarInt(playerid,"Leader") == 8 || GetPVarInt(playerid,"Leader") == 9)
{
new pID,string[280];
if(sscanf(params,"u",pID))return SendClientMessage(playerid,COLOR_GREY,"Benutze: /invite [Spieler/ID]");
format(string,sizeof(string),"Du wurdest von Leader %s aus der Fraktion geworfen",SpielerName(playerid));
SendClientMessage(pID,COLOR_LIGHTBLUE,string);
format(string,sizeof(string),"Du hast %s aus der Fraktion geworfen",SpielerName(pID));
SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
SetPVarInt(pID,"Member",0);
SpawnPlayer(pID);
}
else
{
SendClientMessage(playerid,COLOR_RED,"Du bist kein Leader!");
}
return 1;
}