15.04.2018, 16:26
Quote:
Okay. It works. CMD:ban works well with BanReason. Only there is a problem. Player will register and the PlayerName.ini file is created.
Ban=0 BanReason=None As a player leaves the server /q This is so: Ban=0 BanReason= Removed "None". How to repair? |
PHP код:
SaveAccounts(playerid)
{
new name[MAX_PLAYER_NAME], file[256];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file), SERVER_USER_FILE, name);
if(dini_Exists(file))
{
dini_Set(file, "BanReason", "None");
}
}
LoadAccounts(playerid)
{
new name[MAX_PLAYER_NAME], file[256];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file), SERVER_USER_FILE, name);
if(dini_Exists(file))
{
PlayerInfo[playerid][pBanReason] = dini_Get(file, "BanReason");
}
}