28.12.2010, 02:14
(
Последний раз редактировалось blackwave; 28.12.2010 в 02:15.
Причина: Forgotten
)
I made a system, which would ban the user of the player through dini. It set the hour, date, admin which banned, and reason. The issue is on OnPlayerConnect, when the player logs being banned: Doesn't shows who banned, the reason. And the Date and Time are incomplete oO
Here's the code:
I bet the problem might be on the format. Here's my dini file (my user):
PS: I did a command for see the params, for check if there weren't anything wrong on OnPlayerConnect. The result was equal to this one:
Another PS:
Here's the code:
pawn Код:
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
Another PS:
Код:
Date=27/12/2010 // On server it's showing 7/12/2010 Time=23:50:36 // On server it's showing 3:50:36