Hallo,
Ich kann kein uninviten mehr früher hats gegangen bitte um hilfe
Befehl:
if(strcmp(cmd, "/uninvite", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "BENUTZUNG: /uninvite [playerid/PartOfName]");
return 1;
}
new para1;
para1 = ReturnUser(tmp);
if (PlayerInfo[playerid][pLeader] > 0 || PlayerInfo[playerid][pAdmin] >= 6)
{
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
if (PlayerInfo[para1][pMember] > 0)
{
if((PlayerInfo[playerid][pLeader] != PlayerInfo[para1][pMember]) && PlayerInfo[playerid][pAdmin] < 1337)
{
SendClientMessage(playerid, COLOR_GRAD2, "Dieser Spieler ist nicht in deiner Fraktion.");
return 1;
}
if(PlayerInfo[para1][pJobHours] <= MEMBER_TIME)
{
getdate(year, month, day);
PlayerInfo[para1][pJobLock] = 1;
PlayerInfo[para1][pJobLockDate] = day;
PlayerInfo[para1][pJobLockMonth] = month;
PlayerInfo[para1][pJobLockHours] = MEMBER_TIME - PlayerInfo[para1][pJobHours];
}
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 deiner Fraktion gekickt von Leader %s.", 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);
PlayerInfo[para1][pJobInvite] = 0;
PlayerInfo[para1][pJobInviteDate] = 0;
PlayerInfo[para1][pJobInviteMonth] = 0;
PlayerInfo[para1][pJobHours] = 0;
PlayerInfo[para1][pJob] = 0;
format(string, sizeof(string), "Du hast %s aus deiner Fraktion entlassen.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
if(PlayerInfo[para1][pMember] == 14)
{
PlayerInfo[para1][pJob] = 0;
}
if(PlayerInfo[para1][pMember] == 18)
{
PlayerInfo[para1][pJob] = 0;
}
return 1;
}
}
}//not connected
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Du bist kein Leader einer Fraktion.");
return 1;
}
}
return 1;
}