What's wrong with this?
#1

pawn Код:
dcmd_accban(playerid,params[])
{
    new string[128];
    new ID;
    new time;
    new reason;
    if(sscanf(params,"uis[100]",ID,time,reason))
    {
        SendClientMessage(playerid,COLOR_ERROR,"USAGE: /accban (Player Name/ID) (Days) (Reason)");
        return 1;
    }
    if(!IsPlayerConnected(ID))
    {
        format(string,sizeof(string),"[ERROR] The player ID (%d) is not connected to the server. You cannot ban them.",ID);
        SendClientMessage(playerid,COLOR_ERROR,string);
        return 1;
    }
    new string1[128];
    format(string1,sizeof(string1),"[ADMIN] Administrator has banned %s(%d) from the server. Reason: %s. Time : %i days.",PlayerName(ID),ID,reason,time);
    SendClientMessageToAll(COLOR_ADMIN,string1);
    jBan(ID,playerid,reason,time);
    LogTo("AccountBans",string1);

    format(string,sizeof(string),"9[ADMIN] Administrator has banned %s(%d) from the server. Reason: %s. Ban Time : %i days.",PlayerName(ID),ID,reason,time);
    IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
    return 1;
}
I was trying to edit the jBan and make this out. None of those stocks gave me an error. But, the problem is here.
Stock is given below.
pawn Код:
stock jBan(player_banned, player_banner, reason[], time = 0)
{
    new TempQuery[500];
    new IP[14];
    GetPlayerIp(player_banned,IP,sizeof(IP));
    format(TempQuery, sizeof(TempQuery), "INSERT INTO `"Bans_Table"` (user_banned, user_banned_ip, user_banner, ban_reason, ban_timestamp, ban_time) VALUES ('%s', '%s', '%s', '%s', CURRENT_TIMESTAMP, %d)", PlayerName(player_banned), IP, PlayerName(player_banner), reason, time);
    mysql_query(TempQuery);
    jBanCheck(player_banned);
    Kick(player_banned);
    return 1;
}
Please help me solve my issue, This is getting serious..
Thanks.
Reply


Messages In This Thread
What's wrong with this? - by rakshith122 - 13.03.2014, 16:11
Re: What's wrong with this? - by Matess - 13.03.2014, 16:27
Re: What's wrong with this? - by rakshith122 - 13.03.2014, 16:42
Re: What's wrong with this? - by rakshith122 - 13.03.2014, 16:47
Re: What's wrong with this? - by Matess - 13.03.2014, 16:50
Re: What's wrong with this? - by rakshith122 - 13.03.2014, 16:51
Re: What's wrong with this? - by Matess - 13.03.2014, 16:56
Re: What's wrong with this? - by rakshith122 - 13.03.2014, 17:00
Re: What's wrong with this? - by Matess - 13.03.2014, 17:07
Re: What's wrong with this? - by rakshith122 - 13.03.2014, 17:09

Forum Jump:


Users browsing this thread: 2 Guest(s)