14.08.2013, 18:40
Hey, I just did offline ban and unban and stuff, modified them.
but I want to make checkban, I read the YSI topic but didn't how to read from an offline user file.
also when he logs in, it needs to show the reason, have a look
but nothing seems to be working, ''showing ban reason'' I'd appreciate help
but I want to make checkban, I read the YSI topic but didn't how to read from an offline user file.
also when he logs in, it needs to show the reason, have a look
pawn Код:
/On Player Connect
public OnPlayerConnect(playerid)
{
new string[128];
new pname[24];
new pIPp[16];
GetPlayerIp(playerid, pIPp, sizeof(pIPp));
if(fexist(UserPath(playerid)))
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
if(PlayerInfo[playerid][pBanned] == 1)
{
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"Player's Data");
INI_WriteString(File,"IP",pIPp);
INI_Close(File);
format(string,sizeof(string),"[BANNED] You are currently banned from the server. [Reason: %s]",PlayerInfo[playerid][pBanReason]);
SendClientMessage(playerid, COLOR_RED,string);
SendClientMessage(playerid, COLOR_RED,"[BANNED] Please Ban Appeal on our forums at www.website.net");
SetTimerEx("KickPlayer",1000,false,"i",playerid);
return 1;
}
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"{FF0000}SERVER","{FFFFFF}Welcome back to the server! \n Type your password below to login.","Login","Quit");
}
else
{
ShowPlayerDialog(playerid,//rest of dialog
}