Ist wirklich nichts großes
#include <ocmd>
#include <dini>
forward KickTimer(playerid);
ocmd:ban(playerid,params[])
{
if(!IsPlayerAdmin(playerid))return SendClientMessage(playerid,0xFFFFFFFF,"Du bist kein Admin");
new pID,str[300],reason[128],Name[24],Name2[24];
GetPlayerName(playerid,Name,sizeof(Name));
if(sscanf(params,"us",pID,reason))return SendClientMessage(playerid,0xFFFFFFFF,"/ban id grund");
GetPlayerName(pID,Name2,sizeof(Name2));
format(str,sizeof(str),"%s wurde von %s gebannt, Grund: %s",Name,Name2,reason);
SendClientMessage(playerid,0xFFFFFFFF,str);
SetTimerEx("KickTimer",2000,false,"i",pID);
new BanData[128];
format(BanData,sizeof(BanData)),"/Ban/%s.cfg",Name2);
dini_Create(BanData);
dini_Set(pfad,"Verantwortlicher",Name);
dini_Set(pad,"BannGrund",reason);
return 1;
}
public OnplayerRequest(playerid)
{
new BanData[128];
format(BanData,sizeof(BanData)),"/Ban/%s.cfg",Name2);
if(dini_Exists(BanData) == 1)
{
new str[900];
format(str,sizeof(str),"Gebannt Von %s",dini_Get(pfad,"Verantwortlicher")); {SendClientMessage(playerid,0xFFFFFFFF,str);
format(str,sizeof(str),"BanGrund %s",dini_Get(pfad,"BanGrund")); {SendClientMessage(playerid,0xFFFFFFFF,str);
}
}