if(PlayerInfo[playerid][Banned] == 1)
{
PlayerInfo[playerid][BannedBy] = dini_Int(file,"BannedBy");
PlayerInfo[playerid][Date] = dini_Int(file,"Date");
PlayerInfo[playerid][Time] = dini_Int(file,"Time");
PlayerInfo[playerid][Reason] = dini_Int(file,"Reason");
new admin[128], data[128], time[128], reason[128];
format(admin,sizeof(admin),"You have been banned by the adminstrator %s",PlayerInfo[playerid][BannedBy]);
format(data,sizeof(data),"Date which you have been banned: %s",PlayerInfo[playerid][Date]);
format(time,sizeof(time),"Time which you have been banned: %s",PlayerInfo[playerid][Time]);
format(reason,sizeof(reason),"Reason by the which you have been banned: %s",PlayerInfo[playerid][Reason]);
SendClientMessage(playerid, vermelho, "____________________________");
SendClientMessage(playerid, vermelho, admin);
SendClientMessage(playerid, vermelho, data);
SendClientMessage(playerid, vermelho, time);
SendClientMessage(playerid, vermelho, reason);
SendClientMessage(playerid, vermelho, "* Your ban haven't over yet *");
SendClientMessage(playerid, vermelho, "____________________________");
Kick(playerid);
}
Password=************* Level=5 Cash=0 Score=0 Jail=0 Registrado=1 Ip=127.0.0.1 Nome=the_runner Bank=1000 Skin=0 Banned=1 Team=0 PosX=1936.048217 PosY=1288.406738 PosZ=12.820312 Spawnou=1 BannedBy=the_runner Date=27/12/2010 Time=23:50:36 Reason=Wasn't given a reason
Date=27/12/2010 // On server it's showing 7/12/2010 Time=23:50:36 // On server it's showing 3:50:36
Reason=Wasn't given a reason
if(PlayerInfo[playerid][Banned] == 1)
{
PlayerInfo[playerid][BannedBy] = dini_Get(file,"BannedBy");
PlayerInfo[playerid][Date] = dini_Get(file,"Date");
PlayerInfo[playerid][Time] = dini_Get(file,"Time");
PlayerInfo[playerid][Reason] = dini_Get(file,"Reason");
new admin[128], data[128], time[128], reason[128];
format(admin,sizeof(admin),"You have been banned by the adminstrator %s",PlayerInfo[playerid][BannedBy]);
format(data,sizeof(data),"Date which you have been banned: %s",PlayerInfo[playerid][Date]);
format(time,sizeof(time),"Time which you have been banned: %s",PlayerInfo[playerid][Time]);
format(reason,sizeof(reason),"Reason by the which you have been banned: %s",PlayerInfo[playerid][Reason]);
SendClientMessage(playerid, vermelho, "____________________________");
SendClientMessage(playerid, vermelho, admin);
SendClientMessage(playerid, vermelho, data);
SendClientMessage(playerid, vermelho, time);
SendClientMessage(playerid, vermelho, reason);
SendClientMessage(playerid, vermelho, "* Your ban haven't over yet *");
SendClientMessage(playerid, vermelho, "____________________________");
Kick(playerid);
}
Reading sometimes dosent work really well on dini, suggesting some new file reading, creating systems like, y_ini, mysql, BUD - blazing user database, there the ones which are good.
By the way on a second notice did you ban the player with the reason Код:
Reason=Wasn't given a reason I think you can close files and open them with dini, do so there.. |
From what I see,BannedBy,Date,Time and Reason are strings,so you need to use dini_Get
pawn Код:
|