[Ajuda]Adicionando log's
#1

Eu gostaria saber como eu posso adicionar em meu comando um log, que salvara o acusado,moderador, data,hora,dia que houve o kick, ele ficaria salvo na pasta Logs nas scriptfiles!

pawn Code:
CMD:kickar(playerid,params[])
{
    if(PlayerInfo[playerid][pStaff] < 1) return SendClientMessage(playerid, 0xFFFFFFAA, "Vocк nгo tem autorizaзгo!");
    new str[148],texto[20],idx;
    if(sscanf(params,"ds",idx,texto)) return SendClientMessage(playerid,0xFFFFFFAA,"Use /kickar (id) (motivo)");
    if(!IsPlayerConnected(idx)) return SendClientMessage(playerid,0xFFFFFFAA,"Jogador Offiline");
    format(str,sizeof(str),"Moderaзгo: %s foi kickado pelo moderador %s, Motivo: %s", PlayerName(idx),PlayerName(playerid),texto);
    SendClientMessageToAll(0x2641FEAA,str);
    Kick(idx);
    return 1;
}
Reply
#2

pawn Code:
new x1[MAX_PLAYER_NAME],x2[MAX_PLAYER_NAME];
GetPlayerName(playerid, nj, sizeof(nj));
GetPlayerName(playerid, idx, sizeof(idx));
printf("Adminstrador %s kickou o jogador %s.", x1, x2);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)