Ban account problem
#2

pawn Код:
CMD:banacc(playerid,params[])
{
    if(PlayerInfo[playerid][pAdmin] > = 5)
    {
    new name[MAX_PLAYER_NAME];
    new aName[MAX_PLAYER_NAME];
    new aid;
    new string[200];
    new echos[200];
    new am[128];
    new str[60];
    new Year, Month, Day, Hour, Minute, Second;
    getdate(Year, Month, Day);
    gettime(Hour, Minute, Second);
    GetPlayerName(aid, aName, sizeof(aName));
    if(sscanf(params, "s",name)) return SendClientMessage(playerid,-1,"{F70505}Usage: {FFFFFF}/banacc <account name>");
    if(!fexist(UserPath(playerid))) return SendClientMessage(playerid, red, "Player account not found, please note the files are CASE SENSITIVE.");
    else
    {
    new INI:File = INI_Open(UserPath(playerid));
    INI_SetTag(File,"data");
    INI_WriteInt(File,"Banned",1);
    INI_Close(File);
    }
   
    format(str,sizeof(str),"banip %s",PlayerInfo[playerid][pIp]);
    SendRconCommand(str);
   
    format(string, sizeof(string), "Admin %s (%d) banned %s's account - %02d/%02d/%d - %02d:%02d:%02d", aName,aid,name,Day,Month,Year,Hour,Minute,Second);
    format(echos, sizeof(echos), "1,4Admin %s (%d) banned %s's account - %02d/%02d/%d - %02d:%02d:%02d", aName,aid,name,Day,Month,Year,Hour,Minute,Second);
    format(am, sizeof(am), "You have successfully banned %s's account.", name);
    SendClientMessage(aid,red,am);
    SendMessageToAdmins(red,string);
    IRC_Say(gGroupID, IRC_CHANNEL, echos);
    IRC_Say(gGroupID, IRC_ACHANNEL, echos);
    AccBanLog(string);
    }
    return 1;
}
Reply


Messages In This Thread
Ban account problem - by Face9000 - 26.10.2012, 09:38
Re: Ban account problem - by HyDrAtIc - 26.10.2012, 09:47
Re: Ban account problem - by JaKe Elite - 26.10.2012, 09:52
Re: Ban account problem - by RedJohn - 26.10.2012, 10:00
Re: Ban account problem - by Face9000 - 26.10.2012, 10:34
Re: Ban account problem - by JaKe Elite - 26.10.2012, 10:41
Re: Ban account problem - by Face9000 - 26.10.2012, 10:45
Re: Ban account problem - by JaKe Elite - 26.10.2012, 10:48
Re: Ban account problem - by Jarnu - 26.10.2012, 11:03
Re: Ban account problem - by Face9000 - 26.10.2012, 11:31

Forum Jump:


Users browsing this thread: 3 Guest(s)