Dialog gives wrong information
#7

pawn Код:
stock BanPlayer(playerid, playerBanner[], banReason[], banDays)
{
    new pName[MAX_PLAYER_NAME], escapedName[MAX_PLAYER_NAME], escapedActionName[MAX_PLAYER_NAME], safeReason[128], playerIp[16], banQuery[300];

    GetPlayerName(playerid, pName, sizeof(pName));
    mysql_real_escape_string(pName, escapedName);
    mysql_real_escape_string(playerBanner, escapedActionName);
    mysql_real_escape_string(banReason, safeReason);
    GetPlayerIp(playerid, playerIp, sizeof(playerIp));

    if(banDays == 0) { format(banQuery, sizeof(banQuery), "INSERT INTO bans(BannedPlayer, BannedIP, BanIssuer, BanReason, UNIXBan, UNIXExpire, ShouldExpire, Expired) VALUES('%s', '%s', '%s', '%s', %i, 0, 0, 0)", escapedName, playerIp, escapedActionName, safeReason, gettime()); }
    else { format(banQuery, sizeof(banQuery), "INSERT INTO bans(BannedPlayer, BannedIP, BanIssuer, BanReason, UNIXBan, UNIXExpire, ShouldExpire, Expired) VALUES('%s', '%s', '%s', '%s', %i, %i, 1, 0)", escapedName, playerIp, escapedActionName, safeReason, gettime(), gettime() + (banDays * 86400)); }

    mysql_query(banQuery);

    KickEx(playerid, 5);
    return 1;
}
Storing it as that. But the logs just show the IP normal like if it would have been 127.0.0.1 in the DB, it fetches it also like that.
Reply


Messages In This Thread
Dialog gives wrong information - by SomebodyAndMe - 11.04.2013, 16:37
Re: Dialog gives wrong information - by LetsOWN[PL] - 11.04.2013, 17:04
Re: Dialog gives wrong information - by Jakku - 11.04.2013, 17:04
Re: Dialog gives wrong information - by SomebodyAndMe - 11.04.2013, 17:07
Re: Dialog gives wrong information - by SomebodyAndMe - 11.04.2013, 19:56
Re: Dialog gives wrong information - by ReVo_ - 11.04.2013, 19:58
Re: Dialog gives wrong information - by SomebodyAndMe - 11.04.2013, 20:01
Re: Dialog gives wrong information - by Scenario - 11.04.2013, 20:16
Re: Dialog gives wrong information - by ReVo_ - 11.04.2013, 20:21
Re: Dialog gives wrong information - by SomebodyAndMe - 11.04.2013, 20:24

Forum Jump:


Users browsing this thread: 2 Guest(s)