dcmd_tban(playerid,params[]) //tban
{
new pID,pIdName[MAX_PLAYER_NAME],pName[MAX_PLAYER_NAME],banTime,reason[64],string[128];
if(PlayerInfo[playerid][pAdmin] <= 2) { return 1; }
if(sscanf(params,"uds",pID,banTime,reason)) { return SendClientMessage(playerid,COLOR_GRAD1,"Benutzung: /tban [Spieler / ID] [Zeit in Minuten] [Grund]"); }
if(!IsPlayerConnected(pID)) { return SendClientMessage(playerid,COLOR_GRAD1,"Falsche ID!"); }
if(banTime < 5 || banTime > 180) { return SendClientMessage(playerid,COLOR_GRAD1,"Minimale Zeit: 5 Minuten / Maximale Zeit: 180 Minuten(3Std.)"); }
GetPlayerName(pID,pIdName,sizeof(pIdName));
GetPlayerName(playerid,pName,sizeof(pName));
format(string,sizeof(string),"AdminSystem: %s wurde von %s für %d Minuten gebannt, Grund: %s",pIdName,pName,banTime,reason);
SendClientMessageToAll(COLOR_LIGHTRED,string);
printf("AdminSystem(TIMEBAN): Admin: %s(%i) - Timebanned Player: %s(%i) - Timeban Reason: %s",pName,playerid,pIdName,pID,reason);
pBanner[pID] = pName;
TBan(pID,banTime);
return 1;
}
dcmd_tunban(playerid,params[])
{
new pName[MAX_PLAYER_NAME],pIdName[MAX_PLAYER_NAME];
if(PlayerInfo[playerid][pAdmin] <= 1) { return 1; }
if(sscanf(params,"s",pIdName)) { return SendClientMessage(playerid,COLOR_GRAD1,"Benutzung: /tunban [Voller Spielername]"); }
GetPlayerName(playerid,pName,sizeof(pName));
if(BanFileExist(pIdName))
{
TUnban(pIdName);
SendClientMessage(playerid, COLOR_GREEN, "Spieler entbannt!");
printf("AdminSystem(UNTIMEBAN): Admin: %s(%i) - untimebanned Player: %s",pName,playerid,pIdName);
return 1;
} else { return SendClientMessage(playerid,COLOR_GRAD1,"Falscher Name! Gib den genauen Namen ein!"); }
}
Hay,
Ich wollte Fragen wie ich tban in Stunden umwandle! Vielen dank im vorraus!