Код:
new unlocker;
unlocker = 0;
format(string3, sizeof(string3), "users/%s.ini", playername3);
new File: hFile = fopen(string3, io_write);
if (hFile)
{
new var[64];
format(var, 64, "Locked=%d\n",unlocker);fwrite(hFile, var);
fclose(hFile);
}
Код:
if(strcmp(cmd, "/unlockaccount", true) == 0)
{
if (PlayerInfo[playerid][pAdmin] >= 3)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /unlockaccunt (Playername)");
return 1;
}
if(!exist(string))
{
SendClientMessage(playerid, COLOR_GREY, "ERROR: This player account doenst exist in users folder!");
return 1;
}
TogglePlayerControllable(giveplayerid, 1);
SendClientMessage(playerid, COLOR_BLUE, "Account unlocked succesfuly.");
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "[ADMIN]: %s Has Just Unlocked %s Account!.", sendername, giveplayer);
ABroadCast(COLOR_LIGHTRED, string, 1);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "You must be a level 3 admin to do this command.");
}
return 1;
}
There's i known, it much mistakes, that i need peoples help.
Please mix it up code into that second code. I'm thank fully.