10.02.2017, 20:14
tenta assim :
pawn Код:
CMD:banir(playerid, params[])
{
new string[120], idbanido, banido[MAX_PLAYER_NAME], pAdmin[MAX_PLAYER_NAME], motivo[50];
if(IsPlayerAdmin(playerid) || Admin[playerid] >= 1)
{
if(sscanf(params,"us[50]", idbanido, motivo)) return SendClientMessage(playerid, -1, "[ ERRO ] : Use /banir ID MOTIVO);
GetPlayerName(playerid, pAdmin, MAX_PLAYER_NAME);
GetPlayerName(idbanido, banido, MAX_PLAYER_NAME);
format(string, sizeof(string), "O(a) Administrador(a) %s baniu %s pelo motivo %s", pAdmin, banido, motivo);
SendClientMessageToAll(-1, string);
Ban(idbanido);
new file[60];
format(file, sizeof(file), "Pasta que voce criou para banidos/%s.ini", banido);
if(!DOF2_FileExists(file))
{
DOF2_CreateFile(file);
DOF2_SetString(file, "Admin", pAdmin);
DOF2_SetString(file, "Motivo", motivo);
DOF2_SaveFile();
}
} else { SendClientMessage(playerid, -1, "Vocк nгo й admin!") }
return 1;
}