Wie dann ich den gebanten wieder entbannen'?
if(strcmp(cmd, "/pban", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "FEHLER: /pban [playerid] [grund]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1339)
{
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "FEHLER: /pban [playerid] [grund]");
return 1;
}
if(PlayerInfo[giveplayerid][pAdmin] > PlayerInfo[playerid][pAdmin])
{
SendClientMessage(playerid, COLOR_GRAD2, "Du kannst diesen Spieler nicht bannen, da er ein höheres Adminlevel hat als du!");
return 1;
}
new year, month,day;
getdate(year, month, day);
format(string, sizeof(string), "AdmCmd: %s wurde von %s gebannt, Grund: %s (%d-%d-%d)", giveplayer, sendername, (result),month,day,year);
BanLog(string);
format(string, sizeof(string), "AdmCmd: %s wurde von %s gebannt, Grund: %s", giveplayer, sendername, (result));
SendClientMessageToAll(COLOR_LIGHTRED, string);
M_Log(string);
//PlayerInfo[giveplayerid][pAdmin] = PlayerInfo[giveplayerid][pLevel];
PlayerInfo[giveplayerid][pGesperrt] = 1;
new ip[16];
GetPlayerIp(giveplayerid,ip,sizeof(ip));
M_WriteIPToBlacklist(ip);
//Ban(giveplayerid);
Kick(giveplayerid);
return 1;
}
}//not connected
}
else
{
format(string, sizeof(string), " %d ist kein aktiver Spieler.", giveplayerid);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}