02.04.2016, 14:18
COMMAND:
Load stock:
under on player dis
INI_WriteInt(file,"Banned",pInfo[playerid][Banned]);
INI_WriteString(file,"Breason",pInfo[playerid][Breason]);
any thing else?
pawn Код:
CMD:ban(playerid,params[])
{
if(pInfo[playerid][Admin] >= 3)
{
if(sscanf(params, "us", id, reason)) return SendClientMessage(playerid, RED,"Usage: /ban [id] [reason]");
new INI:ban1 = INI_Open(Path(id));
INI_SetTag(ban1, "Player's Data");
INI_WriteInt(ban1, "Banned", 1);
INI_WriteString(ban1, "Breason",reason);
INI_Close(ban1);
pInfo[id][Banned] = 1;
}
return 1;
}
pawn Код:
forward loadaccount_user(playerid, name[], value[]);
public loadaccount_user(playerid, name[], value[])
{
INI_String("Password", pInfo[playerid][Pass],129);
INI_Int("Money",pInfo[playerid][Money]);
INI_Int("Scores",pInfo[playerid][Scores]);
INI_Int("Kills",pInfo[playerid][Kills]);
INI_Int("Deaths",pInfo[playerid][Deaths]);
INI_Int("AdminLvl",pInfo[playerid][Admin]);
INI_Int("Banned",pInfo[playerid][Banned]);
INI_String("Breason",pInfo[playerid][Breason],300);
return 1;
}
INI_WriteInt(file,"Banned",pInfo[playerid][Banned]);
INI_WriteString(file,"Breason",pInfo[playerid][Breason]);
any thing else?