Formats and dini >.>
#1

Hey guys i was making some ban cmd that saves all data to a ban file although how the f cant this work.

pawn Код:
stock ShowBan(playerid)
{
    new file[26], string[256];
    format(file, sizeof(file), BAN_FILE_2, ReturnPlayerName(playerid));
    format(string, 256, "You are banned from this server. If you've feel you have been wrongfully ban please reply at "#SERVER_WEBSITE"\n\n"COL_RED"BANNED BY: %s\nBANNED DATE: %s\nBANNED TIME: %s\nBANNED REASON: %s", dini_Get(file,"BANBY"), dini_Get(file,"BANDATE"), dini_Get(file,"BANTIME"), dini_Get(file,"BANREASON"));
    ShowPlayerDialog(playerid, NOREPONSE, DIALOG_STYLE_MSGBOX, "Call of Duty: Blackops", string, "Ok", "");
    Kick(playerid);
}
Its loading no values at all for some reason ?
Well its really suppose to read

Код:
 IP=5.57.93.125
BANBY=Lorenc
BANDATE=09/January/2011
BANTIME=21/24/56
BANREASON=r
But it dosent. Anyone know why,
It says on my client You been ban by: (no person)


-Lorenc.
Reply
#2

Show BAN_FILE_2 define.
Reply
#3

pawn Код:
#define BAN_FILE_2          "COD/players/bans/%s.ini"
Reply
#4

You should increase 'file' size.

pawn Код:
new file[64], string[256];
Reply
#5

You are completely a hero, many, many thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)