[Ajuda] Sscanf
#2

pawn Код:
CMD:ban(playerid, params[])
{
    new VictimID, Motivo[120];
    if(Informacoes[playerid][PlayerAdmin] < 3)
    {
        Mensagem(playerid, RED, "Erro: Vocк Nгo tem Nнvel de Administrador Suficiente");
        return false;
    }
    if(sscanf(params, "ds[120]", VictimID, Motivo))
    {
        Mensagem(playerid, RED, "Erro: /ban [ID] [Motivo]");
        return false;
    }
    if(!IsPlayerConnected(VictimID))
    {
        Mensagem(playerid, RED, "Erro: Jogador Nгo Conectado");
        return false;
    }
    GetPlayerName(playerid, gAdminName, sizeof(gAdminName));
    GetPlayerName(VictimID, gPlayerName, sizeof(gPlayerName));
    format(gString, sizeof(gString), ">> Admin-CMD: %s Baniu o Jogador %s Pelo Motivo: %s", gAdminName, gPlayerName, Motivo);
    MensagemParaTodos(RED, gString);
    Ban(VictimID);
    return 1;
}
Reply


Messages In This Thread
Sscanf - by Bruno Alves - 23.07.2012, 01:25
Re: Sscanf - by [JD]BlackFire - 23.07.2012, 01:35
Re: Sscanf - by Bruno Alves - 23.07.2012, 01:40
Re: Sscanf - by [JD]BlackFire - 23.07.2012, 01:40
Re: Sscanf - by Bruno Alves - 23.07.2012, 01:43
Re: Sscanf - by leonardo1434 - 23.07.2012, 01:49
Re: Sscanf - by .FuneraL. - 23.07.2012, 01:50
Re: Sscanf - by Bruno Alves - 23.07.2012, 01:53
Re: Sscanf - by Kmatsu - 23.07.2012, 02:56
Re: Sscanf - by .FuneraL. - 23.07.2012, 12:39

Forum Jump:


Users browsing this thread: 2 Guest(s)