Guten Tag,
es geht um folgenden Befehl:
dcmd_tban(playerid,params[])
{
new pID,pIdName[MAX_PLAYER_NAME],pName[MAX_PLAYER_NAME],banTime,reason[64],string[128];
if(!IsPlayerAdmin(playerid)) { return 1; }
if(sscanf(params,"uds",pID,banTime,reason)) { return SendClientMessage(playerid,0xADC7E7FF,"Usage: /tban [playerid] [time(min)] [reason]"); }
if(!IsPlayerConnected(pID)) { return SendClientMessage(playerid,0xADC7E7FF,"Invalid ID !"); }
if(banTime < 1) { return SendClientMessage(playerid,0xADC7E7FF,"Minimum Time: 1 Minute"); }
GetPlayerName(pID,pIdName,sizeof(pIdName));
GetPlayerName(playerid,pName,sizeof(pName));
format(string,sizeof(string),"[TIMEBAN] Admin %s timebanned %s for %d Minutes. Reason: %s",pName,pIdName,banTime,reason);
SendClientMessageToAll(0xADC7E7FF,string);
printf("AdmCmd(TIMEBAN): Admin: %s(%i) - Timebanned Player: %s(%i) - Timeban Reason: %s",pName,playerid,pIdName,pID,reason);
pBanner[pID] = pName;
TBan(pID,banTime);
return 1;
}
Wie muss ich ihn ändern, dass man den Befehl nur mit Adminlevel 4 oder höher ausführen kann?
Liebe Grüße
Mr.X